[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Prototypes ...
I once read ( in IEEE Software, I think ) a paper about the pains of learning
Smalltalk. One of the worst problems these guys had was when they were
inspecting some graphical object they had created and found it contained a
form. They called the bitmap editor to change the form and discovered, only
too late, that they had currupted the system form "black"! The system could
no longer draw anything black and the screen eventualy became all white.
Class-based languages may be less subject to this type of problem but, as
this story shows, they are not immune to it. If we throw in persistance
( and I believe we should ) then the problem becomes much more serious because
many objects will be built directly by the user: you can't reconstruct it
by filing in some code since that code never existed.
Auto-copying prototypes help a lot in case of programming errors. For other
cases of prototype curruption I have a classical solution. I am thinking of
a system where many users on a network share a single image. If each object
had an associated user and status ( private, readable, public ) and the
system form "black" was a readable object belonging to the superuser then
normal users could read it or copy it but could never harm it. It could still
be edited by the superuser if that was ever needed. This way we avoid filling
our system with copies of important but unchanging objects.
Jecel