All these 3 libraries allow to manipulate history object. OK, backbone does a lot of more but let consider only it history part.
What is a difference between these 3 implementation?
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.
There is only method named "start" can be used to manipulate the Backbone. js history.
Backbone. js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
Backbone is a JavaScript MVC library and that's a key difference. In the JavaScript MVC context, a framework usually means that you need to configure your code to get things done. Maybe you need to add some code to your HTML page, or give a page element a certain ID class name.
History.js is more of a polyfil for browsers that do not natively support HTML5 pushState and for ironing out the differences between different browser implementations of pushState.
Davis.js is a routing layer, primarily on top of pushState (although this can be switched out easily to hash routing). It gives you a simple api to define and respond to routes within your application.
Backbone's router is similar to Davis, however it tries to automatically fall back to hash based routing when pushState is not available.
As the author of Davis I'm slightly biased but I think the Davis api is slightly nicer and more powerful than backbones. I also think that trying to gracefully handle falling back to hash based routing when pushState is not available is not worth the effort and complexity that it can introduce.
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