Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Angular is helpful because it promotes things like loose-coupling, dependency injection, modularity, re-use and the factory pattern. I agree that two way data binding was oversold. It isn't a bad thing, just not the most important thing about angular. No doubt angular itself, and other libraries, will evolve. But I don't think angular is a mistake. It encourages developers to design applications the right way.


Angular is helpful because it promotes things like loose-coupling, dependency injection, modularity, re-use and the factory pattern.

Modularity and code re-use are like apple pie and motherhood. The real question is, do you need dependency injection and the factory pattern to get those things? In JavaScript, the answer is no you don't, because you have closures and first-class functions. Patterns like DI and Factory were invented to compensate for the deficiencies of Java, they are superfluous in JavaScript.


I have to agree.. factories and IoC/DI in JS just seems like such alien overkill in the space. Yes, it's great when you need to create a testable system in a strongly typed world like .Net or Java, but in JS you can simple spike your module loader for unit testing your modules in certain conditions (proxyquire and the like).

Even in those platforms (.Net and Java) unit testing is such a miserable experience, and adds so much complexity it's easier to just skip unit testing in favor of simpler classes/methods and better integration tests.


Agree - i think 2-way data binding is a more superficial benefit vs the other benefits you mention




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

Search: