Hacker News new | past | comments | ask | show | jobs | submit login

I agree. I think when people say "large" they mean that spaghetti jQuery code wasn't working anymore. I was able to get to 10K LOC with a well thought out hombrew jQuery framework (Angular, Backbone, etc weren't available when we started), and it was still fairly maintainable. As I approach 20K lines of code it is getting out of hand. I would like to switch the project o Angular.

I'd love to hear more about the problems/questions you are having. Have you found answers to some? Here's what I have come up with. How does it compare to what you are doing?

"can views do I/O" I've put file I/O in a controller. If I would have needed to share it across multiple pages, then I would have put it in a service

"does a view own his model" I have model classes defined outside of Angular. Services access my API to create new objects (of types defined by my models). Controllers request data from the services. The service figures out if it already has the data or if it needs to call the API.

"how deeply should views nest" I often wonder how much I should be breaking up my views into smaller view. For the moment, I only create "subviews" if I am going to reuse the subview in another view. This has lead to some large template files. I may need to reconsider if they get much bigger.

"should my models be tree-like or rectangular" I don't understand what you are asking. What's the difference?

"can my contracted designer write arbitrary markup with arbitrary UI widgets or does the framework not like that" Again, I'm not sure what you are getting at. Arbitrary markup and UI widgets as apposed to what?




i do believe i have answers to all those questions; its really something that i need to write an essay about, a short blog post or HN comment can't do it justice. If enough people upvote this or ask me on twitter, maybe I will write something up this week.


You should really do this. The Angular docs are OK, but don't make any discussion about these larger questions. There some scattered posts on the mailing lit about different approaches, but that's it.


to me, 'large' in th context of evaluating whether your project would benefit from a more heavyweight framework like ember or angular means 'lots of objects on the page'. I've got a web app in backbone that doesn't do any tricky js, isnt too many LOC (yet!) but now I'm wishing I'd used ember because of the number of full feature objects I'm representing on each page.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: