【正文】
are mon application design concerns which are often used across projects. Even across unique functional requirements, there are monly occurring patterns of use cases, which lend themselves to design and development reuse. This paper describes a “customized” framework, which had been developed in an effort to identify such mon application concerns and identify design patterns that can be used by the developers. This framework, which we will refer to as the developed XYZ framework, provides a set of patterns and tools that were built on industry best practices, tailored to mon application concerns. It provides an application development stack, from presentation to integration layers. This paper articulates these application concerns and the patterns, tools and industry best practices. The developed XYZ framework can be customized to various projects’ needs. It was developed and configured based on various frameworks and tools such as Struts, Spring, Hibernate and JUnit.2. Major technologies of the developed framework. Layers and separation of code and configurationWeb applications have various design concerns such as presentation, business logic, data access and security. A separation of design concerns into distinct code layers has several advantages such as: ease of maintenance, the ability to implement good design patterns, and the ability to select specialized tools and techniques for specific concerns. Separating a project into layers can result in dependencies between those layers. For example, a singleuse case involving simple data entry and inquiry usually must integrate presentation, business logic and data access together to deliver required functionality[6]. Spring AOP implements method interception through JDK dynamic proxies. The XYZ framework uses Spring AOP to manage concerns such as transaction management and performance monitoring.The developed XYZ framework consists of two distinct parts: code and configuration. Code resides in a particular application layer and focuses on a particular piece of the application solution. This could be interacting with a database, or presenting data to the screen. Configuration glues the various layers of the application together. Separating configuration from code allows us to manage configuration independently, giving us the flexibility of applying different configurations to the same code base. For example, a Data Access Objects (DAO) implementation knows that it is using JDBC to connect to a database through a data source, but it does not know anything about the implementation of that data source. It may e from a Java Naming and Directory Interface (JNDI) context or be derived from a driver manager. It may point to the remote database or a local database. Regardless of where the data source es from, the DAO implementation will operate on the data source in the same manner. Likewise, a Service object may depend on a DAO, but it does not know whether the DAO is implemented via Hibernate, straight JDBC, or a Web service. The service object interacts with the DAO in the same manner, regardless of the DAO’s implementation.Spring gives us a way to manage our application’s entire configuration through a Spring application context, defined by a set of XML files. We could define the application context in one file. However, by defining it in groups of smaller files, we can simplify configuration management. A logical set of such application context files which forms a plete application configuration is called a configuration set.During the development of Javabased enterprise applications the standard configuration is where a framework’s configuration set uses external resources such as data sources and JNDI resources. This type of configuration sometimes can create problems with: (1) An inplete database that has not yet been loaded. Developers may want to test the display of certain types of data, but if the underlying database has not yet been pleted, they will not be able to do this. (2) Services or DAOs that may not have been developed yet. Integrating with unfinished services or DAOs may halt development.These issues decrease productivity. The developed XYZ framework has separated its configuration from its code, we can use an alternate configuration set targeted specifically towards development. This relieves us from worrying about the availability of external systems, which are irrelevant to solving immediate development needs.The developed XYZ framework defines two configuration sets: default and standalone. We can also customize our application by adding additional configuration sets based on our project needs. The default configuration set connects to the development database using the DataSource defined in JNDI. It uses fully developed application services and DAOs. The standalone configuration set is the most flexible environment for development. This configuration set: (1) connects to either a locally installed database or the development database using a DriverManagerDataSource。 file defines the service part of all configuration sets. This file is located in the src/config directory of the service project. Application context files shared between configuration sets are also located in this directory. In addition, each configuration set has its own subdirectory, which contains files specific to it. Services and DAOs, for instance, are shared between configuration sets, while supporting services (like data sources) belong in the subdirectories. XML files define the Spring beans in this application by using the 〈bean〉 tag. A Spring bean is a Java object created and initialized by the application context.. Classes and dependenciesUsing the developed XYZ framework, the following code and configuration artifacts will be typically required to develop a user interface screen: (a) Action, ActionForm classes and entries。 [7]. Unlike unit tests, integration tests do require code dependencies to be available. The pur