A Generic MVC Model in Java
Model-View-Controller (MVC) is a widely used design pattern, especially popular in graphical user interface (GUI) programming. JDK 1.5 introduces parameterized types, or generics. Combining the two allows for a generic imple
Tutorial Details:
Model-View-Controller
The ideas behind MVC are quite old, developed during the 1970s. The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time.
The idea is to break up an application into three parts:
A model that holds part of the current state of the application. In this article the state of a model is represented by a set of properties. A property is implemented as a getter and a setter method, as in the JavaBeans concept.
A view that is, for whatever reason, interested in knowing the current state of the application. A view registers itself with a model as a listener on the model. Whenever the state of a model changes, the model notifies its registered listeners. In GUI programming, a view often does nothing more than display the state of the model through some graphical component.
A controller that changes the properties of the model. When and how a controller changes a property is at the discretion of the controller. In GUI programming, a controller is often something that takes input from the user; for example, a button or a text field.
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: A Generic MVC Model in Java
View Tutorial: A Generic MVC Model in Java
Related
Tutorials:
Java Tip 79: Interact with garbage collector to avoid
memory leaks - JavaWorld
Java Tip 79: Interact with garbage collector to avoid
memory leaks - JavaWorld |
Untangle your servlet code with reflection - JavaWorld December
2000
Untangle your servlet code with reflection - JavaWorld December
2000 |
An open alternative to JSP - The faults of JSP So what's wrong with JSP?
How the template-based, open source API FreeMarker trumps JSP |
Language improvements
and models make
great Java - JavaWorld
Language improvements
and models make
great Java - JavaWorld |
Untangle your servlet code with
reflection
Untangle your servlet code with
reflection |
Implement a J2EE-aware application console in Swing
Implement a J2EE-aware application console in Swing |
JSP best practices
Follow these tips for reusable and easily maintainable JavaServer Pages |
Boost Struts with
Boost Struts with XSLT and XML |
Use Web services
to integrate Web applications with
EISs
Use Web services
to integrate Web applications with
EISs |
Business process
automation
made easy with
Java, Part 1
Business process
automation
made easy with
Java, Part 1 |
Jump the hurdles
of Struts development
Jump the hurdles
of Struts development |
Maybe the future UI design of choice
Maybe the future UI design of choice |
SpeedJG - XML Builder
SpeedJG - XML based Java Swing GUI Builder |
Data Models for Desktop Apps
Data Models for Desktop Apps
This is the third article in a series that presents the prototype of a Java desktop application called JImaging. The first article described the three major Java GUI toolkits: AWT, Swing, and SWT. In the second article, I int |
A Generic MVC Model in Java
A Generic MVC Model in Java
Model-View-Controller (MVC) is a widely used design pattern, especially popular in graphical user interface (GUI) programming. JDK 1.5 introduces parameterized types, or generics. Combining the two allows for a generic imple |
Put JSF to work
Build a real-world Web application with JavaServer Faces, the Spring Framework, and Hibernate
Summary
Building a real-world Web application using JavaServer Faces is not a trivial task. This article shows you how to integrate JSF, the Spring Framewor |
Tarsis MVC Framework
Tarsis MVC Framework
Tarsis is a Java Web MVC Framework that implements ServiceToWorker pattern. |
FreeMarker FreeMarker 2.3.1 an open-source HTML template engine.
FreeMarker provides an easy way to get data from Java servlets into Web pages, and helps you keep graphic design separate from application logic. To use it, you encapsulate HTML in templates. |
Struts and Tiles aid component-based development
In the Java world, Struts is one of the best-known and most talked about open source embodiments of MVC. |
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java
Open Source Web Frameworks in Java
Struts
Struts Frame work is the implementation of Model-View-Controller (MVC) design pattern for the JSP. Struts is maintained as a part of Apache Jakarta project and is open |
|
|
|