基于J2EE和MVC的Web应用开发方法的探讨
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
当前,Web技术在Internet上得到了广泛的应用,它支持实时的信息发布、动态的用户交互以及与后台系统灵活的安全的连接。因此如何构造功能更加强大、应用更为灵活、开发更为简便的Web应用程序成为当前Internet技术探讨的热点,而解决该问题的关键是网站技术和开发方法。
     近几年面向对象领域内提出了一个设计模式(Design Pattern)的思想。这种思想认为在系统设计这一层次上,软件开发可以抽象成一种模式,模式描述了系统面临的问题及其解决方案,并可以重用。UML(统一建模语言)则着眼于开发一种能够规范面向对象建模技术的方法,它规定了一套可视化的描述软件系统的标准语言,并适用于整个软件生命周期以及不同的实现技术。
     MVC(Model-View-Controller)模型-视图-控制器设计模式是设计模式中很重要的一种。模型即相关的数据,它是对象的内在属性;视图是模型的外在表现形式,一个模型可以对应一个或者多个视图,视图还具有与外界交互的功能;控制器是模型与视图的联系纽带,控制器提取通过视图传输进来的外部信息,转化成相应事件,然后由对应的控制器对模型进行更新;相应的,模型的更新与修改将通过控制器通知视图,保持视图与模型的一致性。
     J2EE(Java2 platform,enterprise edition)是美国Sun公司刚刚推出的一种全新概念的模型,与传统的互联网应用程序模型相比有着不可比拟的优势。它主要包括JSP、Servlet、JDBC、JavaBean、EJB等,不仅具备了Java一贯的平台无关性、分布式处理能力强和安全等优点,而且在Web应用程序的开发上已经形成了标准的体系结构,移植性和兼容性很强。
     本文介绍了面向对象思想中设计模式的概念,着重阐述了MVC设计模式的体系结构和UML标准建模语言,并提出了一种适用于中小网站的基于J2EE和MVC模式的Web应用开发方法。并以某公司实际的Web应用设计开发为例,介绍了根据UML提供的系统的、抽象的、标准的、可视化表示,实现模式编程的全过程,验证了其方法的正确性。
Web technique is the most far-ranging application development technique in the Internet currently, which sustains real-time information release, dynamic user alternation and flexible safe connection with back system. So it' s a hotspot of Internet technique development currently to construct Web application with more function, more flexible application and easier development, the key of solving this problem is the technique and development methods of website.
    Design Pattern is a kind of important idea of Object-Oriented field brought forward in the latest years. The idea thinks that software can be abstracted to a kind of pattern which describes the problems and solutions facing to the system and can be reused at the level of system design. UML regulates a suit of standard language which describes software system visually and is applicable to the entire software lifecycle and different techniques, with a view to developing a kind of method unifying Object-Oriented modeling technique.
    MVC (Model-View-Controller) Design Pattern is one of the important design patterns. Model is the relative data which is the internal property of Object; View is external presentation form of Model, one Model can correspond to one or more View, View also possesses the function of alternating with environment; Controller is the relating ligament of Model and View, Controller picks up the external information transmitting from View and transfers to corresponding event, and then update the Model; On the other hand, Model' s update and alteration will notice View via Controller to keep the coherence of View and Model.
    J2EE(Java2 platform, enterprise edition) is a kind of new model entirely which consists of JSP, Servlet, JDBC, JavaBean and EJB so on mostly. It has not only independence of platform and high distributing disposing ability but also strong compatibility.
    The paper describes the concept of Design Pattern, emphasizes the framwork of MVC and UML and provides a new development method based on MVC and J2EE, and develops a Web application using the method and
    
    
    
    according to the systematic, nonobjective, normal and visual presentation provided by UML.
