3层的完全分离-分而治之
Complete Separation of the 3 Tiers - Divide and Conquer
摘要:
大多数Java应用程序,包括基于Web的应用程序,都遵循3层架构。尽管Java为层到层接口提供了标准工具,但层的分离通常并不完美。例如,数据库接口JDBC假设SQL语句是从应用服务器发出的。类似地,在基于Web的Java应用程序中,HTML代码被认为是由servlet生成的。在语法方面,这将Java源代码转换为多种语言的混合:Java和SQL,Java和HTML。这些语言混合体很难阅读、修改和维护。在本文中,我们研究的标准和方法,以实现良好的分离的3层,并提出了一种技术,提供一个干净的分离。我们提出的技术需要一个明确的接口和数据定义。这允许隔离后端、应用服务器和前端开发。这些定义还允许根据聚合数据结构进行应用程序设计。因此,可以从定义中生成大量的辅助代码,使开发人员能够专注于业务逻辑。总的来说,所提出的方法大大方便了开发和维护,并从整体上提高了产品的质量。
英文摘要:
Most Java applications, including web based ones, follow the 3-tier architecture. Although Java provides standard tools for tier-to-tier interfaces, the separation of the tiers is usually not perfect. E.g. the database interface, JDBC, assumes that SQL statements are issued from the application server. Similarly, in web based Java applications, HTML code is assumed to be produced by servlets. In terms of syntax, this turns Java source code into mixtures of languages: Java and SQL, Java and HTML. These language mixtures are difficult to read, modify, and maintain. In this paper we examine criteria and methods to achieve a good separation of the 3 tiers and propose a technique to provide a clean separation. Our proposed technique requires an explicit Interface and Data Definitions. These allow isolation of the back-end, application server, and front-end development. The Definitions also enable application design in terms of aggregated data structures. As a result significant amounts of auxiliary code can be generated from the Definitions, enabling the developers to concentrate on the business logic. By and large the proposed approach greatly facilitates development and maintenance, and overall improves the quality of the products.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。