Reputation: 319
Struts, Spring and a few other frameworks implement the MVC architecture to separate the representation of information from the user's interaction with it.
Can any one explain or give me a link for that in Java EE?
Without using a framework, how can I create an MVC application and what are the design patterns needed for that?
Upvotes: 9
Views: 19094
Reputation: 114
You can use Servlets and JSP directly. For managing Java EE applications we are using design patterns.
MVC-1 and MVC-2 are design patterns for managing the UI layer. Struts and Spring-MVC are implementations of the MVC-2 design pattern.
Upvotes: 1
Reputation: 3769
To answer you first question: the part of the Java EE framework that implements MVC is called JSF. This provides templates, graphical components (widgets) and much more.
To answer your second question: you don't really build an MVC app without any framework. You may be using Servlets and JSP, but that too is a framework. Java EE in its entirety is a (full stack) framework as well.
As for the third question: this is simple, the design pattern to use for MVC is MVC.
Upvotes: 0
Reputation: 7836
MVC stands for Model View and Controller. It is a design pattern that separates the business logic, presentation logic and data.
This link contains an example to implement it with JSP and Servelet.
Upvotes: 1
Reputation: 1883
Take a look at this presentation, which is part of Beginning & Intermediate Servlet & JSP Tutorials on http://www.coreservlets.com/
Upvotes: 7
Reputation: 13556
I think this is a good tutorial on Creating MVC architecture with servlets and jsp
The main concern in creating MVC architecture is the separation of concerns. You need to separate business layer, presentation layer and controler layer
Upvotes: 3
Reputation: 3019
you can use Servlet and Jsp to create a MVC application without using any framework,
here are some useful links, http://forum.codecall.net/topic/72183-mvc-application-in-java/
another useful example,
http://css.dzone.com/articles/web-mvc-java
Upvotes: 3