Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google AngularJS Framework - Worth the risk?

I have been asked to build a small web application for one of our clients and think it might be a good opportunity to try out a different framework for building web applications. Most of the applications we build are based on asp.net web forms and we have no yet done anything in an MVC architecture but I am eager to start building web applications in a more structured manner with the right tools.

I have been researching things like asp.net MVC and the likes which look quite good but I am wondering is there anything to be said for using something like the Google AngularJS Framework.

If possible I would still like to be able to write my server side code using c# and I have not researched AngularJS enough to know if this is even possible, although I assume I could use web services.

Has anyone had any experience with developing an app using AngularJS and if so, how was it and can you point me in the right direction for some tutorials?

like image 622
TGuimond Avatar asked Oct 04 '11 15:10

TGuimond


People also ask

Does Google still support AngularJS?

The countdown has started! You may already know it, but by the end of December 2021, Google will no longer support AngularJS. If your applications use this framework, it's time to consider a quick code migration for your projects to Angular.

Does AngularJS have future?

AngularJS support has ended, as of 31st Dec 2021. However, all AngularJS applications that work now, will continue to work in the future.

What is wrong about AngularJS?

Problems with people. Firstly, since the framework is overcomplicated, not many developers really know it well and it is hard to find such developers is very hard. Secondly, server developers won't understand what is going on front-end and won't be able to read the code at all.

Is AngularJS still relevant?

Even though the question «Is AngularJS dead?» arises here and there, many websites and web projects still use the framework. According to 2020 data, almost 370,000 websites around the world use this technology.


2 Answers

We have been developing a port of a Swing fat-client application in AngularJS for the last couple of months and I think it is worth recommending. As far as learning resources go, check out the official project site (and be sure to read the tutorial) and the mailing list (the authors are very helpful).

The good stuff:

  • great testability
  • the two-way data binding is a very powerful feature, and it can be extremely helpful once you "get it"
  • IMO the AngularJS templates are much less brittle than using data- attributes or "special" CSS classes to mark elements that do something
  • it greatly reduces the need for using jquery plugins, because implementing that functionality in AngularJS is very easy (stuff like trees, tabs, accordions, etc.)

The bad stuff:

  • the learning curve seems pretty steep (I didn't have much of a problem, but I've seen some people struggle with it)
  • validations in AngularJS suck for the time being (a new implementation is on the way)
  • not all libraries/jquery plugins play nicely with Angular and usually you have to wrap them
  • the API is still being polished, so expect breaking changes (not a big problem with frequent releases and very good changelog, though)
  • performance is OK up until several thousand bindings on a page - most of the time this is not a limitation, but there are cases when this could be a problem.

Some pointers (if you ever decide to learn AngularJS):

  • some people really overuse widgets. In my experience, it's much better to use HTML "partials" + services, and only use widgets sporadically.
  • read source code of the library - it's the best place to learn stuff about angular
  • no DOM manipulation in services/controllers
  • if you use css classes to bind to events, you are doing it wrong
like image 50
psyho Avatar answered Sep 20 '22 15:09

psyho


+1 @psycho's answer

AngularJS is client-side framework, so you can use any language on the server. It's designed to work well together with jQuery, with big emphasis on testing...

Here are some resources you might find useful:

  • TUTORIAL: http://docs.angularjs.org/#!/tutorial
  • API DOCS: http://docs.angularjs.org/#!/api
  • Developer Guide: http://docs.angularjs.org/#!/guide

Some example apps:

  • http://cburgdorf.github.com/angular-todo-app
  • http://www.fluid.ie/angular/calculate/
  • http://hookercookerman.github.com/angularjs-todos/
  • http://paul-hammant.github.com/StoryNavigator/navigator.html

Adapter for SenchaTouch: https://github.com/tigbro/sencha-touch-angular-adapter

Adapter for jQ Mobile: https://github.com/tigbro/jquery-mobile-angular-adapter

Feel free to ask any question on mailing list !

We are still in beta, but there are already several internal apps at Google, powered by AngularJS.


UPDATE (26th July 2012):

AngularJS v1.0 has been released.

For some public AngularJS-powered apps, check out http://builtwith.angularjs.org

like image 44
Vojta Avatar answered Sep 19 '22 15:09

Vojta