AngularJS

Joined
May 17, 2007
Messages
2,469
Reaction score
682
I usually never see threads where we discuss technologies and new innovations relating to software development. So I've decided to make a post on what I think is a really cool JavaScript framework! I suggest you read on if your into web development or want to get into it.

So to roughly explain what it is, AngularJS is a JavaScript framework made by Google! It helps develop websites extremely fast, modular, and maintainable. It is a single page application (SPA) which uses the MVC pattern which has helped make server-side web code very organized, can now be applied to the front-end as well! It's similar to Backbone.js, but I think this has a better potential.

I first learned about this framework when I had to do research guided by one of my co-workers who is a senior systems developer. He suggested that I look into Google's AngularJS framework and I was skeptical of moving over from usinjg jQuery for most of my front-end web development. After giving it a shot, I realized that this is one of the best frameworks I've ever used! And not only that, I get to keep using jQuery for most things that AngularJS cannot do!

I am using BootStrap, jQuery, and AngularJS to build this project at my work, and they all fit so well togeather. I hope you all check them out. And of course, they're all open source!

---

Another really cool thing that recently came out is Presto. It's a hadoop-driven database by Facebook, and it entails massive IO performance.
 
Was first introduced to AngularJS when a friend demonstrated a very similar technology he'd written (essentially a client side single page MVC pattern).

I have yet to delve further into Angular, but when I have the time I'm sure it'll be worth investing a little. :)

 
Angular.JS is a whole lot more than just a javascript MVC library like backbone, it is a full structural framework for web applications. It very powerful and I do enjoy building applications with it and recommend it for anyone looking to build web apps.

However, what is your reason for using JQuery as well as Angular?

JQuery is a tool to augment static pages making them dynamic. While Angular is the opposite of that, it's a whole different development architecture where you start with creating something dynamic from the first steps in your design.

If you are going to start learning Angular, I'd recommend to not use JQuery at all, it's a crutch that prevents most new developers from fully utilizing the power of Angular. It is useful for some things and can be added in later on, but if you are starting with JQuery in mind, you're not really thinking about your design architecture in the Angular way. It may be a little difficult at the start since you're familiar with JQuery and you know how to do something with it as opposed to Angular, but 95% of the time you can do what you want with Angular alone.

I'm no expert, but I got this advice when I started on Angular and it really helped.
 
Last edited:
Angular.JS is a whole lot more than just a javascript MVC library like backbone, it is a full structural framework for web applications. It very powerful and I do enjoy building applications with it and recommend it for anyone looking to build web apps.

However, what is your reason for using JQuery as well as Angular?

JQuery is a tool to augment static pages making them dynamic. While Angular is the opposite of that, it's a whole different development architecture where you start with creating something dynamic from the first steps in your design.

If you are going to start learning Angular, I'd recommend to not use JQuery at all, it's a crutch that prevents most new developers from fully utilizing the power of Angular. It is useful for some things and can be added in later on, but if you are starting with JQuery in mind, you're not really thinking about your design architecture in the Angular way. It may be a little difficult at the start since you're familiar with JQuery and you know how to do something with it as opposed to Angular, but 95% of the time you can do what you want with Angular alone.

I'm no expert, but I got this advice when I started on Angular and it really helped.

Actually, DOM manipulation of elements in AngularJS uses jqLite, which is a subset of the jQuery library... And in fact, there has been times where jQuery was asked to be fully added to AngularJS, but footprint size is a big factor, and they have let users decide if they want to add the full jQuery library, which would override the jqLite provided by AngularJS.

I could have just stuck with their jqLite, but I wanted to also use some of their cool UI animations (such as the datepicker). I find their ngAnimate module restrictive and rather use some jQuery UI features instead.

And to top that, Bootstrap (which I also use in the aforementioned project for work) requires the full version of jQuery. So if you aren't using anything related my use case, then you could very well pull off a good site without the full jQuery itself. Just let nobody fool you into thinking that jQuery is not used by AngularJS itself... look on their documents if you don't believe me.

Just to clearify, using jQUery does NOT skew the actual structure of a angularJS, but instead compliments it. I am still using Angular's ngRoute/ngView module, using their providers, making my own services/providers/factories, using controllers, using directives, and much much more. Like I said earlier, jQuery just compliments my AngularJS application, exactly the same for Bootstrap.... both of which are used on AngularJS's official website itself.

Angular.JS is a whole lot more than just a javascript MVC library like backbone


I never state this. I said they utilize the MVC framework, but it is so much more. And also, Backbone.js is a MVP, which is not the same.
 
Last edited:
I never said that Angular itself does not make use of any other libraries...

According to the Angular documentation: "jqLite is a tiny, API-compatible subset of jQuery that allows Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most commonly needed functionality with the goal of having a very small footprint."

For your use cases you should take a look at AngularUI for AngularJS Angular-UI has bootstrap, a datapicker, "cool UI animations", as well as many other of the most commonly used jQuery UI Elements. Though, it does not have absolutely everything.

