Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Sidenote: Creating Monticello Package from Existing Code
Last updated at 6:35 am UTC on 20 December 2008

Back to Development Tools Overview (Monticello, SqueakSource, SqueakMap)

1.1 Manage pre-Existing Squeak Code under Monticello


Let's say you have Squeak code which you manage by some means, possibly as Changesets. If you decide to manage your code under Monticello, this article may provide some hints fow to put code under Monticello management.

1.2 Where to start


First decide how to organize existing Classes into Monticello Packages. Squeak provides a way to organize code through making class belong to a system category and methods to a method category. A System Category is what you see on the left pane of most browsers, or alternatively, in the class definition, for example:

Object subclass: #Wrapper
	instanceVariableNames: 'someVariables'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'MorphicWrappers'


The above class would naturally make sense to be added to Monticello package named MorphicWrappers. However, because the tradition of "monkey patching", there are methods which defined on, for example, class P1A which belongs to category P1, but those methods exist for the benefit of class P2B which belongs to a different (foreign) category P2. This is supported by Monticello.


1.2 How to organize existing code?


This note will use MorphicWrappers as an example name for the Monticello Package name. In your code, just substitute MorphicWrappers for any name you choose.

Ensure your classes and methods will be managed as Monticello Package named MorphicWrappers. This is achieved by putting your classes and methods in system categories and method categories recognized using a set of Monticello naming conventions.


1.3 Monticello naming Conventions


Are naming conventions that define naming rules by which Classes belong to Monticelly package and allow methods to be maintained on foreign packages.

Monticello uses naming conventions to define classes and functions to be members of a particular project. So any class and method that you want to be part of your package, must adhere to such naming conventions, listed below. The naming conventions below are re-worded from the original http://www.wiresong.ca/Monticello/UserManual/PackageInfo/:

A Monticello Package named "MorphicWrappers" contains Classes and Methods based on the following Rules:

        1. C belong to system category named "MorphicWrappers", OR
        2. C belong to system category name starting with "MorphicWrappers-".
        1. M belong to method category name "*morphicWrappers" OR
        2. M belong to method category name starting with "*morphicWrappers-".
        1. M belong to a class in the system category "MorphicWrappers", OR
        2. M belong to a class in system category with name starting with "MorphicWrappers-"
        3. MINUS methods which method category starts with "*" (then the method must belong to other module).

1.4 Name all classes and methods which will be part of the "MorphicWrappers Package" following the above rule.


1.5 Convert the MorphicWrappers System Category into Monticello Package named MorphicWrappers.


This step will also create the Monticello Repository that stores code for the package.

First, a short introduction of this step. It will create what is called the "Monticello Repository". Monticello repository is a storage of the code. It can be stored as "Directory", "HTTP", "FTP", "Squeakmap Release" and others. We will have an option to select one of them a bit later, but as a general comment, each of these "storage typess" is capable of storing and managing our package. Each package will have an extension ".mcz", so in our case, we will have MorphicWrappers.mcz.

First create a "directory" type repository on your local machine.


Continue in Development Tools Overview (Monticello, SqueakSource, SqueakMap)