The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Nifty BOSS Helper

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Nifty BOSS Helper Posted: Oct 6, 2003 10:20 AM
Reply to this message Reply

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.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement
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:


stream := 'somefile.bos' asFilename readStream.
bos := BinaryObjectStorage onOld: stream.

With Dave's changes, you do it like this:


mappings := Dictionary new.
mappings at: 'Foo.Bar' put: 'Baz.Bar'.
stream := 'somefile.bos' asFilename readStream.
bos := BinaryObjectStorage onOld: stream withMappings: mappings.

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.

Read: Nifty BOSS Helper

Topic: Blog Comment Issues Previous Topic   Next Topic Topic: Better All the Time

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use