Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC or Rest or Both

I in the process of designing the server side of a web-based user interface that will be very JavaScript intensive.

I originally thought of going with an MVC solution, but now I am thinking I want to use a REST-based solution such as Jersey or Restlets.

Is this often an one or the other type decision or can they be a combined solution?

Thanks, Mike

like image 862
thecountofzero Avatar asked Jan 29 '11 23:01

thecountofzero


People also ask

Is REST same as MVC?

REST is an architectural style for communication based on strict use of HTTP request types. MVC is an object oriented programming architecture based on separation of the functions of Data Model, Data Presentation and Logical program flow.

Can MVC be RESTful?

ASP.NET MVC is one such framework that provides an inherently RESTful model for building XHTML-based services.

What is the difference between REST API and Spring MVC?

Spring MVC Framework and REST While the traditional MVC controller relies on the View technology, the RESTful web service controller simply returns the object and the object data is written directly to the HTTP response as JSON/XML.

What is the difference between spring boot and Spring MVC?

Spring MVC is a part of the Spring framework that helps in handling HTTP requests and responses. On the other hand, Spring Boot is the extension of the Spring framework and provides a faster way to build applications.


1 Answers

MVC is about how the inner side of your app works.

REST is about how your app "talks" with other apps.

You can combine them.

A lot of modern frameworks actually are MVC based and make implementing REST web services easy: Ruby on Rails, Java Spring Framework with SpringMVC , Django, Backbone.js

like image 160
lbz Avatar answered Sep 29 '22 10:09

lbz