Font Size: a A A

Comparison And Research Of Struts And JSF Based On J2EE

Posted on:2009-05-28Degree:MasterType:Thesis
Country:ChinaCandidate:M DengFull Text:PDF
GTID:2178360272981349Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Now,Information Construction home and abroad are entering a period which is based on Web application,and Java language is called the best programming language in developing Web application.Therefore,Java Enterprise Applicaton System based on Java become the biggest part in Computer Web application system.At the beginning,we use servlet and JSP to program Web application,but there was a large quantities of codes in developing many formal tasks.A kinds of frameworks based J2EE appears to simply these tasks.Most of the J2EE Web applications are consist of at least three tiers according to their resposibilies.These are: Presentation tier, Business-Logic tier and Integration tier. Each tier has a sound function, and is not to be mixed with other tiers.A good framework is defined to the problems on only one certain tier, and to solve all.The framework can release the developers from the bottom coding, enable them concentrate on the business logic.Both Struts and JSF are excellent frameworks on presentation tier.Strus is open-sourcing from Apache Organization with the flexibility on the controller part. JavaServer Faces is the first framework in the J2EE world with characteristics of rapid development, which can develop customize user interface in Web application.Both Struts and JSF adopt model-view-contorller pattern, which detach design of Object Oriented and visualized interface.In MVC pattern, view is used to interact with users, model is business-logic and data, and controller is the code responsing the user event and integrating model and view.MVC pattern ensure application soft-coupling,therefore reducing the dependence among the three tiers.Struts uses JSP customized tags and MVC pattern to improve the reuse of codes and the flexibility of controller.Struts becomes the de-facto standard in J2EE for its early publication.JSF provides the wonderful components which are running on server side and responsing to the user event from the clients.Meanwhile,there are some differences between them.First,JSF is based on components which can stimulate an event,but there is one form relating to one very event in Struts.So components-based event in JSF is preciser than the request-based event in Struts, and this is the primary difference between Struts and JSF.Second,Javabean of ActionForm in Struts includes only data related to the pages,while methods are put in the Action class.But in JSF,backing bean both includes the attributes and related behaviours.What's more,there are some differences in presentation technology,realization and performance.Basing on the introduction of the two frameworks, this thesis compares the infrastructure, system, extension, performance and realization of them.And I point their similarities and differences, and summarize their own advantages and disadvantages.Then when considering their mutual complement,I think I can integrate Struts and JSF together in one J2EE Web application,which can enjoy their advantages and screen their disadvantages.This thesis first proves the feasibility of integrating the two frameworks together on theory,and then demonstrate the performance of integration with a Web application.Finally,there is some own opinions about how to apply the two frameworks into the development of Web application.
Keywords/Search Tags:J2EE Platform, MVC Pattern, Struts Framework, JSF Framework
PDF Full Text Request
Related items