ACAF, a lean pattern based framework to build up robust business classes
The intension of ACAF is, to build business classes as the core classes of your application, which can be used in each tier or layer, e.g. a GUI frontend, a Web frontend, a mobile device, a Web, a SOA or a database backend service. To achieve this goal, the business classes has to be technology-free. A database backend doesn't need a GUI framework and a GUI frontend usually doesn't need a O/R mapping framework. ACAF helps you to achieve this goal, providing means to connect arbitrary framework to the business classes without affecting the business classes itself. The frameworks are connected via the ACAF interfaces and classes. ACAF has no dependencies to other libraries, only the Java standard edition (JSE) and it has a very small memory footprint.
Business classes use attribute classes provided by ACAF to implement attributes instead of simple Java types. The ACAF attribute classes wrap not only a value, but also a keyword, which can be considered as label of the attribute. The keyword may also be localized. Numeric and date attributes can be initialized with a value range, which is used to check the value when it is set. So business processes can rely on verified business classes with a high data quality. This relieves the business processes from checking if values are NULL or are in a certain value range. When the business classes are used in different components, the value checking and the keywords are consistent over all components. So each attribute has the same label and the same constraints in frontend or backend components.
For a detailed description of ACAF see also the ACAF documentation site.
The class diagram on the top-left shows the business classes of the sample application "Address-Book", which shows hoe to use the framework. A more complex sample is the "Competition-Management" application. The sample applications can be downloaded here:
O/R Mapping Package Included
The framework includes a package for object/relational mapping, used to store and retrieve business objects in/from a relational database. The classes of this package are initialized with pure Java code and do not require any configuration files.
XML Serialization Package Included
The framework includes a package, which can be used to serialze and deserialize your business objects to/from a XML document. As soon as your business classes are implemented you can use the XML handler to save your business objects in a XML file with a few lines of code:
XMLHandler xmlHandler = new XMLHandler ();
xmlHandler.saveToFile (new File (directory, fileName), businessObject);