Navigation:  Tutorials > Creating a GUI Application >

Designing the Domain Models

Previous pageReturn to chapter overviewNext page

The next stage in New Application is to design the domain level classes. This stage is perhaps somewhat different from other visual programming systems which encourage you to build an application starting with the user interface. Although it is possible to build an application this way in Dolphin, we would recommend against it since it can obfuscate the design process. It is much cleaner to design and build the core of the system, the domain model, first and then to add the user interface classes subsequently. Indeed, this is just as easy as the standard "visual method" because the Smalltalk development environment provides tools to directly test the domain classes as you go; you do not need to build a user interface to do this.

We're going to add 3 domain level classes for our application.

PersonalMoney. This class will maintain and owner's name and a list of accounts.
PersonalAccount. This class will maintain account details and a list of transactions on that account held in date order. It will also provide a facility to calculate the current balance of the account.
PersonalAccountTransaction. Instances of this class represent transactions on PersonalAccounts. Each one holds details such as the amount, the description, and the date of the transaction.

For each of these classes we'll follow the New Class pattern.