Joda - Next Generation Beans

Project
   Home
   SourceForge
   News
   FAQs
   Licence

Joda Time
   Time home

Joda Primitives
   Primitives home

Joda Beans
   Beans home
   Problem statement
   Design overview
   Getting started
   Swing binding
   XML input/output
   XPath access
   API Javadoc

Download
   Source
   CVS

Contributing
   Feedback
   Volunteer
   Contributors

 

 

 

 

 

 

 

 

What are Joda Beans ?

Joda Beans is a Java open-source project to make JavaBean properties fully accessible...
...which enables Java and XML to work seamlessly...
...and GUI and Data source bindings to be automated

JavaBeans have helped Java's success by providing a naming convention for access to an object's properties. However, a naming convention is of much less use when generic programmatic access to properties is required from frameworks such as XML input/output, XPath and Swing components.

Joda changes this, by turning each property on a bean into a first class object. To achieve this, a third method that returns a Joda Property object is added to the normal get and set methods. This simple change, backed by the Joda framework, enables programs to work in a whole new way.

Using Joda to manage the surname on a person object you can write:

  String surname = person.getSurname();      // JavaBeans style, or...
  String surname = person.surname().get();   // Joda style

In addition to this methods are provided for generic access to the Property objects:

  // Generic access, without reflection
  Property surname = person.getProperty("surname");
  Map propertyMap = person.getPropertyMap();
  person.surname().setAttribute("errorCode", "MANDATORY");

And this is only a flavour of what is available, see the design overview for more detail.

Benefits

  • Properties are first class, accessible objects
  • Properties can be accessed by frameworks without the framework needing to use reflection
  • The object model can be written out as XML SAX, and read in again
  • The object model can be queried using XPath
  • All Property values support change event listeners
  • Properties can be bound into Swing components easily - no more writing event listeners
  • ...and many more

Current Status

NOT ACTIVELY MAINTAINED
3rd November 2002 - Milestone build 0.8 now available, with many optimisations.

If you have any questions, just email scolebourne@users.sourceforge.net