* 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.
the code is organized by component, which can be further divide as much as you see fit
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
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.
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.
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?