The Joist Framework
The basic design follows a three-tier architecture. The UI component is separate from the business logic, which is distinct from the data storage. In broad strokes:
- The UI is implemented using WebMacro templates. WebMacro is an open-source templating engine developed for java servlets (more later).
- The business logic is implemented as java servlets and application specific business classes.
- The data storage is implemented in a MySQL relational database accessed via JDBC.
Separation of User Interface from Business Logic
Ignoring the data storage for the time being, the application servlet is split into two main parts: the business logic and the user interface. This dichotomy reflects the current best practices for application development. The business logic deals with satisfying the requested action, such as an update or a query, and determines what should be displayed as a result. The user interface determines how the results are displayed to the user. The business logic is coded in java as a servlet. The user interface is coded in HTML as a WebMacro template.
This split allows for parallel development of the business logic and user interface. These are often done by different individuals, each bringing unique talents to their tasks, and their skill sets do not overlap, as a rule. The UI designer can develop templates in html without worrying about how the data is retrieved. The business logic author can develop java code to accomplish application tasks and retrieve data to be sent to the user without worrying about how that data is presented. The UI designer and the java coder simply agree on what data is of interest, and each can then go off and work independently.
The split also allows for multiple UI's to sit on a given servlet. By the same token, a single UI could serve for multiple servlets. By splitting UI from business logic, we can mix and match as the situation dictates.
The Business Logic Tier
The business logic resides primarily in a set of DataManager classes. Generally, there is a DataManager class for every kind of business object. Nearly all sXc biz objects are stored in the database. TableManager is a subclass of DataManager specifically for managing relational tables.