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

Hey, it has a cool name and it's made by Facebook. It must be state of the art tech, right?

Trolling aside, Flux really doesn't bring much to the table. It's trying to solve the pain caused by two-way-binding by forcing state to flow in one direction through an event bus, reinventing MVwhatever along the way.

You can already do this stuff in Angular (et al) if you stick to a few firm rules for how to structure your app.




Don't blame you if you don't have time nor motivation to respond, but care to share a 2 min. description of those rules?

I'm a fairly new developer working in my first post-uni role and we're starting to rack up a lot of Angular code and I'm not sure if I'm structuring things right as far as events vs $watches etc.


A few off the top of my head:

* Use ui-router. Build your app with nested views.

* Any duplicate page elements should be directives. Use isolated scope when you can and pass state into directives explicitly

* Keep model state in services. Controllers handle binding data to $scope (one way, from model to view) and handling events from the view




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

Search: