• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

J2EE学习笔记(4) 软件工程与系统框架

发布: 2007-7-04 13:34 | 作者: admin | 来源:  网友评论 | 查看: 9次 | 进入软件测试论坛讨论

领测软件测试网 J道的老大banq曾经说过设计模式是衡量一个程序员水平高低最重要的标准。个人非常赞同这个观点,从这个角度看学好J2EE第一个要了解的就是作为一个庞大复杂的系统,它是如何由各个模块拼装并协同有效地运作。

先来几个定义暖暖身 Definitions of Different Dimensions in J2EE

Tiers: A logical or physical organization of components into an ordered chain of service providers and consumers. Components within a tier typically consume the services of those in an "adjacent" provider tier and provide services to one or more "adjacent" consumer tiers. Within a tier, services are grouped to like requirements, such as functionality, security, or load distribution.

Layers: The hardware and software stack that hosts services within a given tier. Physical,.network, and software platforms and standard API sets support the components that provide a service. Layers, like tiers, represent a well-ordered relationship across boundaries that are mediated by interfaces. Whereas tiers represent processing chains across components, layers represent container/component relationships in implementation and deployment of services.

Tiers层的概念是我们最常听到的,一般来说它可以分为 (客户) <---交互---> [ Client Interface --- Presentation Tier --- BizLogic Tier --- Integration Tier --- Resource Tier ]

Client Interface 典型的客户界面为IE, Swing, Applet, WAP等,客户与之直接交互
Presentation Tier 负责接受客户请求并返回相应的处理结果。登陆,权限检查,会话管理在此进行,从技术角度就是JSP HTML等
Business Logic Tier 负责处理业务逻辑和数据,是J2EE的核心,它也同时管理事务Transaction,EJB等在这一层
Integration Tier 负责连接业务逻辑层与系统资源层,最常见的JDBC数据库连接就是一个例子
Resource Tier 负责提供上层所需要的资源,比如数据库, File System, Legacy System等等

结合实际应用和设计模式,我们可以将层次进一步划分。多层次会降低效率,也会导致出现很多看似“无用”的代码,但正是这些代码实现了低耦合从而降低了后期维护成本。
1) Presentation Tier应用MVC模式, 将程序流程控制器(Controller) 视图(View)和数据三者分离,如Struts就是其中一员大将。Filtering和User-Role-Priviledge-Resource也常在使用(具体还会开新贴细谈)
2) Business Logic Tier 和Presentation Tier的低耦合由Business Delegate层实现,很典型的例子 BusinessDelegate -> BusinessMgr (EJB) -> ...而Facade模式也经常在这里被用来做封装。

主要参考文献:软件体系架构模式在J2EE中的应用
主要参考项目:Medlog Logistic PACE2 SCS


文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网