|
Architecture - Comparison |
The current Liferay architecture is
like this...
HTML --> Struts --> Session
EJB --> Hibernate --> Database
Whereas MyPortal is doing this way...
HTML --> Struts --> Spring
--> Hibernate --> Database
The design of MyPortal also comply with the Java Portlet API 1.0 (JSR
168).
|
posted at 4:30PM
+0800, Fri, 27 Aug 2004 by Kelvin Yap |
|
Architecture - Implementation |
For the presentation layer we will use Struts;
for our business layer we will use Spring;
and for our persistence layer we will use Hibernate.
The following diagram shows what this looks like from a high level
when the frameworks are combined.
(extracts from "Wiring
Your Web Application with Open Source Java", by Mark Eagle)
We are breaking down the development of MyPortal mainly into 2 sub-projects,
that are:
- Web Module
- Service Module
The Web Module is ideal for an entry level J2EE developer
(web component developer) to participate. The technologies used in
this module include Struts Action, Struts ActionForm, Struts Tiles,
JSP, Servlet, JSTL, Struts Tag Libraries, Java Portlet API (JSR 168),
HTML, JavaScript and Cascading Style Sheet. In order to make this
module suitable for an entry level J2EE developer, we will not
introduce additional technologies such as Velocity, XSLT, Spring Web
MVC, etc.
The Service Module is ideal for a middle level developer
(business component developer) to take part. The technologies used
in this module include Struts (integration with Spring), Spring (IoC
& AOP), Hibernate, XDoclet, MiddleGen, JUnit and Ant. Newer technology
may be introduced into this module, if it fits the purpose.
For the Implementation of the Service Module, we are following
the concepts as described in Matt Raible's Spring
Live Chapter 2, the very easy to follow, 45 pages tutorial. The
tutorial is available as a free
download, in PDF format.
The tutorial teach you how to create a simple application for user
management that does basic CRUD (Create, Retrieve, Update and Delete).
This application is called MyUsers, which will be the sample application
throughout the book. Its a 3-tiered webapp, with a Struts
Action (UserAction) that calls a business delegate
(UserManager), which in turn calls a Data Access Object
(UserDAO). The diagram below shows a brief overview of how
the MyUsers application will work when you finish this tutorial. The
numbers below indicate the order of flow from the web layer
(UserAction) to the middle tier (UserManager),
to the data layer (UserDAO) and back again.
This application uses Struts as the MVC framework because most
people are more familiar with Struts. The real power of Spring
lies in its declarative transactions, dependency binding and persistence
support (for example Hibernate and iBATIS).
|
posted at 10:30PM
+0800, Mon, 27 September 2004 by Kelvin Yap |
|
|