kukooBlog

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

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            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 閱讀(851) 評論(0)  編輯  收藏 所屬分類: JavaProgramming
          主站蜘蛛池模板: 汽车| 盐津县| 和平区| 高平市| 台安县| 麻栗坡县| 濮阳县| 昌平区| 五原县| 竹溪县| 广宁县| 綦江县| 百色市| 咸丰县| 桂阳县| 临泉县| 宁安市| 长阳| 滦平县| 加查县| 邛崃市| 大渡口区| 井研县| 绍兴县| 娱乐| 资中县| 信丰县| 沙雅县| 桂林市| 铁岭县| 湛江市| 曲周县| 平乐县| 石家庄市| 米易县| 吴堡县| 乌兰察布市| 凌海市| 镇赉县| 兖州市| 安岳县|