kukooBlog

          look to the master, follow the master, walk with the master, see through the master, become the master.

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            213 隨筆 :: 0 文章 :: 285 評論 :: 0 Trackbacks

          At one end of a typical web application is the presentation layer. Many Java developers understand what Struts provides. However, too often, coupled code such as business logic is placed into an org.apache.struts.Action. So, let's agree on what a framework like Struts should provide. Here is what Struts is responsible for:

           

          • Managing requests and responses for a user.
          • Providing a controller to delegate calls to business logic and other upstream processes.
          • Handling exceptions from other tiers that throw exceptions to a Struts Action.
          • Assembling a model that can be presented in a view.
          • Performing UI validation.

           

          Here are some items that are often coded using Struts but should not be associated with the presentation layer:

           

          • Direct communication with the database, such as JDBC calls.
          • Business logic and validation related to your application.
          • Transaction management.
          • Introducing this type of code in the presentation layer leads to type coupling and cumbersome maintenance.

           

          Excerpt from "Wiring Your Web Application with Open Source Java" by Mark Eagle

           

          [NoteThis blog was migrated from my very old blog which was in the blogspirit.]


          Yourit
          Mycat Programming

          posted on 2005-06-02 09:17 kukooBlog 閱讀(848) 評論(0)  編輯  收藏 所屬分類: JavaProgramming
          主站蜘蛛池模板: 旅游| 昆明市| 遵义县| 塔城市| 巴东县| 通州市| 南城县| 钦州市| 平度市| 宁国市| 武邑县| 通化市| 两当县| 揭东县| 连江县| 阿图什市| 三门峡市| 三河市| 南乐县| 新竹县| 修水县| 佛山市| 阜新市| 宜都市| 边坝县| 察哈| 朝阳县| 滨州市| 济宁市| 冕宁县| 富源县| 石泉县| 丹凤县| 普定县| 澄迈县| 淮滨县| 东乌珠穆沁旗| 韶关市| 古田县| 大安市| 玉溪市|