-1

My mobile app is heavily reliant on jQuery/jQuery Mobile at the moment - so much so that I do practically every DOM manipulation, traversing my datasets, and lots of animations using jQuery - because it's so easy to do.

I also use jQuery Mobile as the core framework since it's mobile friendly and gives you an interface straight out-of-the-box (albeit a pretty basic, generic looking interface).

Nearly EVERY mobile developer I have spoken to raves on about AngularJS; I thought with the popularity jQuery Mobile seems to be gaining, that would be the choice of most - but I was surprised to understand that very few developers use it, and opt for the AngularJS route.

Demos I have seen using AngularJS don't seem to show a great look and feel - if anything, they don't show any sort of styling.

Our app downloads JSON from a remote data-feed and does various things with it.

So a few questions:

  1. What does AngularJS have to offer - the initial things I have seen seemed to show it looking quite basic?
  2. Is it better than jQuery? Are the two comparable?
  3. Would I gain any benefits from using it?

One downside of jQuery is that it is quite clunky - and it's a bit slow (you really notice a lag when waiting for things to initialise). I intend to read O'Reilly's AngularJS (http://shop.oreilly.com/product/0636920028055.do) - hopefully that'll show me some benefits - but still, the first chapter didn't really show many benefits.

keldar
  • 6,152
  • 10
  • 52
  • 82

3 Answers3

1

jQuery and Angular a completely different things. Please see this answer to better understand the differences.

And please be noticed that angular is using jQuery insight.

Regarding your last question: you will have different approach of building you web app. More well structured in my opinion. But again...it's not comparable things.

Community
  • 1
  • 1
Fedor Skrynnikov
  • 5,521
  • 4
  • 28
  • 32
1

This question was already asked. Please see:

Now to answer your question in particular:

  1. As answered in the link, AngularJs is a development framework while JQuery is a library that targets DOM manipulation
  2. They are not comparable. I use JQuery in my AngularJs solution to manipulate the DOM (in directives)
  3. This is quite a complicated question. I will answer it in the next lines

I am not sure if you would gain benefits but many find that they do (I am currently migrating an application architecture from a in house framework to AngularJs and I think the benefits are obvious

  • better code structure
  • better separation of concerns

I think you should first understand why there are so many MV* JavaScript out there (list of mv* frameworks) and the problem they try to solve.

Note: I am a C# developer and I am in no way an authority on the subject, just started to work on Angular in the last 6 months.

Community
  • 1
  • 1
Andrei Gavrila
  • 853
  • 9
  • 19
0

AngularJS comes with its own version of jQuery called jQlite (http://docs.angularjs.org/api/angular.element) which has many common jQuery methods. This is important to now because if the method you are using with jQuery such as .addClass() is in jQlite, you do not need to include jQuery but instead just include AngularJS which saves memory and increases speed on mobile

IonicFramework (http://ionicframework.com/) is like the jQueryMobile framework but uses AngularJS instead of jQuery for structure, and has a great look and feel than most jQueryMobile themes in my opinion

Olajide
  • 53
  • 1
  • 7