This comparatively large POC generates several files that reproduce
corresponding files from
Sun Microsystems' Java[tm] Adventure Builder Demo (JABD), a new sample
application released with the SDK of the Java 2 Enterprise Edition, version
1.4.
The purpose of this POC is twofold:
- Demonstrate how Somusar's software entities allow to abstract a model decoupling its information contents from the implementation technology;
- Demonstrate how Somusar's generator building services allow to reproduce a significant part of the skills and expertise of master software craftsmen, such as Sun Microsystem's J2EE developers.
The architecture of this POC generator is shown below.
Figure 1 - J2EE generator architecture
The current version of this POC generates
the SQL database schema and two types of Java files
from thirteen software entities. All generated files have been
successfully tested against the original hand-written counterparts within
a working JABD as follows:
- a usage scenario has been tested on the original JABD;
- the original sources have been renamed;
- their place in the build tree has been taken by the corresponding generated files;
- JABD has been rebuilt, and redeployed from scratch;
- JABD has been tested again with the same scenario, to check proper functioning of the system.
The generated SQL schema script "db_schema.sql"
faithfully reproduces file "pointbase.sql"
from the JABD sample application.
The first type of generated Java file implements
the DAO pattern for the Pointbase database. The second type is a
plain Java class, often referred to as POJO (Plain Old Java Object).
The DAO code generator produced the complete code of the
DAO classes, with the only exception of method
PointbaseUserDAO.matchPassword, which was written by hand in file
"project/signon/methods/matchPassword".
The POJO code generator produced the complete code of the
POJO classes, with the only exception of method
AdventurePackage.setHotelItemId, which was written by hand in file
"project/catalog/methods/setHotelItemId".
Table 1 - SQL Generator: Generated Files
File name
|
Source code
|
project/DB/db_schema.sql
|
View
|
Table 2 - SQL Generator: Input Design Files
File name
|
Source code
|
project/db_schema.ef
|
View
|
project/catalog/data/activity
|
View
|
project/catalog/data/adventure_package
|
View
|
project/catalog/data/lodging
|
View
|
project/catalog/data/transportation
|
View
|
project/data/activity_list
|
View
|
project/data/category
|
View
|
project/customer/data/account
|
View
|
project/signon/data/user
|
View
|
Table 3 - DAO Generator: Generated Files
File name
|
Source code
|
project/catalog/LOGIC/PointbaseCatalogDAO.java
|
View
|
project/customer/LOGIC/PointbaseAccountDAO.java
|
View
|
project/signon/LOGIC/PointbaseUserDAO.java
|
View
|
Table 4 - DAO Generator: Input Design Files
File name
|
Source code
|
project/catalog/catalog.ef
|
View
|
project/customer/account.ef
|
View
|
project/signon/user.ef
|
View
|
project/signon/methods/matchPassword
|
View
|
Table 5 - POJO Generator: Generated Files
File name
|
Source code
|
project/catalog/LOGIC/Activity.java
|
View
|
project/catalog/LOGIC/AdventurePackage.java
|
View
|
project/catalog/LOGIC/Lodging.java
|
View
|
project/catalog/LOGIC/Transportation.java
|
View
|
project/customer/LOGIC/Address.java
|
View
|
project/customer/LOGIC/ContactInformation.java
|
View
|
project/customer/LOGIC/Account.java
|
View
|
Table 6 - POJO Generator: Input Design Files
File name
|
Source code
|
project/catalog/activity.ef
|
View
|
project/catalog/adventure_package.ef
|
View
|
project/catalog/methods/setHotelItemId
|
View
|
project/catalog/lodging.ef
|
View
|
project/catalog/transportation.ef
|
View
|
project/customer/address.ef
|
View
|
project/customer/contact_information.ef
|
View
|
project/customer/account.ef
|
View
|
[Previous chapter]
[Next chapter]
[Back to top]
|