Thursday, January 19, 2006

Learning struts

When starting to learn struts, here is a link with a lot of helpful tutorials.

Java boutique
RoseIndia

Struts is based on the MVC principle:
- The Model: System State and Business Logic
"The Struts framework architecture is flexible enough to support most
any approach to accessing the Model, but we strongly recommend that
you separate the business logic ("how it's done") from the role that
Action classes play ("what to do"). 'nuff said."
- The View: JSP Pages and Presentation Components
"The View portion of a Struts-based application is most often constructed
using JavaServer Pages (JSP) technology. JSP pages can contain static HTML
(or XML) text called "template text", plus the ability to insert dynamic
content based on the interpretation (at page request time) of special
action tags."
- The Controller: ActionServlet and ActionMapping
"The Controller is focused on receiving requests from the client (typically
a user running a web browser), deciding what business logic function is to
be performed, and then delegating responsibility for producing the next
phase of the user interface to an appropriate View component."
"An ActionMapping defines a path that is matched against the request URI of
the incoming request and usually specifies the fully qualified class name
of an Action class. All Actions are subclassed from
org.apache.struts.action.Action. Actions encapsulate calls to business logic
classes, interpret the outcome, and ultimately dispatch control to the
appropriate View component to create the response."

No comments: