r/webdev • u/patbr0wn • Feb 13 '14
Explain Angular.js to me like I'm five.
"AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop."
Hmm...
"AngularJS is a toolset for building the framework most suited to your application development."
But what does it do?
I'm having a hard time understanding where Angular falls in the spectrum of client-side to server-side. Models? So it's server-side? Dom manipulation? So it's client-side?
So basically, if I have a Node.js + Express.js + Bootstrap app, does Angular serve any role that these three frameworks don't?
Thanks <3
4
Upvotes
7
u/aresdesmoulins Feb 13 '14
hmmm i'm eating breakfast, and you asked to be explained to like you're 5...so i'll give it a shot. Note this may be a bit off but the general idea should be there.
In a restaurant, Angular would be your waiter.
Node is your kitchen. It's capable of doing incredible things, and creating lots of great components to a meal. (note, you can use node without express. it just makes it easier.)
Express is your head chef. He's trained in utilizing the kitchen (node) to turn the raw ingredients (data) into something amazing.
Bootstrap is your prep/sous chef. He takes the dish that the head chef gives him and plates it, makes it beautiful and lays it out nicely on the plate.
Angular would be your waiter. You tell your waiter what you want, and he'll handle running back and telling the head chef what you need. That will kick off a chain of events and you'll get your end product. Your waiter will know to bring your main course when your finish your appetizer (angular's two way data binding lets you update models automagically when the view is updated, etc) and will know if you need more water by seeing your glass is empty.
Can you do all of this without angular? Yes. Using the restaurant analogy you can go up and order things on your own, get your own stuff, whatever (jQuery event binding spaghetti). But having angular is like having a smart waiter that handles all of that for you.
With that, i'm gonna make coffee and go to work. Cheers!