Recently gone through many articles explaining single page application. But i am very much confused about the architecture or rather how it works.
There is some thing new called client side MVC implemented by using javascript. Till now i had seen server side MVC architecture. What is this client side MVC?
Where does the client side MVC files are hosted. Is it hosted along with server files similar to typical web application.
What is the role of server side java script like node.js.
What is the flow from end to end.
MVC frameworks are libraries that can be included alongside JavaScript to provide a layer of abstraction on top of the core language. Their goal is to help structure the code-base and separate the concerns of an application into three parts: Model - Represents the data of the application.
JavaScript now has a number of frameworks boasting support for MVC (or variations on it, which we refer to as the MV* family), allowing developers to easily add structure to their applications without great effort. These frameworks include the likes of Backbone, Ember. js, and AngularJS.
ASP.Net MVC is a server side framework. (An alternative is ASP.Net WebForms: your events are posts to the same page, abstracted to seem like desktop application events.) If you want, you can output data as JSON or XML and use this with a client side JavaScript framework to update your views.
A controller is a function you write to control your data. With a self-written controller, you can modify data anyway you want: Convert to upper case.
Client side MVC means that a MVC framework is built entirely on the client side. So the server only delivers data to the application. The binding of the data to the models happens client side.
An example of a framework that implements this principle is AngularJs Another one is Ember.
Node on the server side has nothing to do with client side MVC. The data delivered to the webapp could be delivered by any technology capable of doing that.
Nodejs is often used to run client side development tools and run tests. For example, the development server that comes with the AngularJs tutorial is build on node.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With