[squeak-dev] Trivial questions?
Smalltalk at JGFoster.net
Thu Dec 31 16:36:07 UTC 2009
On Dec 31, 2009, at 12:29 AM, Friedrich Dominicus wrote:
> Dear Smalltalker, I'm trying to get into Smalltalk a bit more
> seriously. I'm especially currently trying to get into Seaside
> programmming and the persistence of Objects. I found GLASS, which seems
> to be remarkabel in that aspect.
> Now I wonder
> 1) How does one do versioning in Smalltalk. AFAIU it seems, one files
> out ChangeSets which then can be read in in another image. Am I wrong
> about that?
As mentioned, Monticello is typically used in Squeak/Pharo/Gemstone. Other dialects (implementations) of Smalltalk have their own, proprietary approach to code versioning. In Cincom Smalltalk it is Store; in VA Smalltalk it is Envy; and in Dolphin it is Source Tracking System.
> 2) How does one Data Migration in Smalltalk? I just know it from Rails,
> where one has migrations, but how's that done in the Persistence layers
> of some Smalltalk. E.g what happens if I add or remove instance
I discussed how GemStone handles this in a recent presentation. You can watch it by selecting the video on class versions at http://programminggems.wordpress.com/2009/12/01/smalltalks-2/.
> There are somewhat related question but more about GLASS. I read teh
> gemstone soup up and down, and was able to install the Web Edition on my
> System also. It was a few days work but I learned a lot. However I found
> just a few videos about Gemstone, but not more "serious" use (with more
> database related stuff, scheme changes etc).
GemStone's Programming Guide has an entire chapter on migrating objects. See "Class Versions and Instance Migration" in the Programming Guide found (near the bottom right) at http://seaside.gemstone.com/about.html.
> Would you mind to share your experiences?
The great thing about Smalltalk, is that objects encapsulate state and behavior, and the only access to the state is by sending a message. In a dynamic system (like Smalltalk), the sender of the message does not know the position (or even the existence) of instance variables, so the receiver can "intercept" the request and choose to handle it in its own way. Thus, if a person has a dateOfBirth but not an age instance variable, a request for an age can return the correct answer by calculating the age from the dateOfBirth.
> Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim
> Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
Keep those questions coming!
More information about the Squeak-dev