1、Design Pattern Considerations in Your Portal Clearly, there are many ways to implement a design that cannot be expressed adequately in this chapter alone. Hopefully, the introduction of high-level pattern constructs and brief discussion of the implementation of Java standards in this chapter can fac
2、ilitate your design decisions on your portal deployments.Java language and implementation standards can also help control complexity so that consistent levels of quality can be attained in your development activities. This in turn can lead to increased partner adoption and portlet maintenance. Last,
3、 the adoption of design patterns should be applied so that best practices are propagated in your portal deployment and development operations can be hastened.Much has been written during the last few years about design patterns and their use in Java development,so rather than go into great elaborati
4、on of their use, we felt that it would be more beneficial to provide high-level concepts of patterns that might be used in your portal deployments and to encourage you to explore them from the online Javaworld newsletter and from the Core J2EE Patterns book ALUR.Planning for Portal DeploymentUsing J
5、ava StandardsFor many mission-critical development portal efforts, decisions need to be made about expensive software procurements to satisfy your development needs. In order to protect this investment, it is wise to consider standards when you make your purchasing decision because there is nothing
6、worse than dumping a lot of money into a particular framework only to learn after you have obtained it that it is a closed, proprietary system that does not work well with other systems. To guarantee that this does not happen to you, you should become familiar with software standards and other appli
7、cation frameworksuse of them. Regrettably, systems that do rely heavily on proprietary extensions often force your project to hire expensive expertise to help you deploy your program with their framework.Figure 7.21 illustrates some of the Java standards that could be considered for portal developme
8、nt. It is important to remember that these need to be established prior to procuring a portal framework or integrating existing applications into a homegrown portal application. Always be cognizant of the latest versions of the standards listed in Figure 7.21, and the effects that newer versions of
9、those standards might have on your design decisions.Figure 7.21Figure 7.22 illustrates some of the portal standards that should be considered before building your portalapplication.On many portal implementations, a business case for adherence to language standards that relate to individual portlets
10、needs to be made so that proprietary extensions are not adopted by a program that disallows code reuse and promotes vendor lock-in. Being exposed to proprietary data formats, one inevitably gets increasingly locked into the solutions of a particular vendor, which in turn limits the options for appli
11、cation software. This ultimately enables vendors to dictate enhancement prices and introduces unnecessary risks to your systemFigure 7.22Model-View-Controller (MVC) PatternIn the portal architecture shown in Figure 7.23, the MVC Pattern is where the servlet controller renders different views to the
12、portal faade from a disparate set of data sources.The model is the piece that has no specific knowledge of its controllers or its views. The portal system maintains relations between the different models and views and broadcasts content to the views when the model changes state. The view is typicall
13、y the piece that manages the visualizations of the model data. The controller is the piece that manages user interaction with the model data.The MVC Pattern is used with many frameworks because of its ability to handle content delivery complexities that are prominent in many enterprise systems. Jaka
14、rtas Struts and BEAs WebFlow are two notable implementations that use this in their frameworks.Template Method PatternA good practice when developing JavaBeans in your portal applications is to use the Template Method Pattern GoF to enforce a common design across the portal back-end. The Template Me
15、thod Pattern can be used so that modifications to your get and/or set methods will not affect your presentation view.In the portal display in Figure 7.23, the JavaBean applications on the back-end implement the Template Method Pattern to manage the logic in the accessor (get/set) methods.Memento Pat
16、ternIn the sample portal visualization shown in Figure 7.23, the view labeled #4 indicates that a form will be rendered to the user display. In many cases, the form will use JavaScript to perform validation testing so that activities will be performed on the client side in order to alleviate unnecessary operations on the server. This is a good practice for some Web appl
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1