JavaScript and MVC, Why When and How?

Written by on August 20, 2009 in AJAX Experience, Javascript - 2 Comments

We talked previously about the JavaScriptMVC Framework – a really good JavaScript Framework project to keep an eye on. Since MVC now became a “default” feature in most web frameworks, it was interesting to explore its usage in JavaScript, Ajax, and web 2.0. The MVC pattern is mostly used in web application development to separate between design and logic and make development easier and highly maintainable in enterprise environments. Since JavaScript is excessively used in enterprise today, how could we make it better with design patterns ?
Jonathan Snook wrote an interesting introduction to MVC usage in JavaScript where he applied Model-View-Controller pattern on form validation. It’s probably very complex to use in small application, but if you are writing large JavaScriupt-based application this could be with big benefits. Jonathan pointed also to other JavaScript MVC frameworks in addition to JavaScriptMVC : SproutCore and TrimJunction.

Like anything else in development, you

2 Comments on "JavaScript and MVC, Why When and How?"

  1. George August 24, 2009 at 5:03 pm · Reply

    Using another framwork: jamal mvc for about three years now. It totally cleaned up the js mess i had before

  2. Olle October 14, 2009 at 10:45 am · Reply

    No, because it’s overkill. A lot of applications isn’t of this size that they will benefit from this. I obey the KISS principle – Keep it simple stupid. I could be wrong, but why is that JQuery is the most popular JS framework – it’s simple!

Leave a Comment