Summary


This chapter shows how to leverage the JavaBeans pattern to provide richer application frameworks. This allows you to think of your application in terms of components and reusable frameworks, instead of a hard-coded monolith. By decomposing your application, it becomes easier to build, reuse, and test individual components.

It's easy to imagine building complex graphs of JavaBean objects, with complex access code required in certain situations involving collections. In the next chapter, JXPath is shown as a tool to assist in dealing with complex object graphs.

Project Ideas

Build a framework to test JavaBeans by inspecting the various properties, setting the properties, and calling a method on the JavaBeans. How much configuration is required beyond that which can be detected from the JavaBean type information?

Write an application to compare the performance of BeanUtils and Java's built-in reflection capabilities. Does the performance of one approach or another vary if different bits of information are cached?

If you find the idea of FormBean intriguing but are interested in a more complete solution, check out BeanView (http://beanview.attainware.com/). As of this writing, I have posted the source for a more complete framework, developed as an outgrowth of writing this chapter. My expectation is to remove the form generation and rendering components and instead rely on JavaServer Faces (http://java.sun.com/j2ee/javaserverfaces/) as a more robust framework. Feedback and comments are appreciated.




    Apache Jakarta Commons(c) Reusable Java Components
    Real World Web Services
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 137
    Authors: Will Iverson

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net