Application of Java Open Source Project and Tools in Enterprise App Development
Author: Date: 2004-11-04 11:16:02
Junshengqu@yahoo.com.cn) Ion Global consultants in the past two years, the development of open source projects has become increasingly growing, and there are many projects and products with broad user groups, and they are playing more and more in business application development. Great role. This paper uses the J2EE architecture development as an example to explore how to use Java development source code and tools in the project. I. The main problem of enterprise application development is currently facing a software system that serves business purposes, handling corporate business information, and data. Although the DOT COM boom is gradually cooled, the company began to carefully consider the investment in application system development, but after all, the business process of the company needs special information system processing, thereby increasing the degree of automation, reducing the intermediate link, speeding up the information processing speed. Therefore, the current domestic enterprise application project development is still increasingly hot, especially in the fields of e-government, CRM, SCM and other fields. However, regardless of the development of business application development, there is some cases in the development of self-developing or entrusting system integrators: most of the project timeout or exceeding the budget; the project is a lot of BUG after deployment, and the modified cycle is relatively long; Commercial, the following situation is more common: there is no unified framework, each project will redesign Architecture; the degree of automation and repeating steps of the project development process are not a lot of people introduced; II. Open source project status Source Movement began to develop in the 1990s and has become an unleurvened force in software industry, which is more famous for Linux, Apache, Tomcat, MySQL, etc. At present, the trend of open source has exceeded system development fields such as operating systems, database management systems and web servers, and developed in corporate application development to find new territories. Especially for the framework and CASE tools developed by enterprise applications, open source projects have excellent solutions. The open source projects in foreign countries have http://www.apache.org/ and http://www.sourceforge.net/, where the former gives you a famous apache, Tomcat, Struts, Axis; and the latter is The most famous open source project center. At the same time, in the late 1990s, there are also many people invested in the development of open source projects. The more concentrated URLs are "Creative Software Alliance" (http://www.cosoft.org.cn/), etc., in addition to providing each Outside the Case tool, there are some projects to focus on solution development in specific areas, such as CRM. III. The application of Java Development Source Project and Tools is increasingly fierce, and the demand changes are frequent, and all system integrators face huge survival pressure. Two of these are particularly highlighting: there is no unified software development process or the software development process of shunting, such as RUP, but often due to time and other stress; most companies still do not get rid of the workshop During the time of practice, each project or product is done due to the different management people or teams, and a lot of time is quantified in structural verification and adjustment; the development of the enterprise application system is unique in the project. Things, and, in order to maintain the consistency and interests of development, system integrators need to maintain long-term cooperation with customers. Therefore, take evolved agile software development, which can better ensure the quality of the project. In all agile software development methods, XP is the most widely used. It is a highly dynamic process that responds to demand changes through very short iterative cycles; communication, simple, feedback, and courage are its four core value.
At the same time, it concentrates on a lot of best practices in the industry. There are currently 18, XP emphasizes the "limit" effect by strict implementation of all the best practices. At the same time, for the rejuvenation of multiplexing and efficiency, especially for system integrators, enterprise application systems should have their own frameworks and structures. With good performance, project verification system framework, combined with effective software development process, system integrators can develop enterprise application systems quickly and successfully. In order to better develop successful systems, system integrators can try to solve problems from the following two aspects: combine the support of open source tools, implement "agile software development methods" within the organization; establish flexibility and effective in the core business sector Framework; Since many business applications are developed based on J2EE technology-based network applications, the following mainly introduces Java-based open source projects, tool applications. Open source tools and XP XP 12 best practices, for all corporate application developers, due to organizational and culture, it is impossible to apply all applications, however, the following practices are conditional implementation: code specification: Code Standard Test Drive Development: Test-Driven Development Day Build: Daily Building Continuous Integration: Continuous Integration Publish: Small Release Morning: Daily Meeting 40 hours a week: 40-Hours A Week, Code Standard and TDD It is the basis of Continuous Integration, Daily Building, and Small Release; Daily Meeting and 40-Hours A Work are separate practical processes, can be combined with other practices, enhance the communication of the project team, and stimulate morale. It should be noted that the best practices are not unique to XP, but applied by the largest software development method, "Japanese build" officially appeared in Microsoft's software development methods. Although most companies have implemented code standards and specifications to a certain extent, and for the development of Java applications, there are also SUN recommended coding specifications, but the actual situation is not ideal. The main reason is that on the one hand, the habitual forces of developers are very large; on the other hand, the code review has not been sufficient. If you can help the code standard, the code review can focus on the logic and performance of the program from a certain degree of execution of the code standard. Open Source CheckStyle (http://sourceforge.net/projects/checkstyle) can help develop issues to resolve code standard review. The current latest version is 3.0, which provides two ways of operation: one is the command line; one is combined with Ant (Ant from 1.5 Optional Tasks for Checkstyle). At the same time, SourceForge has plug-in support for popular IDEs such as JBuilder, which can define the properties files at the Global, Project level, however, currently only support version 2.42. Before the 3.x version, the checkstyle configuration information is written in the Property file; after 3.x, the configuration information is an XML file, and the configuration is more flexible. 3.0 The release version provides specific Check files for Sun Code Conventions, you can refer to use.
Recommended Implementation: Manual Execution: Developers Manually trigger checkstyle checking or code review during IDE; Automated: Automated: Automated CHECKSTYLE and Source Control System (CVS), when the source checkin is ruled, if Do not meet, the code is not allowed to enter the system. Test-driven development tests first or test drive is one of the basic practices of XP, and the important role in testing in software development is increasingly valued. Review and test the effective way for system confirmation and verification, is an important measure for project quality assurance. Here, according to the general test classification, open source test tools in various fields: unit test: junit (http://www.junit.org/) Junit is a regression test framework written by Erich Gamma and Kent Beck (Regression Testing Framework) ), Used for Java developers write unit testing. The open source test tools described below have many extensions for JUnit. Its current version is 3.7, providing the main interface for the write unit test. At present, mainstream IDE provides support for JUnit. XP emphasizes test first, especially attaches importance to unit testing. System integrators need to enhance JUnit's use through software development processes. At present, many commercial test software offer joint use with JUnit, such as Jortest, 1999 and 2000 Jolt Test Tools, runner-up and productivity awards, built-in 200 post coding specifications, providing Java code static and dynamic check, Also automatically generate simple test cases, etc.) can be imported and exported to the test cases of JUnit. Integration and Function Test: httpunit (http: // Unit.sourceforge.net/) & Cactus (http://jakarta.apache.org/cactus/) httpunit is a Java class that tests the web application via HTTP connection. In conjunction with JUnit, HTTPUnit can be used as a powerful tool for creating a test program to ensure the normal end-to-end function of the web application. Although JUnit itself can test the server-side Java code by writing a single type of test program, there is a HTTPUnit help, JUnit can extend to analog web browser -Web servers to test the entire web program structure . Cactus provides us with a valid means of testing Web components such as servlets. It is an extension of Junit, but it has some differences with JUnit. CACTUS test is divided into three different test categories, JSPTestCase, ServletTestcase, FilterTestCase, not like Junit, a TestCase. CACTUS's test code has two parts of the server side and the client, and they work together. In general, CACTUS can be used to integrate testing; Although there are many excellent open source tools in integration and functional testing, but in the actual application process, it is also more than commercial test software. This is especially true for complex applications. This is because most of the integration and functional tests are made by dedicated testers, and they are more familiar with existing commercial software, such as Rational Robot, E-Test Suite, WinRunner, etc., and commercial software also provides more powerful. Function.
Pressure and performance test: jmeter (http://jakarta.apache.org/jmeter/) Due to increasing complexity, the number of users is increasing, the system's performance parameters, and many non-functional needs in development Get more and more attention. Therefore, many pressure and performance testing tools have also begun, which has certainly affected the JMeter of Apache Software Foundation. JMeter is a 100% Java desktop application to test the load and performance of the system. Its starting design is used to test web applications, then expand, you can test HTTP, FTP, support the performance and pressure of the relational database of JDBC. At the same time, JMeter provides a certain custom function, and system integrators can develop plugins for EJB, CORBA or SOAP themselves. In terms of pressure and performance testing, due to complex testing, actual enterprise application testing, it is also more commercial test software, such as LoadRunner, JProbe Suite, and Optimizerit, which are simultaneously released with JBuilder8; there are various fields in software development. "Best Practices", they are often talked, but there seems to be very realistic. These practices are the most basic and most valuable: there is a fully automated creation, testing process, allowing the development team to create their software multiple times a day. "Day creation" is also a view that people often discuss, McConnell creates Japan as a best practice in his "Fast Software Development", which is also a development method that Microsoft is famous. However, we support the view of XP community: day creation is just the minimum requirement. A fully automated process allows you to do multiple creation multiple times a day, it is also entirely worth it. ANT is a project of Apache Jakarta, which is "Make without Make". Ant is becoming the actual standard in the open source code. The reason is very simple: ANT is written in Java language, which allows the creation process to be used on a variety of platforms. Ant current version is 1.5, and its execution is based on an XML file, the configuration file is constructed by the target tree. Each goal contains tasks to be executed, where the task is the code that can be performed. In the examples given below, MKDir is the task of the target Compile. MKDir is a task built in Ant for creating a directory. Ant has a sound built-in task, or you can add your own features by extending the Ant task class. ANT has built-in support for JUnit, CVS, ClearCase, Visual Source, and Checkstyle, which can easily use ANT to move daily through the system timing function, such as Windows "Task Scheme" or Linux / UNIX "cron". Constructed work. Sustained integration is one of the important practices of XP, Martin Fowler has a detailed introduction in referring to [6], and the above practice is its foundation. One famous tool in the open source project is used to help achieve continuous integration: CruiseControl, secondly, there is still a commercial software Anthill also provides good support for continuous integration. CruiseControl (http://cruisecontrol.sourceforge.net/) CruiseControl is a famous ThoughtWorks product, and its source code has been made, it is a continuous integrated framework. It contains, but is not limited to Email notification, Ant, and other source code control tools.
At the same time, it also provides a web interface to view the current and have been Build's details. ANTHILL (http://www.urbancode.com/projects/anthill/ Anthill ensures that the build process is controlled while helping the internal knowledge of the inside. It gets the latest source code from the source control system (CVS, Visualsafe, ClearCase et al. Before each time Build, and assigns a unique number to the source code after Build completion. At the same time, it will update the intranet information in the case of Build. Small steps have been supported by the above practice, and the small steps are possible. XP emphasizes that new versions are issued in a very short period of time, so that the progress of each iterative cycle can be easily estimated to facilitate control of workload and risk; simultaneously handle the feedback of users in time. In order to successfully perform version release of the application system, SCM, especially the source code control program is required. In an open source project, CVS (Concurrent Version System) is the most famous version of the control program. The current version of CVS is 1.5.11, which is a system that puts a set of files in the hierarchical directory tree to keep synchronous systems. People can update their local hierarchy copies from the CVS server and send the modified result or new file; or delete the old file. CVS based on client / server behavior makes it easy to accommodate multiple users, and it is convenient to constitute a network. This feature allows CVS to become the first choice when people in different locations have handled data files (especially the source code of the program). All important free software items use CVS as a central point between its programmers to integrate the improvements and changes to each programmer. There are also many client software based on multiple operating systems, where WinCVS is most famous. Open Source Project and Framework: Currently, there are many open source Framework, such as Struts (http://jakarta.apache.org/struts/) ,webwork, etc., all provide excellent solutions using J2EE technology, such as J2EE. Program. Among them, Struts is one of the most widely used and more than one of the most popular frameworks. The current version of Struts is 1.1, which is a MODEL2-based MVC implementation framework. The core of Struts is based on Servlet, JavaBean, ResourceBundles, and XML technology. There are also many open source projects to support Struts, for example: profiles, struts console; code generator: easy struts; unit-test: strutstestcase; Java IDE Awards JBuilder 8 is built into Struts, this It also reflects the imports of Struts from another side. At the same time, it should be noted that Struts itself does not provide the standard implementation of the Persistence layer, however, the current solution is more, the system integration developer can choose according to the specific situation. If you can develop an independent system platform, the system integrator project development speed and quality will be greatly improved on the expertise of Struts and other Framework. IV. Conclusion From the above discussion we can see that open source projects provide great support for Java technology-based enterprise application development projects, regardless of Case tools, or in system frameworks, to promote and guarantee projects The quality of development.