This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Nifty BOSS Helper
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
I've posted on BOSS schema migration before, and now Dave Murphy has published a nifty package in the public store - BOSSClassMappings - that will help out in wider circumstances. The standard migration mechanism works for the straightforward cases - i.e., you have added/removed/changed instance variables - the most common being that version 1 of a class has N instance variables, and version 2 has N+1. But what if the change is bigger? What if you either:
Moved a class or classes to a different namespace?
Renamed a class?
You can handle these in schema migration code, but with complexity. What Dave has done is publish a package that makes it easier. Normally, I open an existing BOSS file for reading like this:
What you'll then get is that all instances of class Foo.Bar will map over to instances of Baz.Bar. This is something that should make the work Rich Demers is doing on BottomFeeder much easier to integrate - he's building a brand new domain, and the current save files reference the current one. What this also does is make refactorings less onerous in the face of an installed base - one of the reasons I haven't rearranged the existing domain was the hassle of dealing with this problem. Nifty piece of work.