4 ms·
I decided not to go with AngularJS, mainly because I want to reuse as much client side logic as possible in future native apps and Angular seemed very tightly c
by purplelobster 13y ago
I decided not to go with AngularJS, mainly because I want to reuse as much client side logic as possible in future native apps and Angular seemed very tightly coupled to browser apps and the DOM. With Backbone find it easier to separate the UI specific code so that I can swap it out and control native UI elements instead, running the js in a hidden WebView. Anyone tell me if I'm wrong.
- marknutter 13y agoAngular makes front-end development much more like native development because it gives you true MVC. Meaning, the views are automatically updated based on the current value of the models. In an Angular controller, you really don't care or even know about the view other than the fact that you're sharing scope with it. The controller just makes sure the models are in the correct state and the view handles the rest automatically, perfectly decoupled. In my experience, this is much closer to how native development works. In an iOS app, you have your view controllers which are responsible for responding to user input and making sure the models are in the right state. The views just automatically update themselves based on those models, much like Angular. So if you're writing your Angular apps correctly, they should be very similar to your native apps.
- bsaul 13y agogenuely curious : how do you manage to keep your views automaticcaly synchronized with the model in IOS ? It seems that your controller's in charge of the two-way data binding, and that it is clearly NOT automatic... contrary to angular.
- marknutter 13y agoCheck out uittableviewcontroller or uilistviewcontroller. With those you specific a data source and the views automatically render based on that data.