In previous post showed the various frameworks used to develop a Web project Java, which can be downloaded from the Google Group (file: MVCStruts2.rar).
I will explain the project's architecture and what is the function of each one of the components thereof.
In this picture we see the architectural design of the system.
This image shows how the architectural division of the application clearly shows how to apply the MVC pattern. Also Unveils flow and how they communicate the different components participate in the system.
Here are defined the different types of classes that constitute the system:
HTML and JSP: Basically Web pages are displayed graphically to the user system. Users to perform functions on Web pages (view layer) generate events, which are captured by the Controller .
Controller: is the intermediary between the view layer and the layer model, gets the events held by the user in the View layer and performs the action ( ActionClases ) for the model, which respond to a request by the customer. The controller is consisting of XML configuration files (struts.xml) that are interpreted by the framwork Struts2.
InterceptorClases: are classes that inherit from the Interceptor interface that provides the Struts2 framework. Its function is to intercept the invocations performed on the view layer to invoke the driver ActionClases (and vice versa) during this break these classes can perform validations (ie validating user session, etc.). and if it is correct flow or action is performed normally.
ActionClases: inherit ActionSupport class provided by the Struts2 framework. Its function (in this project) is to validate the integrity of the received data and invoke the various Services which will provide the information necessary to return the required response by the View layer.
Services: are business classes, which can get data through the invocation of various ClasesDAO , process and return the information requested by the Web tier.
ClasesDAO: These classes access "directly" to various data sources (databases, text files).
ClasesTO: These classes provide transfer objects, which "travel" through the application. For example, a DAO consult a data source and return a list of objects TO.
ClasesUtil: are classes that provide utility functions that may be used by all components of the system.
0 comments:
Post a Comment