You can use views at different levels of granularity (views can use other views), but start with one view for each page.
As a general guideline, your views should only contain display code not data retrieval or processing logic. The controllers/services should take care of the non-display logic. If you don't yet understand the difference between services and controllers, then keep it simple and put all of your non-display logic in controllers and don't use services.
Services and beans are just options for how to organize code into different components. Views and layouts provide options for organizing display code into different cfm pages. There are potential benefits to using these framework features, but they do not prevent you from continuing to use the ways you have previously organized your cf code.
Don't get me wrong. This, by itself, is not enough to completely understand MVC pattern, but when (and if) you found yourself unsure or lost in process of learning, get back on this quote I am sure that everything will be much more clear....if not completely :)
More about this:
- Wikipedia about MVC architectural pattern
- What is FW/1 framework:
- Wiki
- Video presentation: FW/1 - The Invisible Framework
No comments:
Post a Comment