Reputation: 1162
Looking at the sample Spring Web MVC application PetClinic https://github.com/spring-projects/spring-petclinic as an example.
Application typically broken up into 3 different physical tiers and within the server side it is broken into different layers:
Client side: (JavaScript/CSS etc...)
Server side: - Web - Service - Repository
Database:
Using above application as an example what constitutes front-end and back-end?
I always believe everything within the server side (web controllers/service/repositories) + database makes up the backend. But one of my colleague argue that only the database is what 'back-end' is.
Another of my colleague says only the 'Service & Repository' layers constitutes backend and he argue that stuff inside the web layer (consisting of JSP/Thymeleaf templates, form-backing objects, Controllers) is considered 'front-end'
Upvotes: 1
Views: 1447
Reputation: 141
In simple words I would say whatever you want display to user irrespective of technology will go in View (Like HTML forms or any informative HTML page). Regarding backend i would say you want some data to display on Frontend (View in SpringMVC) so you will do any preprocessing which includes getting data from another systems through web services and all , it will go in the backend part.In the same case if you are getting data from DB you can say its backend as well.
Upvotes: 0
Reputation: 22254
jsp
files in the petclinic app are used to generate html
files that are served from the server to the client. These files allow the user to view the model's data.@Controller
.src/main/webapp
as the front-end and everything else the backend. Other people may disagree.JSON
documents to a mobile app for instance. This app may implement the MVC pattern itself with its own frontend and backend.Upvotes: 1