-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Data Oriented Development with Angularjs
By :

So, why should one choose a client-side JavaScript MVC framework over other server-side frameworks, such as Rails or Asp.Net MVC? Typically, the controller methods of any server-side MVC framework return views (that is, a fully formed HTML). However, there are cases when a view needs some data through Ajax calls (for obvious reasons). In such cases, the question arises as to which controller (method) should send this data. This leads to complexities on two fronts, which are described here:
Ideally, the syntax of the template engine should be close to the actual HTML syntax. This is so that when the designers give developers an updated HTML design, it becomes easy to incorporate their changes.
Similarly, the client-side MV* framework itself gives you some well-defined mechanisms to organize your code as per the MVC paradigm (or whatever convention the framework wants you to follow). So, the view code also becomes simpler and organized. Moreover, every interaction of the view with the server happens through Ajax calls. This too brings uniformity of communication.
Change the font size
Change margin width
Change background colour