Flylib.com

Books Software

 
 
 

Conclusions


Conclusions

This chapter presented a detailed analysis and sample application to demonstrate integrating Struts with a Web Services application.

Among the important points of the chapter were

  • Web Services fit with Struts Model components . That is, they should be called from the Struts Action class and likely represent an interface to some data or business logic in a remote system.

  • Web Services are a technology based on communication and encoding of data in XML. The SOAP protocol is used for communications of data.

  • Serializing data is the process of converting data in your program into an XML representation that's independent of any particular computer language or platform. Deserialization is the opposite : It's the process of taking data in an XML format and converting it into a format useful for your program to use.

  • Axis is a Java-based Web Service framework and SOAP engine. It's open source and developed under the umbrella of the Apache XML Project. Its home page is http://xml.apache.org/axis.

  • Java2WSDL and WSDL2Java are two utilities made available as part of Axis that provide significant support in terms of automating the development of Web Services applications using Axis.

  • By utilizing a Struts application design based on the use of value objects to carry data one bean at a time and also the use of a facade class to isolate the Action class from the details of the actual Web Services communications, it's possible to greatly simplify the development and maintenance of Struts applications based on Web Services.


Chapter 20. Building, Deploying, and Testing Struts Applications

IN THIS CHAPTER

  • An Integrated and Incremental Build/Test Cycle: It's Extreme!

  • Building and Deploying Struts Applications Using Jakarta Ant

  • Developing a build.xml File for Building Struts Applications Using Ant

  • Extreme Struts Development with Integrated and Ongoing Testing

  • Mock Object Testing Using JUnit, StrutsTestCase, and Ant

  • In-Container Testing Using Cactus, JUnit, StrutsTestCase, and Ant

  • Conclusions

Beginning with Apache Tomcat and continuing through today, The Jakarta Project has provided an astonishing array of open source, no-charge applications for the Java platform. Its impact on software development has been amazing. At last count, there are nearly 25 subprojects operating under The Jakarta Project, including Struts, Tomcat, Log4J, and many others.

One of the biggest impacts that The Jakarta Project has had on developers has been by providing tools to make their jobs easier. With those tools has come a series of best practices for development.

In this chapter, you're introduced to a process for building, deploying, and testing applications that has evolved through use on numerous Jakarta projects. This development process involves using the Ant build tool and incorporating incremental and ongoing testing using JUnit and the Cactus Framework.


An Integrated and Incremental Build/Test Cycle: It's Extreme!

The fundamental principles involved here are simple and intuitive. And, amazingly, they work extreme ly well!

In case you haven't picked it up by now, the extreme references have to do with Extreme Programming (XP), a style of programming that was developed in the mid-1990s. XP stresses simplicity of design, frequent small releases, aggressively creating opportunities for communications, and ”in case you wondered when this section would discuss it ”testing.

XP tells you to test early and test often. In XP, it's not considered to be too early if you write the unit test even before you write the code!

This chapter isn't about XP or development methodologies. But the integrated build/deploy/test cycle that this chapter introduces is a big part of XP.

It's also important to know that these features weren't adopted because various Jakarta subprojects decided they want to "go XP." These approaches were developed and polished by teams of developers constantly looking for new and better ways to work together. The fact that the end result has characteristics of XP is really just a validation that those features of XP are useful.

To summarize: This chapter covers a build/deploy/test process that's used on a number of Jakarta subprojects and incorporates some elements of Extreme Programming. These processes involve using open source tools that have been developed and polished for just this purpose.

FOR MORE ABOUT EXTREME PROGRAMMING

Extreme Programming is a popular and spreading approach to software development. If you haven't been exposed to it, it's worth your time to learn more about it. Adopting just some of its processes can be useful.

A good place to begin would be at one of the many Web sites devoted to it. Two sites that we can recommend are

A Gentle Introduction to Extreme Programming at http://www.extremeprogramming.org

and The Extreme Programming Roadmap at http://c2.com/cgi/wiki?ExtremeProgrammingRoadmap

Sams Publishing has also recently released what looks to be a good book on this topic:

Sams Teach Yourself Extreme Programming in 24 Hours (ISBN:0672324415) by Stewart Baird.