Re: Collaborative development on Smalltalk?
- From: "mdr" <mroberts@xxxxxxxxxx>
- Date: 14 Jan 2006 23:18:01 -0800
David Given wrote:
> > Your application has an "initialize" method that resets the cache and
> > perhaps populates it with some default info. E.g.:
> >
> > initialize
> > "Build the StuffCache"
> > MyAppStuffCache := Dictionary new.
>
> Yes, that's what I expected after giving it a little thought --- it's the
> obvious way of doing it. This would mean, however, that your application
> lifecycle becomes rather vaguely defined (another reason for starting an
> image from scratch every day, I'd assume) --- if you had two classes that
> mutually depended on private state, then reinitialising one of them could
> cause your application to get confused.
Right, in the design you mention there could be a problem. In that
scenario, you could simply add another line of code in the #initialize
method to clear all the caches that depend upon each other, which would
make the relationship of dependency more explicit as well.
I can't speak authoritatively on this, but my impression is that many
developers who use image-based development don't start with a new image
every day. Rather, they make a new one every week or so (some perhaps
longer), and just make a bunch of snapshots (checkpointing the image)
in between. This is the fastest and easiest way to work, as it only
takes a few seconds to make a snapshot of the image. The repository can
also be used to checkpoint changes, and every code change that you make
or snippet of code that you execute is recorded in a local "changes
file", which you can later scan and selectively replay if you get into
any sort of trouble between the times that you versioned a component in
the repository.
Unless you are for some reason tweaking part of the base image itself
(UI framework, debugger, etc), the image is quite stable and one seldom
needs to start anew to clear up problems with "confusion" in the image.
If you prefer to start fresh more often and your project is small to
medium-sized, it's fairly quick to build a new image. When using a VCS
like Store, you can set up pre-requisites on the components so that you
just load the main bundle for your project and the VCS will load
everything that it needs before.
However, for very large projects that require loading lots of
components, or if the repository is on another continent and database
latency acorss the ocean slows the loading, then being able to just
continue using the same image for a week or longer can be a real
time-saver.
> Just out of interest, are there any documents you can point me at describing
> best practices for building large, multi-component applications in
> Smalltalk? e.g., patterns for storing state, recommended ways of using
> namespaces, etc.
I don't know which of the commercial books might cover this, or if
there are any books that contain exactly this discussion more than one
dialect, but for VisualWorks you might start by skimming parts of the
PDF documentation. In particular:
Applcation Developer's Guide
http://www.cincomsmalltalk.com/pdf/AppDevGuide.pdf
Source Code Management Guide
http://www.cincomsmalltalk.com/pdf/SourceCodeMgmtGuide.pdf
The Application Developer's Guide has a chapter dedicated to name
spaces, and a pointer to more documentation on the subject. It's
basically a user's guide for the IDE, not really a book about best
practices, but it tends to promote the "standard" approach to
application development.
HTH,
M. Roberts
Cincom Systems, Inc.
.
- Follow-Ups:
- Re: Collaborative development on Smalltalk?
- From: Chris Uppal
- Re: Collaborative development on Smalltalk?
- References:
- Collaborative development on Smalltalk?
- From: David Given
- Re: Collaborative development on Smalltalk?
- From: Mike Hales
- Re: Collaborative development on Smalltalk?
- From: David Given
- Re: Collaborative development on Smalltalk?
- From: David Buck
- Re: Collaborative development on Smalltalk?
- From: David Given
- Re: Collaborative development on Smalltalk?
- From: mdr
- Re: Collaborative development on Smalltalk?
- From: David Given
- Collaborative development on Smalltalk?
- Prev by Date: (VW7.4) Can't find GHNamespace that's needed
- Next by Date: Re: Collaborative development on Smalltalk?
- Previous by thread: Re: Collaborative development on Smalltalk?
- Next by thread: Re: Collaborative development on Smalltalk?
- Index(es):
Relevant Pages
|