ISBN-10:
0201737930
ISBN-13:
9780201737936
Pub. Date:
12/21/2001
Publisher:
Pearson Education
The Dolphin Smalltalk Companion: A Hands-on Guide to Building Complete Applications / Edition 1

The Dolphin Smalltalk Companion: A Hands-on Guide to Building Complete Applications / Edition 1

by Ted Bracht

Multimedia Set

Current price is , Original price is $41.99. You

Temporarily Out of Stock Online

Please check back later for updated availability.

This item is available online through Marketplace sellers.

Product Details

ISBN-13: 9780201737936
Publisher: Pearson Education
Publication date: 12/21/2001
Edition description: BK&CD-ROM
Pages: 336
Product dimensions: 9.21(w) x 7.36(h) x 0.28(d)

Table of Contents

Preface.
1. Introduction.
The Smalltalk language.
The Dolphin Smalltalk environment.
The file setup.
The Launcher.

The workspace.
Playground.

2. The application.
What we are going to build.
How we are going to build the application.
A standard pattern for the components.

3. The first application component: the Team.
The Team model.
The class hierarchy browser.
Creating our first class.
Summary.

The Team presenter.
Summary.

Creating a view.
The view composer.
The Team view.
Testing the Team view.
The finishing touch.
The Microsoft look.
Summary.

Some basic maintenance work.

4. The Driver component.
The Driver model.
The abstract RacingActor class.
Modifications to the Team class.
The Driver class.
Summary.

The Driver presenter and view.
The Driver presenter.
The Driver view.
Testing the view.
Summary.

The driver's gender.
The 1-of-n variable in the model.
Presenting 1-of-n variables.
Radio buttons.
List presenters.
Summary.

Some looseends.
The caption.
A picture paints a thousand words.
Summary.


5. The Season component.
The Season model.
The Collection classes.
The score definition.
Summary.

The name of an object.
The Season presenter and view.
The SeasonDialogPresenter definition.
The Season view.
Copy and deepCopy.
Summary.

Multi-column lists.
A virtual list.
The multi-column ListView.
Summary.


6. The RaceCar component.
The RaceCar model.
The RaceCar class definition.
The starting number.
The Team association.
The default driver.
The link with the season.
Summary.

Error handling and the debugger.
Error handling in Dolphin Smalltalk.
The debugger.
Debugger playground.
Another way of writing Smalltalk.
Our own error handling mechanism.
Summary.

The RaceCar presenter and view.
The lists of teams and drivers.
The RaceCarView as subclass of the Shell class.
Building the view for the race cars.
Summary.


7. The Circuit component.
The basic Circuit model.
The length of the circuit.
The lap record.
Summary.

The Circuit presenter and view.
The milliseconds TypeConverter.
The length of the circuit.
Summary.


8. The Race component.
The Race model.
The Race presenter and view.
The Race dialog.
The main Race view.
Entering the results.

Sorting the starters.
Summary.

9. Bringing the components together.
The basic racing application model.
The model.
The race application presenter.
The application framework view.
Summary.

Maintaining items.
The maintenance methods.
Context menus and menu bars.
Enabling and disabling commands.
Toolbars.
Summary.

Integrating the season-dependent components.
The tree model.
Add branches for the Race and RaceCar.

Tidying up the race application components.
Global variables revisited.
Opening a race for the results.


10. The results.
The results for the season.
Collecting the results.
A presenter for the results.
Showing the results in the application shell.
Dynamic resizing of multi-column lists.
Summary.

A graph of the results.
A short information requirement analysis.
The LineGraph view.
A user-definable graph.
Summary.


11. Saving and importing the race data.
Saving object data.
Modifications to the presenter and the view.
Modifications to the models.
Save data on exit.
Summary.

Importing comma-separated data.
A generic import class.
The data import wizard.
Summary.

Importing from the Web.
The HTML import model.
The Web data import wizard.
Summary.

XML data.

12. Application deployment.
Making an executable.
Web deployment.
Summary.

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.
Index.

Preface

When I tried to learn Smalltalk, it took me a long time to work out how to use it to build real applications. I could see how to execute snippets of code, and even how to make those snippets of code permanent. I bought a couple of books, and they helped me to understand more of the language, how to become a better object-oriented designer, how to make better use of the standard classes, but I still couldnít see how to build a complete application in Smalltalk.

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.

Acknowledgments

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.

 

Ted Bracht

September 2001

 

 

 

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews