5 ms·
I must be in a minority, but I find AngularJS inelegant. I am back to Backbone and its simplicity. Angular tries to solve declaratively what could be better sol
by jeswin 13y ago
I must be in a minority, but I find AngularJS inelegant. I am back to Backbone and its simplicity. Angular tries to solve declaratively what could be better solved with JS, HTML and your favorite template engine.
- ganarajpr 13y agoThe point is why do you want to write things from scratch each time you start a new project? That is a huge waste of time and also a huge waste of resources ( money ? ) for whoever is paying for the project.
- iLoch 13y agoScratch? Use Yeoman.
- efdee 13y agoDoes anyone use Yeoman for serious projects? I've tried it, but in the end you just end up subscribing to someone else's idea of a good app structure. I found myself constantly rearranging everything. Then again, I'm really not a big fan of "code generation" tools.
- iLoch 13y agoMeh, I find it to be useful. Of course it doesn't always get you to where you want to be - but you can always create your own generators as an easy way to bootstrap your own projects.
- lobo_tuerto 13y agoI think it's immediate value is in boostraping new projects.
- WalterSear 13y agoI clone the generator repos that I use mostly, and have set them up the way I want, but yes, it's primary value is bootstrapping new things, obviously.
- Bahamut 13y agoWe're using it in a big app right now and have been happy with it in general.
- jerf 13y ago"Angular" or "Write things from scratch" is a false dichotomy.
- afandian 13y agoI see the dependency injection as the solution to a massive problem I couldn't see an obvious solution to with Backbone.
- camus2 13y agoYou dont need angular for dependency injection , there is a lot of JS IoC containers on npm already.
- Glide 13y agoI think that might be the main reason I find angular attractive when compared to mostly DIY approaches with backbone. Sure I can build a best of breed utilizing a wide range of libraries together with backbone... Well I would think I am intelligent enough to do that but in the end it feels like it's based a lot more on opinion rather than fact. I rewrote an admin backend in half the time it took someone to do it in backbone with their choices of libraries. YMMV, but I am loathe to get into another discussion of which templating library to use, which UI widget things, etc., etc. Just let me build it already! And take care of 90% of the annoyances for me.
- camus2 13y agoI prefer building my own stack. Refactoring is quicker down the road has I dont have to rewrite all the application.With angular you'll just be writing Angular plugins when things change ( and they will , Angular is not the ultimate JS framework ) ,you'll be stuck with Angular or waiting for an update, i'll just be swaping a layer in my application ).
- v13inc 13y agoWhat problems do dependency injection solve for you? I haven't had a chance to use it yet, and I've always been curious about its benefits in real projects.
- camus2 13y agoEverytime you pass arguments to a constructor or a method,if the parameter is itself an object you will call a method on (message passing), you are doing dependency injection. So it's a fancy word for a basic idea. The OP is talking about an IoC container or a service locator. which is a tool that will wire up and build objects on demand according to a definition. The alternative is writing factories( ex : document.createElement("DIV") is a factory method ).
- HNJohnC 13y agoI felt that way until I actually used it.
- treeface 13y agoIn practice, compartmentalizing sections of a page into declarative chunks of JS and HTML actually helps keep things really organized. When each link in a nested directive chain is completely independent of one another, it makes refactoring a problematic area much simpler. And of course all of this makes unit and functional testing much simpler.
- Bahamut 13y agoAngular's declarative approach makes it easier to separate angular out if you choose to switch frameworks for whatever reason. Personally, I've found backbone pretty disgusting, although perhaps better than vanilla js/jquery.
- camus2 13y agoCheck React or Ractive for the view layer , they are awesome.