Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What makes Angular and Backbone different from jQuery?

I have been using JavaScript and jQuery for quite a while now and want to extend my skill set further, during my search I came across two popular names Angular and Backbone and while reading about them I found one line common in both them which somehow also seems to be their USP i.e.

It is designed for developing single-page web applications

This makes my confused.

  • What is that I cannot do with JS or jQuery and I would require these?

  • I have created web application on single page, where users can perform CRUD operations on single page through asynchronous calls so why so much importance of for these others libraries?

And as a middle level web developer who has have good hands on JS is it right path to move to these two or here is something else I should look into before these?

Please help?

like image 748
Maven Avatar asked Dec 04 '13 12:12

Maven


People also ask

How is Angular different from jQuery?

jQuery is a Javascript-based library that is primarily used for DOM manipulation whereas Angular is a front-end development framework that is used for creating single-page applications. Angular employs two-way data binding to adapt and extend HTML codes.

What is the difference between Angular and backbone JS?

AngularJS is a framework. BackboneJS is a lightweight easy-to-use library. AngularJS could be a UI system in JS but based on Typescript. BackboneJS could be a UI system in JS based on MVC (Model View Controller) design pattern.

Does backbone use jQuery?

By default Backbone will use: jQuery, // Zepto, or Ender; but the `setDomLibrary()` method lets you inject an // alternate JavaScript library (or a mock library for testing your views // outside of a browser).

How Angular is better than jQuery?

Angular promotes all code being modular, reusable, and easily testable and also includes a single-page app routing system. It is important to note that jQuery is a library of commonly needed convenience/cross-browser methods, but Angular is a full featured framework for creating single page apps.


1 Answers

Structure.

In an ongoing project that started about 4 years ago we built the front end with jQuery. We were able to do just about everything that we needed creating several single page applications that were quite functional.

As the project progressed and the code base grew we started experiencing some major problems with maintainability of the code. We ended up with hundreds or thousands of lines of JavaScript code per page in a tangle that was almost impossible to navigate. This could have been avoided if we were more careful of course but at the time we focused on making sure the back end architecture was robust.

Many years ago the community learned that code needs structure to be maintainable. We developed MVC patterns, multi-tiered applications etc. But JavaScript was never a big player in the field and we largely ignored it.

Over the last 6 months or so we introduced Angular into the project and started sorting out some of the mess in the project. The results are remarkable. Not only is the code simpler and easier to create, the structure makes it easier to implement tests, easier to maintain and generally a huge improvement over what we had before. We still use jQuery but now we have been burnt by the lack of structure and know a thing or two about the architecture of a JavaScript application. Angular and its like provide you with the tools to architect a good application.

like image 149
Vincent Ramdhanie Avatar answered Oct 20 '22 05:10

Vincent Ramdhanie