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? 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 variables? 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) Would you mind to share your experiences? Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus |
On Thu, Dec 31, 2009 at 09:29:01AM +0100, 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 Welcome! > 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? ChangeSets are a traditional way of doing this, and are still very useful for organizing your work (in Squeak they are associated with Projects, so you can have a Project with a ChangeSet that represents some aspect of the system that you are working on). Nowadays, most serious work is done with the Monticello change management tools. You can read about Monticello here: http://wiki.squeak.org/squeak/1287 So it is a good idea to learn how to use ChangeSets first, but as soon as you have done this you will want to learn how to use Monticello for version management and sharing your code between images. > 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 > variables? I don't know enough about Rails to understand the question, but in general it is straightforward to add and remove instance variables in Smalltalk. > 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) Would you mind to share > your experiences? Probably others on this list can give you some ideas, but I'll mention also that there is a Gemstone mailing list that may help. "GemStone Smalltalk Customer Forum" <[hidden email]> List-Subscribe: <mailto:[hidden email]> List-Owner: <mailto:[hidden email]> Dave |
On 2009-12-31, at 6:58 AM, David T. Lewis wrote: >> 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 >> variables? > > I don't know enough about Rails to understand the question, but in > general it is straightforward to add and remove instance variables > in Smalltalk. Hi Friedrich, David didn't understand the question because data migration is generally a non-issue in Smalltalk. When you add or remove an instance variable, the instances of that class are automatically migrated for you. There's a class called ClassBuilder that handles this as part of creating the new class. It builds the new class, locates all the instances of the old class, creates equivalent instances of the new class, copies instance state to the new instances and updates all object reference to point to the new instances. Finally, the old instances are discarded and available for garbage collection. The one area where data migration does become an issue is when objects have been serialized and stored outside an image. Then reading them back into an image requires migration. There are various methods of doing this, and they tend to depend on the particular needs of your application. Of course, if you're using Gemstone, there's not much need to store objects outside an image. :-) Colin |
In reply to this post by FDominicus
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. Welcome! > 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 > variables? 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. > Regards > Friedrich > > -- > Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim > Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus Keep those questions coming! James Foster http://programminggems.wordpress.com/ |
In reply to this post by FDominicus
If you're a Rails developer and you're talking about "Data Migration,"
I'd guess your talking about database management with ActiveRecord? So, ActiveRecord (in the context of Ruby) in an implementation of a design pattern of the same name. ActiveRecord is an ORM, so maybe you should have a look at Glorp (which is also an ORM, but for Smalltalk.) Also, you should give Magma a try too. I played around with it over a weekend, and was nearly convinced that I'd rather never deal with SQL or ORMs every again. Nearly:) Anyway, most of the time you won't need a database until your app needs to scale past a demo, because you can just use image based persistence when developing. Hopefully some of that helps. On Thu, Dec 31, 2009 at 12:29 AM, Friedrich Dominicus <[hidden email]> 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? > > 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 > variables? > > 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) Would you mind to share > your experiences? > > Regards > Friedrich > > -- > Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim > Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus > > -- Ron |
In reply to this post by Colin Putney
On Thu, Dec 31, 2009 at 10:40 AM, Colin Putney <[hidden email]> wrote:
I love this! I never tire of hearing about problems in other systems that simply don't exist in Smalltalk (and which a Smalltalker often can't even contemplate), or which are so elegantly dealt with that you don't even think about them ...and I hear them all the time!
- Stephen |
On Thu, Dec 31, 2009 at 09:59:17PM -0500, Stephen Pair wrote:
> On Thu, Dec 31, 2009 at 10:40 AM, Colin Putney <[hidden email]> wrote: > > > David didn't understand the question because data migration is generally a > > non-issue in Smalltalk. > > > > I love this! I never tire of hearing about problems in other systems that > simply don't exist in Smalltalk (and which a Smalltalker often can't even > contemplate), or which are so elegantly dealt with that you don't even think > about them ...and I hear them all the time! > > - Stephen > |
In reply to this post by Stephen Pair
On Thu, Dec 31, 2009 at 09:59:17PM -0500, Stephen Pair wrote:
> On Thu, Dec 31, 2009 at 10:40 AM, Colin Putney <[hidden email]> wrote: > > > David didn't understand the question because data migration is generally a > > non-issue in Smalltalk. > > > > I love this! I never tire of hearing about problems in other systems that > simply don't exist in Smalltalk (and which a Smalltalker often can't even > contemplate), or which are so elegantly dealt with that you don't even think > about them ...and I hear them all the time! Hello Stephen, What an odd coincidence that you should happen to reply to this thread. It just happens that earlier today I was trying to collect various archival versions of SystemTracer in hopes of collecting it into a Monticello archive and bringing it up to date with the latest 64-bit image tracing changes. I was not able to locate a copy of your SystemTracer2.sar, which is referenced from SqueakMap: http://people.advantive.com/~spair/squeak/SystemTracer2.sar If you happen to have a copy sitting around on a floppy disk or some such thing, I'd appreciate very much if you could send it to me (or reply to this list). Also, it seems that having things like this be MIT licensed is considered a good thing in some circles, so you are able to release your work as MIT licensed, please mention that for the record. Thanks! Dave |
In reply to this post by Colin Putney
Colin Putney <[hidden email]> writes:
> On 2009-12-31, at 6:58 AM, David T. Lewis wrote: > >>> 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 >>> variables? >> >> I don't know enough about Rails to understand the question, but in >> general it is straightforward to add and remove instance variables >> in Smalltalk. > > Hi Friedrich, > > David didn't understand the question because data migration is > generally a non-issue in Smalltalk. When you add or remove an instance > variable, the instances of that class are automatically migrated for > you. There's a class called ClassBuilder that handles this as part of > creating the new class. It builds the new class, locates all the > instances of the old class, creates equivalent instances of the new > class, copies instance state to the new instances and updates all > object reference to point to the new instances. Finally, the old > instances are discarded and available for garbage collection. Well that' why I asked because I found nothing about it in the videos I've seen. So either it it "trivial" or so difficult that nobody dared to do it ;-) > > The one area where data migration does become an issue is when objects > have been serialized and stored outside an image. Then reading them > back into an image requires migration. There are various methods of > doing this, and they tend to depend on the particular needs of your > application. Of course, if you're using Gemstone, there's not much > need to store objects outside an image. :-) I'm not yet decided, but it seems Gemstone is the most elaborate in that area and it seems to be rock solid. I'm not that much a fan of things which have not shown (yet) that they can handle that kind of stuff. Just imagine, I´d decide to go on "own" way just to figure out. Well Friedrich, you did not get it right.... Regards Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus |
In reply to this post by jgfoster
James Foster <[hidden email]> writes:
> 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. > > Welcome! > >> 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. Monticelle on every of them.... > >> 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 >> variables? > > 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/. Thanks, I'll look into it today. > >> 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. Ah I have over-read it on the first round. Thanks Friedrich -- Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus |
Free forum by Nabble | Edit this page |