Tuesday, March 3, 2009

Viral Infection Arm Numbness

Liferay Portlets with J2EE Architecture - MVC Pattern

The concept of reusing software is not limited only to use the same functions, classes, or methods to solve similar problems, but extends to other phases of software development as can be, as is the case at hand in this post, architecture.

reuse in internal architecture level are particularly important design patterns. Specifically, today I speak of the Standard Model-View-Controller. The MVC pattern is widely used in various types of applications.

I heard comments from developers, in which J2EE associate this pattern, since there are several frameworks that implement it, such as Spring MVC, but MVC, like other employers, is not unique the technology. In fact in the first iteration of design, architecture abstract programming technology. In Soltel have adopted this pattern in many developments of a different nature: J2ME mobility, mobility. NET, C #, and of course in J2EE applications.

In our day to day, do not develop critical applications, where it would be prohibited from using this type of pattern. In fact I doubt that for a critical application is chosen Java as a technological solution.

For J2EE applications, most of the time, the MVC architecture meets the needs of the application. In fact, I think it has become as standard de facto, and if you work on projects for public administration in Andalusia, almost a de jure standard, as in hanks (Framework for the Development of Andalusia), is recommended.

broadly, the pattern indicates that they should establish three components or layers in the architecture, each of these, only communicates with the adjacent.


- Layer View: Responsible for the presentation logic and data capture our system to the outside and vice versa.
- Control Layer: Responsible for the operational logic of business. Forwards requests Layer View of the Model Layer, and according to the response, redirect or Layer not Vista. Load objects and works with them.
- Layer Model: basically contains the actual business logic, the application domain (VO, Value Object) to get and set classes, and data access objects (DAO) to implement CRUD (Create, Read , Update, Delete). This broadly, because depending on the application, as well as VO and DAO patterns, you can enter a Façade. This layer interacts either directly (for example, jdbc) or through the persistence layer with database servers, LDAP ...

Many of the J2EE frameworks and implement communication mechanisms between layers following MVC.



Using JSF or Struts layer for Vista, for Layer Controller Spring and Hibernate JPA for Layer model would be one solution to the J2EE application architecture. Advantages


MVC pattern gives us a very maintainable software construction, which can be located in a flexible errors. Is a modular design, and little trailer, promoting reuse.
For example, we can make a desktop GUI and a web, which share the controller and model layers, and only treated as separate developments in the two layers Vista.

0 comments:

Post a Comment