Message Boards

MVC Layers question

jonny smith, modified 5 Years ago.

MVC Layers question

New Member Post: 1 Join Date: 2/28/19 Recent Posts
Hello, sorry bad english, but please help me in my question.

I know service builder builds the persistence, model and service layer. but what about the view/presentation layer?
i did service builder. i got xxx-api and xxx-service.

i made new liferay module, and used the mvc-portlet template, named it xxx-web. so, is this my view/presentation layer with the jsp's and actio/render classes right?
or do i need to make my view layer? im not understanding this. the service builder already creates my models right? so i dont need to do for example a UserViewModel with getters and setters to fetch and set the data to display right? the service builder already does that, and maps to the db right?

or am I missing something?

​​​​​​​thanks everyone.
thumbnail
David H Nebinger, modified 5 Years ago.

RE: MVC Layers question

Liferay Legend Posts: 14919 Join Date: 9/2/06 Recent Posts
The model interfaces in your api jar are meant to serve as DTOs as well as the view objects.

The -web module will be your presentation, Liferay uses good ole JSP but there are other options if you are more familiar w/ those.