Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AngularJS Basics (1.x) Services in Angular Creating New Data in the UI and Saving with a Service

Angular way vs jQuery way

I really appreciate the new course on AngularsJS here at Treehouse. Before starting the course, I was really passionate to learn the framework or at least get to know how modern MVC architecture works in applications. After completion of several steps in the course, I could clearly see the benefits developers can gain from two-way data binding and declarative style of programming. However, as I've started to think more in terms of this framework I have also noticed that some simple things become very complex. Angular forces me to manipulate elements in an application in a very different way, than I would using jQuery for example. Right now I am not talking about simple actions that could be done with "ng-click" and assigned function. For example, I am concerned about DOM manipulation workflow. As a tree house student I have built up the same to-do application with pure Javacript and later rewrote it in jQuery. The logic of adding new entries to ToDo list was very easy - find/select the element you want to manipulate with and then execute an action. I would call it a straightforward way. In Angular I have to split everything in different dimensions, even the simplest tasks. It seems like if you are not developing next Airbnd or Virgin America (check out their latest update btw) type of application, you will end up doing more and actually writing more code with angularJS. This is probably not a very structured question itself, but more of a personal expression and concern about where to move next and not to find myself devoting much time to the stuff I would not use anyway (And with angular this worry is very feasible, because you are also expected to dive into MongoDB, Express and Node). It's fun, because now I start to understand why people sometimes have such a strong preferences over particular technologies.

// Update I forgot to say that the course itself is really great and I like it a lot :D Huston Hedinger

Well put. Thanks for posting this question.

4 Answers

When I was first learning JavaScript I found that the hardest part was to find projects to build that had a purpose or meaning behind it.

Now that I am working full time there isn't a shortage of projects. I will tell you that my first web app had so many lines of code that could've been reduced dramatically if I had angular in my back pocket at the time. My team is moving towards angular on the next big job cause it is such a powerful framework. It makes so much sense to use angular over just JavaScript.

Stick with angular cause it is only becoming more popular everyday. When the right project comes around it will click and you will realize that angular is the better way to go.

Abraham Juliot
Abraham Juliot
47,353 Points

Here's a thorough article on the subject: http://www.ng-newsletter.com/posts/angular-for-the-jquery-developer.html

"This article is intended on illustrating how to think about Angular, not abandoning jQuery. jQuery, the library is a great tool with years of production maturity and can be used alongside Angular and we use it in our production applications as well."

Nice one, I really liked it! Thank you!

I think you answer your own concerns to a certain extent. Is Angular a bit too much for a simple todo list? Maybe. But learning it on a simple app like this will aid you in building the skills to one day build the next Airbnb or Virgin America app.

jrabello
jrabello
17,917 Points

Declarative programming is something really amazing, a todo list app may look like better for you using jquery, and probably you`re right, but there is a lot of power behind declarative programing and MVVM, both will make a HUGE difference when your app grows, jquery is really cool for making some animations but angular should be used for everything else imho