引文
[1]Paul J.Perrone.J2EE构建企业系统专家级解决方案.张志伟.清华大学出版社,2001.
    [2]许幼鸣,徐锦,文耘.基于设计模式的软件重用.1999,3:13~14,计算机工程.
    [3]段靖荒,林子禹,万丰.J2EE企业解决方案的平台.2001,8:205~207,计算机应用.
    [4]杨正甫.面向对象分析与设计.中国铁道出版社,2001.
    [5]Erich Gamma.设计模式——可复用面向对象软件的基础.北京:机械工业出版社,2000.
    [6]张尧学.计算机网络与Internet教程.北京:清华大学出版社,1999.
    [7]John R.Levine.Internet核心技术精解(第二版).北京:中国水利水电出版社,2001.
    [8]Vlada Matena,Beth Stearus.J2EE平台上的EJB组件开发.翟裕中,北京:机械工业出版社,2001.
    [9]Unified Modeling Language Specification.Object Management Group.Frameingham,Mass.1997(UML 1.0)and 1998(UML 1.1).
    [10]刘超,张莉,周伯生.可视化面向对象建模技术--标准建模语言UML.北京:北京航空航天大学出版社,1999.
    [11]Meilir Page-Jones.UML面向对象设计基础.包晓露等.北京:人民邮电出版社,2001.
    [12]邵维忠,梅宏,统一建模语言UML综述.1999,4:385~388,计算机研究与发展.
    [13]王俊峰,戚晓滨,夏宽理,等.设计模式和UML.1999,6:27~29,计算机应用研究.
    [14]Subrahmanyam Allamaraju.J2EE服务器端高级编程.北京:机械工业出版社,2001.
    [15]雨阳隆春等.深入JSP网络编程.北京:清华大学出版社,2001.
    [16]谢志华.深入Java Servlets网络编程.西安:西安电子科技大学出版社,2001.
    [17]王迪华,刘臣勇,刘立鹏,等.JSP/Servlet——基于Java的最新网站建设工具.北京:清华大学出版社,2001.
    [18]Bill Brogden.Java开发指南——Servlets和JSP篇.电子工业出版社,2001.
    [19]向中凡.SQL Server 2000实用操作与技巧.西安:西安电子科技大学出版社,2001.
    
    
    [20]林金霖.ASP实务经典.中国铁道出版社,2000.
    [21]Joseph W.Lowery.Dreamweaver宝典.于纲,陈晓亚,金伟.电子工业出版社,2000.
    [22]沈江天,姚宇.基于Dreamweaver3的网站规划与建设.北京:清华大学出版社,2000.
    [23]Ashton Hobbs.自学JDBC数据库编程.北京:清华大学出版社,1998.
    [24]柏亚军.JSP编程基础及应用实例集锦.北京:人民邮电出版社,2001.
    [25]布雷恩·赖特.JSP数据库编程指南.北京:北京希望电子出版社,2000.
    [26]于松涛,徐振成.精通SQL Server2000数据库管理与开发.北京:人民邮电出版社,2001.
    [27]Robert V.Binder.面向对象系统的测试.华庆一等.北京:人民邮电出版社,2001.
    [28]Jeffrey L..系统分析与设计方法(影印版).北京:高等教育出版社,2001.
    [29]周中雨,钟北京.Active Server Pages(ASP)网页制作指南.北京:清华大学出版社,2000.
    [30]Abraham Silberschatz.数据库系统概念(英文版,第三版).北京:机械工业出版社,1999.
    [31]王姗,陈红.数据库系统原理教程.北京:清华大学出版社,1998.
    [32]Mark Priestley.面向对象设计的UML实践(影印版).北京:清华大学出版社,2000.
    [33]飞思科技产品研发中心.ASP&SQL Server网站设计与实现.电子工业出版社,2001.
    [34]裴龙,何大可.Java2 Swing组件设计模式分析.2001,8;274~276,计算机应用.
    [35]Cay s.Horsemann,Gary Cornell.Java2核心技术(卷1):基础知识.京京工作室.北京:机械工业出版社,2000.
    [36]David M.Geary.Java2图形设计(卷2):SWING.李建森,蒋欣军,龚尧莞,等.北京:机械工业出版社,2000.
    [37]宋辉,江峰.Java服务器程序设计.北京:清华大学出版社,1996.
    [38]施汝军.网站JSP后台解决方案.北京:人民邮电出版社,2001.
    [39]Grandy Booch, James Rumbaugh, and Ivar Jacobson. The Unified Modeling Language User Guide. Addison-Wesley. 1999.
    [40]Hans-Erik Erikson, Magnus Penker. UML Toolkit. John Wiley&Sons, Inc. 1998.
    [41]Martin Fowler(with Kendall Scott).Foreword by Grady Booch, Ivar Jacobson, and James Rumbaugh. UML Distilled-Applying The Standard Object Modeling Language. Addison-Wesley. 1997.
    
    
    [42] Ivar Jacobson,Grandy Booch,and James Rumbaugh.The Unified Software Development Process.Addison-Wesley.1999.
    [43] James Rumbaugh,Ivar Jacobson,and Grandy Booch.The Unified Modeling Language Reference Manual.Addison-Wesley.1999.
    [44] John D.McGregor.Making Diagrams Useful,Not Archival.JOOP.May 1999 Vol.12,No.2,pp.22-28.
    [45] S.Vauttier,M.Magnan,and C.Oussalah.Extended Specification of Composite Objects in UML.JOOP.May 1999 Vol.12,No.2,pp.29-37.
    [46] Jos Warner,Anneke Kleppe.OCL:The Constraint Language of the UML.JOOP(The Joural of Object-Oriented Programming).May 1999 vol.12,No.2,pp.10-13.
    [47] Erich Gamma,etc.Design Patterns:Elements of Reusable Object-Oriented Software.Addison Wesley,1994.
    [48] Martin Flower.Analysis Patterns:Reusable Object Models.Addison Wesley,1997.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700