Building in JS using MVC (especially those big apps)

Posted on December 27th, 2010 by thiswayup.
Categories: JavaScript.

This year has been for me learning not only how to improve my site build technical skills but more importantly understanding the best approach to building sites. As part of this I enjoy learning about things such as design patterns and I have a better appreciation of things such as MVC after being on a few projects using different PHP frameworks. What makes it more fun for myself is when I get to see something I have familiar with in a different light, in this case MVC in JS!

I think its definitely important to approach bigger site builds with a bit more structure and I agree with other people who know alot more than me that site builds are becoming such big buggers, they're becoming apps themselves. This requires the discipline of building in a way that not only do they work and meet the brief (blah blah), but they are also readily maintainable/scalable. This in contrast to the dark past of copying bits of code and hacking it together.

Anyways, I digress a little. I've heard of MVC in JS but I haven't really put too much time into it and just read a great article on it.

Some of the things that grabbed my attention reading it :

  • Number of MVC JS frameworks - I thought there was only one JS MVC framework but it turns out there are loads are there. Ofcourse each build requires its own considerations and there isn't a one size fits all which explains why there are so many.
     
  • Templating - I have moved away from the days of concating all my variables into a string and tend to favor templates. It's good to see there are a good number of choices are there and I hope to use the jquery tmpl to do more!
     
  • Build and minify - With any app, the build process can be a painful one of manually done and quite error prone. The article points out some great resources on how to go about using freely available tools such as Ant to help script out the build process such as concatentating, minifying and testing. Reminds me of the days when we used Nant to do our .net apps :)

So do check out the article, it's very well written and no doubt I'll be using it as a reference if I get the chance to build any bigger apps!

Building Large-Scale jQuery Applications

0 comments.

Leave a comment

Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.




Sky customer services phone number