Microsoft Study Bible

September 18, 2009

MVC better than J2ee ?

Filed under: Developer tools and applications — Tags: , , — Jackson @ 5:34 am

The j2ee framework should be multi-layered. We will discuss how to divide the framework could make the system more robust. If the framework was divided into three layers, how should we divide? The typical structure is similar with MVC.

 

What is MVC?

 

Model–view–controller (MVC) is an architectural pattern used in software engineering. The pattern isolates business logic from input and presentation, permitting independent development, testing and maintenance of each.An MVC application is a collection of model/view/controller triplets (a central dispatcher is often used to delegate controller actions to a view-specific controller). Each model is associated with one or more views (projections) suitable for presentation (not necessarily visual presentation). When a model changes its state, it notifies its associated views so they can refresh. The controller is responsible for initiating change requests and providing any necessary data inputs to the model.MVC is frequently and needlessly convoluted by tying it directly to a graphical user interface. That a controller is often driven indirectly from a GUI is incidental. Likewise, rendering views graphically is an application of MVC, not part of the pattern definition. A business-to-business interface can leverage an MVC architecture equally well.

 

 

 In j2ee, what is Three-tier structure, compared with MVC?

1. View layer. This layer aims to complete Data-processing, equal to View layer. This layer is primarily used for JSP.The main reason is

That JSP could be easily deployed to the users a robust and operational view.

 

2. The layer –Control. It was chiefly used to complete a logical processing of business, including the connection of the pages. Corresponding to the logic layer, this layer was primarily used in servlet/javabean/session bean.

 

3. The layer-model. This layer corresponds to the realization of technology of the Entity bean in J2ee.It was the Storage Layer in the three-layer construction.

Besides, there is another division that Control and Vies layers contain the servlet/javabean/session bean/entity bean and model does not contain entity bean. We don’t recommend this division.

Do you have better ideas???

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress

Close
E-mail It