ver heard this story? Developer meets company, company meets developer, they fall in love. Together, they develop a ColdFusion application of great beauty, bound to last forever. But soon developer and company begin to drift apart, feel the need for "more space." Eventually, they part ways.
A touching story, but the problem is that it doesn't end there: A new developer enters the picture, but can't figure out how to modify the application of great beauty. Developer spends lots of time digging through code files, but every time developer tinkers with something, something else breaks. Company falls in love with consultants, out of love with developer, and spends lots of resources doing the same work again.
What Went Wrong?
While we can't ensure that companies and their software developers will live in harmony forever and ever, we can ensure that the work developers do gets passed from one development team to another team responsibly. An important step in this is application architecturesets of rules and regulations about how code components within an application interoperate. A clear architecture eases application maintenance.
Application maintenance has long been a problem for the ColdFusion community, as many ColdFusion applications lack clearly defined rules for how code components interoperate. Until recently, ColdFusion lacked object-oriented features, which means strategies to address this lack of rules have been slower in coming to ColdFusion than to other scripting languages. Mach-II is a tooland a philosophyto address these issues.
The term Model-View-Controller (MVC) has become a mantra of application development in the past few years. Using the MVC design pattern essentially means decoupling the application (or business) logic (the Model) from the user interface (the View) and having the interaction of these two carefully coordinated by a third set of code (the Controller). Mach-II brings the advantages of MVC to ColdFusion for the first time.
The most common problem MVC solves is the tight coupling between application logic and user interfaces. That is, MVC addresses the tendency to introduce data processing code in CF scripts themselves and to hard-code relationships between particular ColdFusion scripts and ColdFusion Components in idiosyncraticand difficult to understandways. Nothing will make a Web application tougher to modify in the future than tight coupling.
The best part of using MVC is that MVC solutions generally come wrapped-up and pre-packaged for us as a set of codeor frameworkto which we add the code for our application.