There are a lot of Javascript MVC frameworks available these days (Backbone.js, Cappuccino, Ember.js, GWT, etc), each having their own positives and negatives. My questions are ;
Please let me know in very basic practical terms..
Today the MVC pattern is used for modern web applications because it allows the application to be scalable, maintainable, and easy to expand.
The MVC architecture is very useful in JavaScript as it offers more than allowing developers to create modular code. For instance, since the Model in MVC returns data without formatting, the same components can be called for use in different interfaces. This allows for code reusability.
Major drawbacks of MVC in react js include manipulation of DOM which is very expensive and also at the cost of time and memory wastage. For implementing MVC, knowledge of multiple languages and technologies is required which requires enormous manpower having different expertise.
MVC gives architectural benefits over standard JavaScript - it helps you to write better organised, and therefore more maintainable code. It's a pattern that has been used and extensively tested over multiple languages and generations of programmers. Chances are, if you want to do something, someone else has already done it, so using a time-tested pattern helps you leverage the pattern's benefits, without making the mistakes that earlier programmers made, thus saving you time and effort
Backbone is not based on jQuery, but it is compatible with jQuery and gives you some goodies if you use it, e.g. in Views it gives you a cached reference to the views container in $el. But if you use Zepto instead of jQuery, $el is wrapped in Zepto functionality not jQuery.
YUI has MVC components and is completely not based on jQuery ;)
One decides which framework to use based on the needs of the current project, the documentation for the framework, the community it is based on, etc. The same as choosing which JS library to use, or which backend framework to use, etc. What's right for one person/project may not be right for another person/project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With