
Ask HN: Using AngularJS 1.x in production? - 64bitbrain
Hello HN,<p>I am planning to re-write my web app in AngularJS 1.x. Currently I am using jQuery and it had worked fine so far. What are the benefits of using AngularJS in production over jQuery? Are you using it? Do you see a significant improvement in performance, etc..?
======
flignats
I use it in an enterprise production application.

Angular includes a jquery lite library and can be used within your angular
app. It's has a learning curve, but once you understand the fundamentals of
Angularjs the benefits become pretty clear.

Some common jquery practices are made really easy with Angular (hiding/showing
content, animations, applying styles conditionally). Plus, as a primarily
front end developer it has expanded my development abilities (can create full
stack applications, mobile apps more easily, ect).

And yeah, maintainability of your code should be easier with AngularJS.

~~~
64bitbrain
Precisely! I have been going to through the documentation and it amazes me
every time I come across a directive. You are absolutely right,
maintainability of code will be good enough for me to start migrating my app.

~~~
flignats
You can grab a uDemy course on Angular for ~$15 (40% off sale going on today,
I believe). The courses are an easy way to jump into Angular and build simple
applications from day 1. It will introduce you to the fundamentals of
AngularJS and can replicate many o fthe use cases of jquery.

------
humbleMouse
Angularjs and JQuery are two different libraries designed to solve different
problems. Angular is designed to make data persistence very simple by
mirroring your data clientside. JQuery is a tool that abstracts lots of common
javascript tasks.

I think you should do some more googling and reading up about Angularjs. This
is an apples to oranges type of comparison.

~~~
64bitbrain
Thanks. Yes, I did read few things about Angularjs, mostly the bi-directional
binding. Which is kool btw. I wanted to know if someone here is using
AngularJS and what are their experiences.

------
karmajunkie
I've shipped a few angular apps, and for my money I'd bet on React these days.
If you do end up going the angular route, i'd probably think long and hard
about starting with 1.x instead of 2.

~~~
64bitbrain
> If you do end up going the angular route, i'd probably think long and hard
> about starting with 1.x instead of 2.

Thanks for bringing that up. This was next on my list. 1.x or 2?! I feel that
angular 2 is gaining more attention and probably better(I haven't read much),
I would stick to angular 1.x.

------
alistproducer2
Maintainability would be the biggest benefit. The first question I would ask
is why do u feel ur existing design is no longer suitable?

~~~
64bitbrain
Good point. I feel that my jQuery code is getting bloated, when I add more
features to a page. Though, I am still a beginner when it comes too angularjs,
but I find using controller and services would clean up code by a huge margin.

~~~
alistproducer2
If your code base is still actively being enhanced or changed, then, yes,
Angular is a better design than jQuery. jQuery locks you into the DOM
structure, which makes changing the UI or adding features progressively more
expensive as the app grows. Angular pretty much solves this problem by
decoupling the UI from the code governing the functionality.

Edit: I can't help but to shameless plug my AngularJS-like frame work,
TemplarJS. It does most of the same things but I designed it to have a much
flatter learning curve. I wouldn't recommend it for production as it is still
a work-in-progress but take a look at it if you get the time.
[https://github.com/ShamariFeaster/Templar](https://github.com/ShamariFeaster/Templar)

Examples:
[http://templar.bigfeastsoftware.com](http://templar.bigfeastsoftware.com)

~~~
_RPM
This narrative is bullshit because it doesn't matter. At the end of the day,
the client doesn't give a fuck if it's written as a CGI perl script, much less
if it's between a javascript framework and a library.

~~~
alistproducer2
It does matter and your comment is crass and unhelpful.

