The basic sample application shows how to create a simple application that fulfills the following functional requirements :
|Create Student||Create and add new students to the system|
|Delete Student||Remove a selected student from the system|
|Edit Student Data||Edit and update a selected student|
|Show Students||Show a list of students available in the system|
|Show Student Data||Show the data of a selected student|
|Sort||Sort the list of students by a given sort order|
|Change SortOrder||Change the order of the list to matrikel number or last name|
|Export students||The generated list can be exported in different formats, including HTML and XML|
The user interface looks somewhat like this:
The above illustration shows the two building blocks of the basic example: The core package and the basic package. The core package consits of several interfaces that define the behaviour/functionality of a couple of services (they act as "contract"). These interfaces are implemented by the the services of the basic package. If you use this services in your code, they can be exchanged through any other package which implements the interfaces of the core package.
The core package also contains the data objects (often refered to as model , transfer objects or value objects ). The data objects do nothing but hold the data; they represent the entities in the system. They are read from the database, modified in the business layer and sent to the presentation layer to be shown to the user. They are common to all the examples (basic, medium and advanced).
To separate the concerns, this sample uses the MVC (ModelViewController) pattern. In the MVC, our data objects are the model, the (Spring) services are the controller and the Swing presentation layer is the view. If you are unfamiliar with the MVC pattern, this page might give you a short introduction: http://java.sun.com/blueprints/patterns/MVC.html . For in-depth discussions, check out: http://c2.com/cgi/wiki?ModelViewController .
The code is heavily documented and also containts Javadoc comments. It makes sense to read the code or look at the Javadoc.
This example uses the following technologies:
Patterns are essential for any architecture in terms of understanding and extending source code. Basically you should get familiar with every pattern described in the Software Patterns section. In general, the basic example makes use of these Patterns:
The following steps must be taken to run the Basic Sample.