Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!agate!library.ucla.edu!news.bc.net!torn!fonorola!flexnet.com!news
From: hollings@flexnet.com (William Hollings)
Subject: Re: Data Persistence
Organization: The Brenwill Workshop Ltd.
Date: Thu, 25 May 1995 00:26:38 GMT
Message-ID: <D93yKF.3zJ@flexnet.com>
X-Newsreader: WinVN 0.92.6
References: <3pt7fp$ro6@ixnews3.ix.netcom.com>
Sender: news@flexnet.com (News Admin User)
Lines: 62

In article <3pt7fp$ro6@ixnews3.ix.netcom.com>, markrk@ix.netcom.com (Mark Kochendorfer) says:
>
>I am interested in learning more about Smalltalk.  I have read about
>the
>language, but there is a lot I don't quite understand.
>
>Is Smalltalk really an object oriented language?  I thought that I read
>that one of the benefits of objects was that they encapsulated the data
>and that the data could only be changed by methods contained in the
>object.
>

Smalltalk is about as Object-Oriented as it gets in the physical universe.
Within a Smalltalk environment, data is completely Encapsulated within
objects. All access to the internals of an object are strictly under
the control of that object's protocol interface (the set of messages that
it understands). Smalltalk also rigorously defines and supports the other 
major OO concepts: Inheritance (abstraction and code reuse) and
Polymorphism (the ability to define how an object interacts with other
objects simply by the protocol it understands and not by its type or 
location in the class hierarchy. Smalltalk's dynamic binding of objects
during message sending makes this work to near perfection).

>When I went to see a presentation by Digitalk they talked a lot about
>using Smalltalk to update relational databases.  They also seemed to be
>saying that any data not stored by Smalltalk in a database went away
>when the computer was shut off--no persistence I think it was called.
>
Unfortunately for the purists, Smalltalk rarely exists in a vacuum,
and often needs to interact with non-Object Oriented systems. Currently,
the most notorious of these non-OO systems is the relational database.
Although Smalltalk running on a single-user system does enable object
persistance (via saving your image at the end of your session, or firing
them out to Object Files), a typical multi-user client-server environment
uses RDB's to store most data. It is important to realize that the 
decision to store all (volitile) data on the server in an RDB is an
application design issue, and has nothing to do with Smalltalk's
inherent abilities or lack thereof.


>When Smalltalk is used in a multiuser application where is the data
>stored typically?

Using an Object Oriented Database (OODB) as a server to a Smalltalk
client allows for a completely object-oriented system, where persistance
becomes built into the object environment. However, due to their 
relatively recent appearance in the client server world, most 
corporate systems that use a Smalltalk client currently use an RDB
as the data server.

>How is its integrity ensured if Smalltalk is not doing it?
>

Data integrity in a Smalltalk client-server world is handled exactly
the same as any other client-server system, it is an application
design issue. Smalltalk RDB interfaces provide as much functionality
to support RDB integrity as any other client development environment.
Similarly, exactly the same issues of integrity, concurrency, transactions,
commits and rollbacks exist for OODB's as for RDBs.


>Mark Kochendorfer
