MVC Pattern and Frameworks{1}

The article (2012), “Journey through the JavaScript MVC Jungle,” introduces the Model-View-Controller (MVC) pattern and offers resources to finding a JavaScript framework that provides organization and structure, while meeting the specific needs of a developer’s web application project. The author of the article, Addy Osmani, advises that MVC pattern helps structure code by breaking down the application into three sections: models, views, and controllers. The model in MVC handles the “domain-specific knowledge and data in an application (Osmani).” View holds the code for the user-interface and contains the presentation logic. Controllers in MVC respond to the user actions (business logic). The author further explains that not all frameworks follow the MVC pattern but will include the controller information in the view or some other component, therefore refers to these other frameworks as MV* pattern. Osmani advises that JavaScript MV* framework is best used when the web application communicates mostly with an API or back-end data service and he provides GMAIL and Google Docs as an example. So, MV* frameworks are more efficient for applications with tasks that do not rely on the server for the presentation logic of an application. Osmani also provides criteria and questions that are helpful for a developer when choosing a framework. The author suggests to review the features and code of the framework. If the framework has proven its operability in production, it can help determine if the framework fits the developer’s needs. The author also suggests that a well-documented framework can save a developer a lot of time, since information can be easily accessible and referenced. The article then reviews a handful of MV* frameworks such as Backbone.js, Ember.js, AngularJS, Spine, CanJS, DOJO, JQuery, and describes which type of applications they are best utilized. Finally, the author also provides pros and cons given by developers for the most popular frameworks to further support a developer’s decision for a chosen MVC framework.

I found this article related to chapter eight, Database Application Development, since it discusses the application server which contains the software that creates the dynamic web-based applications. Also, MVC is briefly mentioned in the textbook as a solution for designing the web applications. However, the textbook did not go into the specifics of MVC which Osmani’s article covers. The article gave a good insight on what to expect and look for if given the role (developer) to create a web application from scratch.

The article introduced many frameworks that I have never heard of such as Batman. The mere fact that it is named “Batman” may have been reason enough but through this article I learned that it works well with Rails and uses many known conventions. The author presented the information well, even to a novice such as myself, yet provided a helpful guideline for choosing a framework that I would definitely reference in the future. The article also provided a good resource, TODOMVC, which provides comparisons between frameworks, code for testing, and ultimately matches a framework to a developer’s specific project need.

Osmani, A. (2012, July 27). Journey Through the JavaScript MVC Jungle. Retrieved from Retrieved on November 18, 2012.