HTML5 Zone is brought to you in partnership with:

Gil Fink, Microsoft MVP, is an expert in Web development and Microsoft data platform. He works as a senior architect at Sela Group. He is currently consulting for various enterprises and companies, where he architects and develops Web and RIA-based solutions. He conducts lectures and workshops for developers and enterprises who want to specialize in infrastructure and Web development. He is also a co-author of several Microsoft Official Courses and training kits. You can read his publications at his blog: http://blogs.microsoft.co.il/blogs/gilf. Gil is a DZone MVB and is not an employee of DZone and has posted 151 posts at DZone. You can read more from them at their website. View Full User Profile

JavaScript Libraries are Not Your Front-End Architecture

04.29.2013
| 2138 views |
  • submit to reddit

This is not going to be a post about architecture but more about MHO. Lately, I’m asked to evaluate the architecture of small to big front-end solutions. There is big buzz around front-end development and it drives a lot of companies to build client-side solutions without considering how to build them. One of the misunderstandings I’m facing a lot is calling the existence of JavaScript libraries in the solution a solution architecture. Sorry to say that but

JavaScript libraries are not front-end architecture

Every JavaScript library deals with one or more aspects of your code like namespaces/modules/packages in your server-side app. Whether it is jQuery for DOM interaction, Backbone/Angular/Ember/Knockout for MV* and separation of concerns, require.js for AMD or any other JavaScript library, all those libraries solves some common problems.

Take a moment and ask yourself these question regarding your JavaScript apps:

  • Can your app scale?
  • If you remove one of the modules/features in your webpage is it going to break?
  • Do you have reusable components/features in your solution?
  • Are your app parts tightly coupled?
  • Are your modules/features testable?
  • What is happening when a module/feature is in error state?
  • And more

If you answered those questions that might imply that there is a front-end architecture in your solution. If you can’t answer those questions then you might have problems in your solution.

Building big and scalable JavaScript apps is a difficult task and shouldn’t be undertaken lightly. Using JavaScript libraries helps to make the task less complicated but it doesn’t imply that you have an architecture. I would like to hear your opinion about the subject.




Published at DZone with permission of Gil Fink, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)