> But WHY it is important to keep your action and content code > separate in a large application? Does it make it less "large"? ;-)
If you were building a house made from brick, you could use lots of regular-sized bricks, or you could use one gigantic brick. Most people would find the former a more workable option. > The main reason to keep anything away from the rest is > because you are using it at many places, so you put it somewhere > in a function, a custom tag, an include or anything else, > including Application.cfm, but this stands for CF code and > HTML as well. Still no reason to separate the code from the > HTML. There are other reasons why you might write separate modules, other than reuse. One common reason is simplification - it's just easier to work with a module that does one thing. You immediately know where to go to change how that one thing works, for example. If you find that you need to do that one thing elsewhere, it's easy to do if you've followed this approach. And, it's common in web applications for views to change independent of business logic and vice-versa. So why would you want to stick them together in one big undifferentiated mass of code? For example, a coworker had to add support for RSS and mobile devices to a huge site last week. He was able to do it very quickly, because all he had to do was write a separate set of display code. He didn't have to worry about how it would affect the existing display code or the business logic of the application. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228027 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54