admin管理员组

文章数量:1316393

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 mon 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?

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 mon 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?

Share Improve this question asked Dec 4, 2013 at 12:32 user971741user971741 4
  • Have a look at Understanding MVC And MVP For JavaScript And Backbone Developers – osahyoun Commented Dec 4, 2013 at 12:42
  • possible duplicate of Angular.js vs Backbone.js – fdomig Commented Dec 4, 2013 at 12:47
  • This might be helpful at least from a jQuery to Angular approach. stackoverflow./questions/14994391/… – lucuma Commented Dec 4, 2013 at 12:52
  • Another helpful post on the subject. stackoverflow./questions/18414012/… – m59 Commented Dec 11, 2013 at 6:25
Add a ment  | 

3 Answers 3

Reset to default 7

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 munity 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.

When you are creating larger scale web applications it is wise to check out Backbone, Angular or perhaps Meteor. jQuery supports neat tricks, but it does not help you structure your code in a maintainable way. Larger scale web apps build on jQuery need their own vision on how to separate the code into layers with their own responsibility. The other frameworks give more support.

I would suggest checking out at least one of the libraries. Perhaps you eventually won't use them, but it will benefit how you work in jQuery.

Well Now a days there has been quite a hype about Angular.js and especially SPAs (Single Page Applications). Well to be honest, I had the same question in my mind about a month ago when my team decided to shift from Jquery to Angular.

Whenever it es to Jquery, one of the first thing that es in our mind is the DOM manipulation. While using Jquery we always think of manipulating the DOM. Show/hide elements, animating elements, getting data from tags you name it. But Angular offers something more than that. It offers you an architecture, a way to structure your applications at the front end.

So whenever you go for Angular.js, change the way you think about creating web applications (and believe me its worth it). Most of Angular's structure uses the concept of Dependency Injection which is a neat way to maintain your code.

Backbone is only a library whereas Angular.js is a plete framework to create and manage Single Page Applications

Talking about the fact that Angular.js should be used when we are creating large scalable apps, it is true. In my case the team I work with is full of Jquery Ninjas. We have been creating a great app for the last 3 years and believe me it became difficult for us to maintain and debug thousands of lines of Jquery. This is the main reason we have decided to revamp this app into Angular.

Kindly see some of these Helpful links. You will get a better idea.

  1. http://net.tutsplus./tutorials/javascript-ajax/3-reasons-to-choose-angularjs-for-your-next-project/
  2. "Thinking in AngularJS" if I have a jQuery background?

本文标签: javascriptWhat makes Angular and Backbone different from jQueryStack Overflow