This package contains the business classes of the competition management application.
This package contains the message catalogs of the competition management application, used to get the localized texts and messages.
This package contains the O/R mapping of the competition management application, used to store and retrieve the business objects in/from a relational database.
This package contains the JUnit tests of the competition management application.
This package contains an XML facade, used to serialize and deserialize the business objects of the competition management application into/from a XML file.
The "Competition Management" application is a sample base application, used to demonstrate the usage of "A Common Application Framework" (ACAF).
The ZIP archive containing the sample application can be downloaded from the following site:
The installation is very simple, just unzip the downloaded ZIP archive. This creates the following directory structure:
When you intend to run the message compiler ANT script, you have to adjust the location properties MESSAGECOMPILERHOME and CompetitionDevRoot in the script file.
The competition management application is an application, showing the concepts of ACAF. This is not a ready to use application with a GUI and it is not intended to be used in a productive environment. However the structure and the classes can be used as template to start developing your application with ACAF. You may also have a look at the simple sample addess book application.
the business classes of the application, which are build with the component,
attribute and container classes of ACAF. The class
CompetitionManagement is the
root business class of the business class composite
, which contains
Season business objects
in its seasons container. Seasons are used to group competitions and the
component name is usually the year, in which the final round of the competition
is played. A season contains
Competition business objects
in its competitions container. Competitions contain the teams,
registered for the competition and the teams contain the players of the team.
Under a competitions rounds, groups, pairings and games can be created, which
define the structure of the competition. Groups and pairings contain
team-classifications, which represent a team in a group or pairing.
Team-classifications have the reference attribute team, which references
either a team, registered for the competition, or the position of another
team-classification in a group or pairing of a previous round, to specify, which
team proceeds the competition in the next round. This attribute is implemented
as weak reference attribute, because its reference path contains an index
expression to specify the position. A reference path, which references the
first team of group A in the qualification round QR may look like
this: Rounds.QR.Groups.A.Classifications. Games contain two references
to the team-classifications representing the teams playing against each other.
These references are implemented as strong references, because they reference
the team-classifications by their component name.
de.tmasoft.acaf.sample.competition.msgcat contains the
message files CompetitionMessageTable.msg and
CompetitionTextTable.msg, where the localized error messages and texts of
the competition management application are defined. These files are translated
by the Message
Compiler to create the property resource files and the enumerations
CompetitionTextTable with the keys
to access the messages. The files contain the texts in English and German. The
ANT script CompetitionMsgCatAntScript.xml, which can be found in the
scripts directory, can be used to compile the message files. Before you
can use the ANT script you have to adjust some location properties to the
directory paths of your programming environment. This ANT script creates also
the following HTML documentation files for the error messages:
CompetitionTextCatalog are used to
access the localized texts in the resource files. These catalog classes are used
to initialize the component base class, the attributes and the enumeration
values to get the display type, display keyword and the string
representation of the enumeration values.
de.tmasoft.acaf.sample.competition.persistence contains the
DatabaseFacade to store
and retrieve the business objects in a relational database. The scripts
directory contains the SQL script CreateCompetitionManagementMySqlDB.sql,
which can be used to create the database tables for the competition management
application in a MySQL
database. The database facade is implemented as
singleton and must be initialized with a database
Connection or a
DataSource. The database facade uses
updatable result sets to store the business objects in the database. It provides
several store and update methods to store and retrieve different levels of the
business object tree and methods to control transactions. So users can perform
several update or store operations in a transaction.
de.tmasoft.acaf.sample.competition.xml contains the
XmlFacade, which can be used to store
and retrieve the business objects in/from a XML file. This facade class shows
how attribute value converters are used to convert values of date, enumeration
and set attributes to XML compliant values.
de.tmasoft.acaf.sample.competition.test contains the JUnit
tests of the competition management application. Before you can run the tests
you have to adjust the constants, which specify the parameters to create the
database connection, which are the JDBC driver class name, the database URL,
user name and password. The unit test methods show, how business objects can be
created with commands and how to store and retrieve the business objects using
the database and the XML facade.