Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

client-MVC vs server-MVC

Tags:

I am looking to get some input from other users on the benefits of server-side MVC. With the power of many javascript libraries. What good purpose does server-side MVC server anymore?

You can easily use client-side MVC with templating and a REST API to make a much more resposive application with less overhead of reloading a whole page for minor changes.

like image 684
Justin Avatar asked May 08 '13 18:05

Justin


People also ask

Is MVC client or server?

MVC is a a pattern in software architecture that doesn't even require to run on a client server architecture (you can use it to write a purely single user desktop app where everything runs on a single local machine).

Is MVC server side or client side?

ASP.Net MVC is a server side framework.

Which is the difference between a client and a server?

Definitions. A server is a sample of software or hardware that serves a specific service to its clients. Web servers, domain name servers, and mail servers are some of the example servers using by all network users. A client is a user program that connects to a server to access a service.

What is MVC client?

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.


1 Answers

The way I see this, the server side MVC remains relevant if you consider the V as your client side MVC wrapped in a black box. The thing is that this is all about collaboration and scalability. The server side MVC continues to fuel the REST APIs (for instance) with the notion that you are technically outsourcing the viewing technology to a separate framework running in your browser.

Since browser is increasingly seen as application development platform, you can export huge amounts of data from your "backend platform" to the client (browser) and then treat the data as a local "database" in your browser allowing fast response time.

Combining these 2 MVC frameworks allows for:

  1. Sparse traffic between server and client thereby decreasing latency
  2. Increasing responsiveness of your web apps by localizing access to more relevant data set
  3. Distributing the load from a single, server side controller to hundreds of browsers

The architecture at work here is very similar to CDNs - content delivery networks! Really it is about localizing data, and bringing it nearer to processing centers.

Having said this, you may continue to make exclusive use of one over another, if you understand the architectural needs of your product. Right tool for the right job.

like image 181
2 revs, 2 users 86% Avatar answered Sep 23 '22 05:09

2 revs, 2 users 86%