The Dolphin Smalltalk Companion: A Hands-on Guide to Building Complete Applications / Edition 1 available in Multimedia Set
- Pub. Date:
- Pearson Education
The first book to cover the creation of a complete application with Dolphin Smalltalk!
Dolphin Smalltalk is a pure object-oriented programming language that enables you to build applications that are fully featured and easy to maintain. If you have no previous programming experience or want to build on your knowledge of Smalltalk, this book is for you. It will show you, step-by-step, how to design and build a complete application in Dolphin Smalltalk.
You will learn:
- How to split an application into components
- How to build these components using object-oriented techniques
- How to apply principles learned in developing different applications
- A running example throughout the text, using Formula One results tracking and score-keeping to illustrate the framework in which the whole application works
- CD ROM containing Dolphin Smalltalk 4.0, plus source code for all the chapters
|Product dimensions:||9.21(w) x 7.36(h) x 0.28(d)|
Table of ContentsPreface.
The Dolphin Smalltalk environment.
2. The application.
How we are going to build the application.
A standard pattern for the components.
3. The first application component: the Team.
Creating our first class.
The Team presenter.
Creating a view.
The Team view.
Testing the Team view.
The finishing touch.
The Microsoft look.
Some basic maintenance work.
4. The Driver component.
Modifications to the Team class.
The Driver class.
The Driver presenter and view.
The Driver view.
Testing the view.
The driver's gender.
Presenting 1-of-n variables.
A picture paints a thousand words.
5. The Season component.
The score definition.
The name of an object.
The Season presenter and view.
The Season view.
Copy and deepCopy.
The multi-column ListView.
6. The RaceCar component.
The starting number.
The Team association.
The default driver.
The link with the season.
Error handling and the debugger.
Another way of writing Smalltalk.
Our own error handling mechanism.
The RaceCar presenter and view.
The RaceCarView as subclass of the Shell class.
Building the view for the race cars.
7. The Circuit component.
The lap record.
The Circuit presenter and view.
The length of the circuit.
8. The Race component.
The Race presenter and view.
The main Race view.
Entering the results.
Sorting the starters.
9. Bringing the components together.
The race application presenter.
The application framework view.
Context menus and menu bars.
Enabling and disabling commands.
Integrating the season-dependent components.
Add branches for the Race and RaceCar.
Tidying up the race application components.
Opening a race for the results.
10. The results.
A presenter for the results.
Showing the results in the application shell.
Dynamic resizing of multi-column lists.
A graph of the results.
The LineGraph view.
A user-definable graph.
11. Saving and importing the race data.
Modifications to the models.
Save data on exit.
Importing comma-separated data.
The data import wizard.
Importing from the Web.
The Web data import wizard.
12. Application deployment.
Appendix A. Other Smalltalk resources.
Appendix B. Overview of the main classes.
Appendix C. Additional tools.
Appendix D. Date and Time field formatting.
Appendix E. The CD.
This book will therefore take you through the creation of a complete application with Dolphin Smalltalk. Thus this book differs from most other books on Smalltalk, which typically explain the language and show you some examples. This book will not cover all the ins and outs of the Smalltalk language ñ there are too many good books around to compete with. See Appendix A for a number of suggested additional reads. But as we will be writing quite a lot of Smalltalk code throughout this book, Chapter 1 gives a brief introduction to the Smalltalk language and the Dolphin Smalltalk development environment. Appendix B contains some additional explanation on the major Dolphin Smalltalk classes.
One of the most difficult choices to make in a tutorial is which domain (business case) to use to illustrate the material. The domain has to have something recognizable for readers so that they can translate the examples into their own environment. It also has to have enough aspects so that a wide variety of the available functionality of the programming language can be demonstrated and it has to allow us to start simply. The tutorial used in this book is built around an application which we can use to maintain the scores for Formula One(F1) motor racing. The marginal notes show which aspects of the Smalltalk language will be discussed in that section.
We start the tutorial with simple building blocks which we will later glue together in an application framework. Then we will build some more advanced components that allow us to import data and show data in graphical form. We will come across some issues that are specific to Formula One racing, but much of the functionality that we will be building can easily be adapted for other sports. Formula One racing is about teams and drivers. Most other sports have equivalents, for example football where it is all about teams and the players within the teams. In F1 a driver scores points, which also make up the teamís points. In football the player scores, and the end result defines the points scored by a team. Stretching the example a bit, you can even think of similarities with a business application such as a bank account application, where you have ìstatic dataî like the bank account which bears similarities to the team, and ìdynamic data,î the transactions, which bear similarities to the results of races.
As Smalltalk is an object-oriented programming language, we will approach the design of the application by trying to find the objects in the domain and build the functionality around those objects which together make up the application.
This book comes with a CD. This CD contains the Dolphin Smalltalk development system and the code for all the chapters. Appendix E describes how to install Dolphin Smalltalk and how to use the code for the individual chapters.
First, I want to thank Debbie Griffiths for her patience and support while I was writing this book. Even though she didnít and surprisingly still doesnít have any interest at all in the subject, she was always willing to listen to whatever I wanted to explain to her in order to marshal my thoughts.
I would also like to thank Blair McGlashan and especially Andy Bower from Object Arts, for their encouragement to produce this book and of course for bringing Dolphin Smalltalk to market. Furthermore, I want to thank Peter Kriens for enthusiastically in´´roducing me to Smalltalk back in the 1980s. Thanks to Till Sch¸mmer, Roel Wuyts and Stephane Ducasse for help in shaping the bookís structure and contents. Finally I want to thank Steve Waring and Ian Bartholomew for their coding suggestions and everybody else in the Dolphin Smalltalk newsgroup community who supported me with coding issues and other suggestions. Susan Harrison deserves to be ackowledged as well after the amount of energy she put in to get the book looking like it does.