Getting Started

(Some really old instructions copied from, which need updating. It's probably a clue how old when it refers to VisualWorks 5i)

Getting latest version of GLORP

This depends on your distribution:.

    1. For VisualAge there is a port included with the distribution.

    2. For Squeak/Pharo I don't know what the current setup is.

    3. If you are using VisualWorks it is suggested that you load Glorp code directly from public store repository or just use the parcels included in your distribution.

Installing GLORP

Now you need to load the GLORP code into your system. This is covered in the readme for each dialect. Some special notes on loading into VisualWorks 5i. This is the reference platform for development (meaning it's what we use :-) If you're developing with VisualWorks 5 and later, you'll want to load Store into your image. GLORP is organized as a Store bundle with multiple packages, so it will be much easier for you to see the structure if you have Store loaded and use the package browser. It doesn't matter if you plan to ever connect to a Store database or not. If you don't know which database to use, choose Store for PostgreSQL (since that's the database we use to hold the reference GLORP code). Now you've got two options (a) load the Glorp and GlorpTest parcels (b) load the Glorp and GlorpTest bundles from the public store repository. If you don't have access to that repository, then just load the parcel for now, but it'll be convenient if you have access, so that you can then publish changes directly to the reference code base.

Setting your login

You need to tell GLORP which database to use for its tests and how to log into it. For that, you'll need to have a valid database login which gives you access to a database in which GLORP will be allowed to create and destroy tables and write into them. It would be a good idea if this is not a production database.

Glorp gets its test login information from an SUnit test resource class called DatabaseLoginResource in the class (or shared in VW) variable called DefaultLogin. So I need to specify this login, which I can do by evaluating

GlorpDatabaseLoginResource defaultLogin: ((Login new) database: OraclePlatform new; username: 'System'; password: 'manager'; connectString: 'alan').

This tells GLORP the database that I'm logging into, my user name and password, and that it's an Oracle database.

Note for VisualWorks users: GlorpVWLauncherTool tool is available from public store repository adding user interface to your launcher which allows easy login switching and changing various GLORP connection and testing options.

Invalidating table setup

One more thing we are going to do before we begin is evaluate

GlorpDemoTablePopulatorResource invalidateSetup

This is another test resource whose job is to create the initial database tables that GLORP will use. This is a fairly slow operation, and the tables don't change very often, so if we know this has already been done once for this database we skip it on subsequent test runs. If you think there's something wrong with your database setup, it's a good idea to run #invalidateSetup here to make sure that GLORP will completely destroy and recreate the tables next time it does a test run.

Note for VisualWorks users: You can conveniently check current status of this resource and reset it if nessecary from GlorpVWLauncherTool introduced earlier.

Running tests

Open a test runner. In VisualWorks, evaluate the following expression, or else just load RBSUnitExtensions and navigate to the GlorpTest bundle in the browser.

TestRunner new open (or if you're not in a workspace) XProgramming.SUnit.TestRunner new open

In VisualAge, it's

TestRunner new openWidget

and in Dolphin it's

TestRunner open

Once you have the test runner UI, click on the "Run" button. You should see the display go yellow and lots of test names flash past. Eventually, you'll see something like

172 tests run, 171 passed, 0 failed, 1 error

The number of tests depends on the particular version. If you see all of the tests passed, then GLORP is working properly on your system. If you see failures, then you're going to need to figure out why, which is the tricky part. You'll need to look at the list of failures and run them in debug mode so that you can see what's going wrong.


Running the tests is only the first step.

Documentation is currently very limited. There is no user or reference manual. You can find some presentations and documentation of basic concepts, but the detailed information is still contained primarily in the code.

Fortunately, GLORP has a reasonably extensive test suite, and this is your best resource for finding out the details of features. If you want to know what a class or method does, look at the references or senders and see which tests might use this. This should give you quite a bit of information about how it's intended to be used (and what actually works :-)

GLORP community

A more important resource is the community. If you're planning to work on GLORP, you'll want to sign up for the mailing list. If you're working in VisualWorks 5 and later, you'll want to get an account on the public store repository. The mailing lists are also the best way to get help on GLORP. The mailing list and the repository are the main ways GLORP is coordinated.

You can also join #smalltalk channel on Smalltalk IRC server at, there's a pretty good chance someone there might be able to answer your questions or listen to feedback.

Last edited: Thursday, November 25, 2004