In short the point of my original reply was not to say that jQuery has absolutely no place at all in an Angular based app, but that designing an app with Angular should be done with Angular first in mind and jQuery to be used to add additional functionality if there is absolutely no way to do it within Angular.
 
I never said that Angular itself does not make use of any other libraries...

According to the Angular documentation: "jqLite is a tiny, API-compatible subset of jQuery that allows Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most commonly needed functionality with the goal of having a very small footprint."

For your use cases you should take a look at AngularUI for AngularJS Angular-UI has bootstrap, a datapicker, "cool UI animations", as well as many other of the most commonly used jQuery UI Elements. Though, it does not have absolutely everything.

In short the point of my original reply was not to say that jQuery has absolutely no place at all in an Angular based app, but that designing an app with Angular should be done with Angular first in mind and jQuery to be used to add additional functionality if there is absolutely no way to do it within Angular.

What are you trying to say from the quote in the documentation?

And I did very so think that you meant to say jQuery has no place at all in an AngularJS application:
I'd recommend to not use JQuery at all


That is why i brought up the fact that jQuery is indeed used inside the AngularJS framework itself, so not using jQUery is inevitable unless you do not plan to do any DOM manipulation.... which probably won't be a very dynamic website. You need to know a little jQuery to modify DOM elements using AngularJS.

Also, I already stated that jQuery and Bootstrap "compliments" my application, so in no means am I developing using jQUery as a bases.

Anyways, I do use AngularUI, but mainly as a reference. At the time I started the project, they had not supported Bootstrap 3.0, which I am using.
 
You're taking that statement out of context.
If you are going to start learning Angular, I'd recommend to not use JQuery at all


I was only intending to be helpful and give advice that was very helpful to me when I started using Angulart. Advice for a starting user of Angular, that they should try to make their apps without using any jQuery so that they will learn how to properly make use of all of Angular's capabilities without using jQuery as a crutch that can lead to poor design choices for an Angular app.

You've turned this thread into a battle which was not at all my intention at all. I have not once said that you were doing anything incorrect, nor have I attacked you in any way yet you are responding in a very defensive way as if you've been attacked.

 
I have used Angular for a product listing app - I enjoyed using it, pretty easy to pick up and learn. However, one thing I'm not a massive fan of is the fact that it does sway you toward a particular style of writing code (whereas with Backbone, which I used for a more recent project, is a lot more skeletal but essentially allows you to move in a desired direction).
However, as I said, I do quite like Angular.
You may also be interested in this: https://github.com/angular/angular.dart
It's a port of Angular to Dart
 
You're taking that statement out of context.


I was only intending to be helpful and give advice that was very helpful to me when I started using Angulart. Advice for a starting user of Angular, that they should try to make their apps without using any jQuery so that they will learn how to properly make use of all of Angular's capabilities without using jQuery as a crutch that can lead to poor design choices for an Angular app.

You've turned this thread into a battle which was not at all my intention at all. I have not once said that you were doing anything incorrect, nor have I attacked you in any way yet you are responding in a very defensive way as if you've been attacked.

[/COLOR]

Buddy, I'm not attacking you

I just want to prove that you cannot make an application with AngularJS without knowing how jQuery works. If you go back to their site: http://docs.angularjs.org/api/angular.element - You can see, that all the functions in there, are common jQuery functions. And to further prove my point, if you click on one of those functions, it brings you to a jQuery documentation.

Anyways, I understand what you mean by not using jQuery on a structural basis. But I think it will be very clear to users if they try to do so and use AngularJS aswell. It most likely will barf on you.

I have used Angular for a product listing app - I enjoyed using it, pretty easy to pick up and learn. However, one thing I'm not a massive fan of is the fact that it does sway you toward a particular style of writing code (whereas with Backbone, which I used for a more recent project, is a lot more skeletal but essentially allows you to move in a desired direction).
However, as I said, I do quite like Angular.
You may also be interested in this: https://github.com/angular/angular.dart
It's a port of Angular to Dart

That's one thing I do hate about AngularJS... I find some of their modules somewhat restrictive. Such as their ngAnimate and ngRoute modules. For workarounds, I usually just use directives, which allows me to make my own elements and attributes.
 
Glad you brought this up because the section has always seemed quite stagnant; it's always just PHP, PHP, and more PHP and the same newbie questions and answers revolving. I think it's time for the section to wake up to 2013 and stop looking for solutions from 10 years ago!

I haven't had the opportunity to work with AngularJS at work yet but I hear lots of good things about it from co-workers in other projects. Our de facto library for client side JS has been Knockout for some time now but it just doesn't quite cut it anymore when the project gets bigger. It's an awesome tool really and was the perfect choice when my current project started in february however requirements change and software grows and we keep running into some problems, some of them relating to separation of concerns and levels of abstraction - things Angular could help with. Too bad switching the technology, which would pretty much mean complete rewrite of the client side app, would be too big of an investment for our client so we do what we can trying to bring some order into the mess by refactoring pieces on the side as we develop new features. Wouldn't it be nice to know from the very beginning exactly what will be required of the system much later, huh! :)
 
Back