I'm looking at settling on my JS toolbox. For some product reasons dojo will be in there. Now I wonder if adding backbone.js makes sense. Do Dojo (which does a few other things - I'm aware of that) and backbone.js overlap or complement? What would be the conceptual differences in overlapping parts? Are there examples that use both together? (I know it is a rather broad question and might show my 2nd level of ignorance)
BackboneJS allows developing of applications and the frontend in a much easier way by using JavaScript functions. BackboneJS provides various building blocks such as models, views, events, routers and collections for assembling the client side web applications.
js is a JavaScript rich-client web app framework based on the model–view–controller design paradigm, intended to connect to an API over a RESTful JSON interface. Backbone is known for being lightweight, as its only hard dependency is on one JavaScript library, Underscore.
It is based on the Model-View Controller framework that binds data, which is abstracted into models, and DOM which is abstracted into views, using events. It is a JavaScript library. Applications of Backbone. js: Following are the applications of Backbone.
Dojo covers a much wider scope than Backbone.js. If you are already proficient with Dojo then the only reason you would want to consider Backbone.js in your toolbox is because it is lightweight. You may or may not like the API difference - it is purely a matter of choice. If you are already using Dojo in a project, then there is really no point using Backbone.js in the same project because Dojo has all you need to build an MVC architecture although at a surfacial level it might not be so obvious. Dojo data stores are powerful and Dijit widgets are designed to be used with Dojo datastores. Using Backbone models for providing data backend for Dijit widgets would be very cumbersome. That is really unnecessary because in Dojo data layer and presentation layer are very neatly decoupled and works excellently out of the box. However if you just require a lightweight MVC structure for your app then Backbone.js might provide you a lighter alternative than using Dojo.But again depending on your app and your requirements one may be more appropriate than other...
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