Why make donate

Business

author :
revision : 2773
date : 2009-09-09 12:05:20 +0200 (mer., 09 sept. 2009)

DTO

The dto package does the communication between the web client and the persistence part of the application. For maintainability and uncoupling needs, the client does not manipulate directly database objects and so use a simplified representation of the entities located in the persistence layer.

The dtos class model put in place in Pollen-Business module is the following :

Pollen-Business modules's DTO

This modeled is based on the poll notion, by this way, in only a distant call (in a distributed architecture) all the poll information is restored. Moreover, to ake into account a further evolution to a fully distributed architecture, each dto does the serializable interface allowing to serialize the dto object created for a distant transfer (this aspect is not shown on the diagram).

Services

In our service oriented architecture, the services are a facade giving access to the persistence management to the client, it shows a certain number of operations, hidding their implementation to the client. To do so, it is based on the DTO pattern to exchange info with it.

This model presents the service exposed for poll management.

Poll component services

It is necessary to transform the dtos exchanged with the client into an entity to persist the data and perform the opposite operation to give data to the client. Those operations are taken into account specifically for the poll by the DataPollConverter class.

Moreover, we can note that managing polls, the service can make calls to other services such as choices management service, comments management services, ...

Create a poll

The sequence diagram shows the message exchanges between Pollen-Business component classes during a service creation.

Sequence diagram : poll creation

Persistence

Using ToPIA-Persistence API, we have to manage a global context loading the JDBC connection to the database properties and creating sub-contexts used for transactions to the database.

The global persistence context for the application is managed under a singleton form, its classes manipulating those concepts are the following :

Utils classes for the database connection

The contextUtil class also allows to load the referential tables (vote counting type, poll type, list type, choice type) that do not have their own UI for the moment from the pollenconfig.properties file.