News for hackers. Stuff that matters.
Re:Angular Restmod – Rails-inspired REST ORM by jnbiche on Sunday August 10, 2014 @12:10PM (#8160025)
Have people had much success using Angular in production for largish client-side apps? The only large Angular client-side apps I've seen don't seem particularly well organized, which is ironic given Angular emphasis on modularization.

I'm about to start work the largest client-side app I've ever done. I had resolved to use Backbone with React, since I've used Backbone a lot in the past and it excels as an organizational tool.

But looking at what's now available in the Angular ecosystem makes me wonder if I could save a lot of time by using Angular and some of its many 3rd-party modules.

I've only used Angular for a couple of small projects. I liked it but it seems a bit overengineered and very Java-like. But this could just be my Java prejudices coming in to play.

Anyone know of a large AngularJS (say 5000+ LOC) app as an example?

Re:Angular Restmod – Rails-inspired REST ORM by nfmangano on Sunday August 10, 2014 @01:54PM (#8160231)
I work on a medium sized angular webapp (10K+ LOCs), and have spoken to large teams in organizations that build their applications using angular that have 100K+ LOCs, but have not seen an open source application on this scale. Some problem/solutions I've seen:

* Programmers split work by taking ownership on modules, treat modules by other programmers as black boxes, and use bower with a company hosted server to manage dependencies.

* Some programmers I've spoken to have tried using requirejs or bower to manage dependencies, but most I've talked to dislike the overhead this causes.

* Large apps dynamically load routes on-demand. The core angularjs framework is not built for this, but numerous hacks have been put forward by the community to handle dynamic loading of javascript modules, and honestly, it's not that bad. Thankfully, built-in support for dynamic loading of components is on the angular roadmap.

* Personally, I annotate my files such that, for any dynamically injected reference, the reader can directly navigate to the source file. Google closure syntax, browserify, and requirejs also provide this support.

I hope those anecdotes help.

Re:Angular Restmod – Rails-inspired REST ORM by randall on Sunday August 10, 2014 @12:15PM (#8160035)
We use it for two separate apps that are both largish, and one baby app we expect to continue to grow in size. Code organization gets simpler if you use a fractal approach where each module follows a convention which you fractal down as much as needed. That typically mirrors the angular style much more efficiently than a rails style approach, for example.
Re:Angular Restmod – Rails-inspired REST ORM by justysebitcoin on Sunday August 10, 2014 @12:40PM (#8160076)
I'd like to learn more about what you mean by fractal approach --- would you expand on it? thanks
Re:Angular Restmod – Rails-inspired REST ORM by lintaho on Sunday August 10, 2014 @12:47PM (#8160101)
take a look at this style guide: https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDz...

the code is organized by component, which can be further divide as much as you see fit

Re:Angular Restmod – Rails-inspired REST ORM by kvcrawford on Monday August 11, 2014 @04:14AM (#8162411)
We're at 32,809 LOC in an app we're working on (although that includes tests and the Grunt build system). We operate at scale, and there's a lot of revenue at stake.

To me, a huge part of Angular is the tools that it provides you to organize your code. But you have to have discipline and good practices to keep things organized. It's not RoR. If you do abide by best practices, then it's a pretty good experience IMHO.

We're also using Backbone for our model layer, thinly wrapped in Angular to use $http and make it injectable. Backbone's collections & models are way nicer than anything else currently available in the Angular ecosystem.

Angular 2.0's roadmap looks like it will finally change that, delivering a modular "offline-first" model layer that sounds really kick-ass.

tl:dr; go for it

Re:Angular Restmod – Rails-inspired REST ORM by royka118 on Sunday August 10, 2014 @12:53PM (#8160107)
My companies app http://cloudfindhq.com (not open source, so can't see the source code). We have 5 apps, but originally there was only 3 spent some time this week refactoring the code base to make it better structured. Followed the angular generator for yeoman as an example project structure

I think messy code bases can happen quite a lot in angular because it's so flexible, so always need to keep the app structure in mind when programming.

Now our structure is like this

App/ Directives/ Controllers/ Filters/ Tests/ App.js

I think with angular just need to find a structure that works and stick with it, as long as it's consistent it probably doesn't matter.

Re:Angular Restmod – Rails-inspired REST ORM by psgibbs on Sunday August 10, 2014 @01:20PM (#8160160)
We use it for our core app, and now have a bit over 10K lines of application code.

Our general strategy is to organize the app by functional areas, each area of which is organized similarly to how most angular sample projects are: with a directives.js, controllers.js, services.js, etc. We use ui-router to tie this all together.

Re:Angular Restmod – Rails-inspired REST ORM by bdcravens on Sunday August 10, 2014 @06:30PM (#8160978)
I know the BigCommerce integrated app experience is an Angular app.