It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to the Grails framework.
After taking it for a bit of a spin, I created my own domain class and used the generate-all functionality to generate the controllers and the views. After this, I modified (added some more required functionality and removed somethings that were not required) the generated controllers and views. The application runs without a trouble.
Next, I require to make certain changes to my domain class for which i have already created and customized controllers and views. After making the change to the domain class, is there any way (or what is the correct way) to re-generate the controllers and view classes with my previous updates intact.
Any help will be appreciated.
execute grails install-templates to install the templates and modify them (http://grails.org/doc/1.3.7/ref/Command%20Line/install-templates.html)
The next time you generate your view and/or controller, these changed templates will be used.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Why using NSNotificationCenter(ios) in a mobile apps. I mean I dont have many UI controls to update on a View. Also if I need to pass down to the caller of a View I would just use a delegate.
It might be justifiable in a logical sense if I have many Views in a Navigation control, and I would like to have each view down the navigation to update something - it is in situations like this NSNotificationCenter gets into play?
Thanks
Regards
In the situations you mention, you probably shouldn't use notifications -- it really doesn't have anything to do with mobile apps, the same criteria would apply to desktop apps as well. Notifications are best used if you need multiple objects to listen for an event, or in some cases, where two view controllers are far apart in the overall scheme of controllers, it's difficult to have one view controller set itself as the delegate of the other.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Thanks for the previous replies.
I am new to Magento and don't know how MVC operates in this framework. I want to display "Hello world" using MVC format--i.e., the controller imports the string from the model and transmits it to the view for display. Can anyone give me an idea of how MVC works in Magento?
This Magento MVC flowchart may assist
you can take the magento basics course for free today http://www.magentocommerce.com/services/on-demand
As we know, the implementation of a “Tier Model” is a large part of an MVC framework. It represents the details of your application and handles data in applications. Magento Models play an even greater role, because they usually contain the “Business Logic”.
The Magento Object Relational Mapping (ORM) has very important role in the process of working with database. Here We will go deeply to understand ORM. You can follow:
Magneto Object Relational Mapping ORM
MVC Developers - Magneto Models and ORM Basics
The only thing different in Magento's MVC model that is different from other MVCs is the way it use Block.
In normal MVC, variables are passed to the View through Controller. However, in Magento, Views get data from Block, and Block gets its data from Model.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I programmed in php. And when you use some framework, then, as far as php is intepreter, all the framework loads every request. But not rails, though, ruby is interperter too... So, how does it work
Nope. Rails as the framework caches all loaded modules, class and libraries on the first several requests (it's not on the first request only since it also has lazy load for above things).
But by default under development mode, all app modules (mvc) are reloaded on each request. Libraries (plugins, gems, etc) are not reloaded.
Your question is hugely wide open and too large to really answer effectively. This is a good place: RoR Guides. If after reading that you have more specific and directed questions bring them back and we'll try our best to help you...
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am using asp.net mvc 3.0 with razor.
I am wondering if I can make a view model for my master page. I have some dynamic data in my master page so I am going to probably have to make a "base class" for all my controllers but I rather have strongly typed data then View Data/ View Bag.
So can this be done?
You could have all of your view models inherit from a base view model, which would include all of your common fields.
Alternatively, you could use a Custom Action Filter that would put some object in the view data which your master page would always expect to be there. This action filter could also be used to fill in the common fields in your view model base class.
i would suggest using RenderAction rather than having a base viewmodel from which all your view models will inherit. i guess viewmodel that you want to use in your master page is most probably going to contain navigational data (menu or leftbar etc.). if this is the case, RenderAction places clean separation of concerns and you can cache the data used in this particular action after loading it for first time and your further request will then be served from cached data.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Anyone done this in MVC? any info would be great!.
Thanks.
You can get pretty far simply by including a print.css file for media type print.
Hide everything you don't want and include logical page breaks and demensions (inches, etc... actually format more correctly using the print.css override).
I have used a custom controller (or filter) to handle links using something like index.print instead of index.html, which simply overrides the master layout with a layout more suitable for printing, but I still feel that the alternate stylesheet is the best way to go.
http://www.alistapart.com/articles/goingtoprint/
Printing a page isn't really a matter for ASP .NET or MVC. Printing is a client-side operation, and therefore can (and should) be done entirely in client-side code. JavaScript has a method call for this:
window.print()