While building a multifaceted and interactive web application, architects and developers are usually met with the challenge of performance, maintainability and modularity and are in constant need of a set of frameworks that can act like a backbone to their project and help them knock-out all the glitches in the process.
These frameworks provide a multitude of functions and help make it easier and more achievable for developers to create responsive, fluid and maintainable interfaces for web apps.
There has been a great surge in MV* frameworks over the past few years and the list of new and stable frameworks continues to grow each year.
The most established frameworks are Backbone.js and AngularJS, while the ones that have experienced the most growth in the last year are AngularJS, Meteor, Ember.js and Knockout.
This framework typically works by first reading the HTML page and then interpreting the custom tag attributes as a directive to connect the input and output parts of the page to a model represented by standard JS variables.
It is also worth noting that the values of these variables can be manually set within the parameters of the code or can be retrieved from JSON resources.
The rationale behind building AngularJS is the common belief that declarative programming is ideal for creating user interfaces and connecting components together, whereas imperative programming is well suited for business logics. All this innovation does not, however, rule out the flip side of the framework.
When it comes to the pain points, AngularJS is largely criticised for the complexity of the directives API. What confuses developers is the concept of ‘Transclusion’ which makes it challenging for them to understand the underlying concepts of compiling functions, pre/post linking functions and all other configuration settings for directives.
The newest addition to the flock, Ember.js, is the modular framework that is now used for creating scalable single-page applications by combining common idioms and best practices into the framework.
It is capable of inferring much of the configuration on its own and can create a controller for your resource, even when you don’t define one yourself.
However, what concerns developers is the fact that much of the content and examples in Ember.js no longer work and this confuses them when first using the framework.
Using a simplified model of even-driven programming, developers can build highly scalable web servers using callbacks to notify them when a task is complete.
The drawbacks of using Node.js is the tonnes of nested callbacks and the use of single thread. It means that, unlike pre-emptive concurrency, programmers will have to figure out how to deal with concurrency. Some issues with regard to API stability have also been reported by developers.
Another challenge with using Node.js is the newness of the framework. Not every developer is well aware of the pain points of working with a large-scale Node.js application until the language is thoroughly road tested and made error free.
Developers with an MVC programming background in Ruby, Python, Java, C# or any other object- oriented language may find Ember. js’s holistic approach a viable option for application programming.
For those who prefer to work in the non-blocking, even driven I/I paradigm, Node.js is the best.
Lastly, AngularJS’s innovative approach makes a lot of sense to developers who are working for quick prototyping projects and large-scale production applications.
So, which is your favourite framework? Do you have any points to share? Please feel free to leave your comments below and thanks for reading!