[Seaside] ROE - Public Store

Travis Griggs tgriggs at key.net
Thu Apr 1 09:19:40 CEST 2004

Brett Taylor wrote:
> Travis,
> The code is in the Smalltalk.ROE namespace.  Is this how you would do
> it?  I originally did the class name transform manually. The code reads
> a little better in my opion.  I hadn't automated it so I went back to
> the RA class name prefix to keep porting the code as simple as possible.
> I might try using the Refactoring Rewrite Tool to automate the
> translation of Class names (I always have to relearn how to use). I'll
> give it a try and publish it.

That is exactly how I would do it. I got so excited I had to go and load 
it (instead of waiting til Friday). My response could be longish, I'll 
use headers to break it up. :)


I made a change; a change that you're free to say "no Travis, I did it 
first, do it my way". I loathe Bundles for a litany of reasons (I don't 
mind categories), I even know that my loathing seems to be somewhat of 
minority, so don't take it personally. :) Anyway, I "refactored" the 
packages into three Packages:

+ ROE-SqueakCompatibility - similiar to the one you had, but restricted 
as best as I could to class extensions which would be found in a Squeak 
image regardless of ROE being loaded or not
+ ROE - mostly everything else, I left all of the categories in place
+ ROE-SUnitTests - all of the Tests, pretty much the same thing as yours 
but I didn't want to overwrite your work, so I used a different name

Packaged such, I could entertain the NewPrerequisiteEngine to compute 
prereqs for them and did so, they each have fully fleshed prereqs. 
Anyway, like I say, you can ignore my repackaging entirely, look at them 
and tell me no way, etc. I did it as a demonstration of doing it without 


I figured out a general workspace snippet to rename all of the classes. 
It looks something like:

Roe classes do:
			[:each |
			('RA*' match: each name)
					[| refactoring |
					Transcript show: each name; cr.
					refactoring := (RenameObjectRefactoring renameObjectNamed: each 
						to: (each name copyFrom: 3 to: each name size)).
					refactoring transform.
					RefactoringManager instance addRefactoring: refactoring]]

The "Transcript show:" is in there, because it takes a bit of time to 
crunch through it all and it gives you a sanity check that it is making 
progress. What it does not do for you is provide back pointer aliases so 
that new fileins from Squeak would be able to find the newly named class 
and add/remove/modify code to it. One way to do this *might* be to have 
a separate package which provided class aliases in the Smalltalk 
namespace. For example, when renaming ROE.RABinaryNode to 
ROE.BinaryNode, it also does a (Smalltalk at: #RABinaryNode put: 
ROE.BinaryNode). It's a thought.

Also, is there a better name for RAPrinter than Printer? It's just a 
SerializationVisitor, right?


One of the things I noticed with the package refactoring, is that ROE 
wanted to depend on ROE-SUnitTests (which in turn of course depends on 
it). This seemed to be caught up in MappedCollection. I didn't spend too 
much time chasing it (got to get home and go to bed so I can go spring 
skiing tomorrow).


Having it in VW with the RB, gave me the chance to throw the Code Critic 
at the ROE package. I took a snapshot of the top level report window and 
attached it as a .png for any that are interested.


Most of the tests passed. Except TestSemantics. All of those failed. It 
looks like maybe this is an abstract test class...? And 
TestSyntax>>testErrors failed as well. Other than that, lots of green 
test tubes. :)

Travis Griggs
Key Technology
Achille's Heel?!?! What about "Goliath's Forehead"

This email message is intended only for the addressee(s) and contains information that may be confidential to and/or copyrighted by Key Technology.  If you are not the intended recipient, please notify the sender by reply email and immediately delete this email.  Use, disclosure or reproduction of this email by anyone other than the intended recipient(s) is strictly prohibited.  Any views expressed in the email are those of the individual sender unless the sender expressly states them to be the views of Key Technology.  No representation is made that this email or any attachments are free of viruses.  Virus scanning is recommended and is the responsibility of the recipient.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attach
Type: image/png
Size: 10580 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20040331/1abf7567/attach-0001.png

More information about the Seaside mailing list