Over a million developers have joined DZone.
Platinum Partner

JavaScript Libraries are Not Your Front-End Architecture

· Web Dev Zone

The Web Dev Zone is brought to you by Stormpath—offering a pre-built Identity API for developers. Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management.

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.




The Web Dev Zone is brought to you by Stormpath—offering a pre-built, streamlined User Management API for building web and mobile applications. Plan On Building User Management? Buy It Instead. Download Our White Paper To Learn More.

Topics:

Published at DZone with permission of Gil Fink , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}