1

From what I understand client side MVC is when most of the data processing is done on the client side. AJAX is when a part of a webpage is updated instead all of it. That's all I know about both.

All the explanations I find online don't make sense to me (since I"m a beginner). Would someone mind explaining? Why is there a distinction between the two, they seem like the same thing.

tereško
  • 58,060
  • 25
  • 98
  • 150
user3377890
  • 67
  • 1
  • 6

2 Answers2

0

They are not the same. 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.

This is extracted from What is client side MVC and how is it implemented in JavaScript?

Ajax is not a Framework per say. It was invented by Microsoft in early days to simply make asynchronous calls to a server to get data without refreshing a page. So if you're working on a Greenfield project and would like to have a rich client side App or SPA (Single page Application). You don't need Asp.net MVC. Angular JS will suffice. If you're working on a brownfield project, you might use Ajax to make your app more client side friendly. Also, you might enhance it by a client side framewrok such as angularJs. It's up to you.

Here is an example of using Asp.net MVC app with angularJS: http://www.dotnetcurry.com/showarticle.aspx?ID=1000

Community
  • 1
  • 1
Oualid KTATA
  • 1,116
  • 10
  • 20
0

Looks like you've answered your question partially. MVC is a software architectural pattern which is used in implementing User Interfaces. So this is basically used as a pattern which allows you to follow the framework and make it easily understandable. AJAX (Asynchronous Javascript and XML) is used on the client side to create Asynchronous Web Applications. Using this, you can make calls and get or send data from the client side on to the server side on the background. This helps in making the User Interface experience of the user much better.

So, for instance, let's say you make a login page with a username and password. After the user clicks "login", let's say it takes 2 minutes (I know, this is an extreme case) to actually login the user and make use of their credentials. If you use the classic MVC, the user might not be able to do anything during these 2 minutes (Because you're doing all the data processing/data binding on the client side). But if you use AJAX, you can make all of the data processing in the background, and in these 2 minutes, you can make the user play a game/do something else. AJAX is mainly used in cases where you want to get some data from the server without refreshing the view (Remember, Asynchronous).

NV Bhargava
  • 373
  • 2
  • 10