Porting from VisualWorks to Squeak

The Port

Script to prepare the VW code

| classPrefix categoryName |
classPrefix := 'XY'.
categoryName := 'Squeak Category Name'.
 PackageName classes do: [ :each |
    each category: categoryName.
    each renameAndFixSourceTo: classPrefix , each name ]

Making Code Portable

Do Not

Namespaces Squeak has no namespaces, instead use a two letter class prefix to avoid conflicts.
Packages Squeak has no packages, instead it depends on naming conventions of the class and protocol categories.
Bindings Squeak has no bindings #{CodeFoo.Color}), instead import required namespaces into your own namespace or class.
Weak References Squeak has weak references, however the implementation is weak and weak references should be avoided at all cost.
Shared Variables Squeak has no shared variables.
Literal Byte Arrays Squeak has no literal byte arrays #[1 2 3], instead use a normal literal array and send the message asByteArray.
Object immutability Squeak has no object immutability.
Dependency mechanism Squeak implements the dependency mechanism (#addDependent:, #update:, ...), but slightly different than VisualWorks. Instead consider using Announcements.
Trigger Events Squeak implements the event mechanism (#when:‌send:to:with:, #triggerEvent:, ...), but slightly different than VisualWorks. Instead consider using Announcements.
GUI Framework Squeak has a different GUI framework. Properly separate View and Model.

Avoid To

Do