JavaScript Frameworks

JavaScript frameworks

What is JS-framework and why is it needed?

JavaScript frameworks are tools for building dynamic web/mobile/desktop applications in Javascript. As with any other instrument,
developers resort to using JavaScript frameworks where it is impossible/very difficult/very long to complete the task by conventional means.

In the vast majority of cases, frameworks are used to write the so-called Single Page Applications. Those. everything that goes on the site goes on one page, without a direct transition from it.

With their help, you can develop both full-fledged sites and functional modules (various online tools). Of course, full-fledged frameworks are better suited for the first task, and for the second it is recommended to use lighter-weight frameworks or libraries.

Let’s talk a little about frameworks first. They provide a clear structure of the application and are implemented using so-called “design patterns” (a concept that has migrated more from the backend, but clearly takes place in front-end development using js frameworks). The most widely used patterns are MVC (Model-View-Controller), MVP (Model-View-Presenter) and MVVM (Model-View-ViewModel). There is a huge amount of information on the Internet that describes each of them in detail, and the disclosure of this topic is not the main task of the article, because whoever is interested can independently familiarize himself with these concepts.

Advantages of building an application on a JS framework:

  • you can easily implement SPA (Single Page Application);
  • using a js framework obliges us to have an application structure (let’s say a resounding “no” to spaghetti code);
  • the code becomes noticeably smaller and cleaner, which positively affects the speed of development, as well as the support and elimination of errors in the application code;
  • the presence of the structure implies the modularity of the application, and this makes it easier for several developers to work on the application at the same time;

The next advantage comes more from the use of javascript itself, but is significantly enhanced when using the framework: the ability to quickly create a mobile and / or desktop cross-platform application from the web version using systems like PhoneGap or Apache Cordova.
Of the significant shortcomings, only temporarily incomplete support by search engines can be distinguished, but this task rarely coincides with the task of implementing SPA (Single Page Application), especially since the leading search engines (at least Google) have almost completely solved this problem.

A lot of applications on js frameworks have already been released and this segment is only gaining momentum. For examples of completed projects on Angular.js, for example, the whole site is highlighted, lists of sites and applications using other frameworks can be found below on the main pages of the official sites: backbone.js, ember.js.

Javascript libraries

Finally, a few words about the above mentioned js libraries. The most common are jQuery, mootools, knockout, polymer, reactjs. They greatly simplify the process of writing non-complex separate functional modules implemented in javascript, but they are not and never will be js-frameworks. Yes, they fit perfectly into a ready-made site, and yes, they are used by the same js frameworks for working with the DOM (for example, Ember.js). But this is where their functionality and usefulness end: they are not suitable for fully implementing single page applications.

Leave a Reply

Your email address will not be published. Required fields are marked *