You are currently browsing the category archive for the ‘Amber’ category.

Mosquit-glowFor those of you who are using or interested in Kaliningrad, you might want to take a look at Amber Skeleton, a project I just announced.

Where Kaliningrad is based on Seaside and Monticello, Amber Skeleton is based on Zinc and Cypress.

The Cypress project defines a format for disk-based packages. There are Cypress implementations available (or in the works) for GemStone, Pharo, Squeak, VAST, and VisualWorks.

The original motivation for Kaliningrad was:

I created the Kaliningrad project because I want to use Monticello to manage the code that I write in Amber.

With Amber Skeleton, the server-side Smalltalk source is stored on GitHub (using FileTree) along with the client-side Amber source, which is already managed on GitHub.

The FileTree project implements a Monticello repository type that is compatible with Cypress, it is easy to save Squeak/Pharo/GemStone Monticello packages on disk and use Git for version control.

Everything isn’t quite hunky dory:

  • Metacello does not have Git/GitHub support, but there is a project underway to address that.
  • Amber Skeleton is currently only implemented on Pharo, but Squeak and GemStone versions shouldn’t be too difficult to implement
  • Currently there is no image-based tool support for Git/GitHub, but there is a project underway to address that.

Despite the limitations, I still think that you might find Amber Skeleton interesting.

Photo by http://www.flickr.com/photos/stonehorse/3854662047 / CC BY-NC-SA 2.0

Insect In Amber. From Kaliningrad, Russia.[1]

Kaliningrad oblast (sometimes called Yantarny krai which means “The amber region”) is located on the coast of the Baltic sea and is the site of the world’s largest amber deposits.

Kaliningrad Project

I created the Kaliningrad project because I want to use Monticello to manage the code that I write in Amber.

Kaliningrad automatically maps Amber package names to Monticello package names, so Kaliningrad is pretty easy to use.

Kaliningrad is based on Seaside 3.0 and uses the Seaside File Library and the Seaside-REST package to serve and store the Amber .js and .st files.

To load Kaliningrad execute the following expression:

Gofer new
    url: 'http://ss3.gemstone.com/ss/Kaliningrad';
    package: 'ConfigurationOfKaliningrad';
    load.
((Smalltalk at: #ConfigurationOfKaliningrad) project version: '0.1') load.

The Kaliningrad configuration loads only the most basic packages for Seaside 3.0, so you’ll need to load up one of the adaptors (Swazoo, Comanche, or Zinc) before you can connect.

Using Kaliningrad

Once you’ve got the Seaside server running, hit (user/password : admin/tool):

http://localhost:8080/tools/amber-browser

to bring up the Amber Browser:

If you want save your Amber code into a Monticello package follow these steps:

  1. Create an Amber package (‘tODE-AmberClient’) in the Amber Browser.
  2. Create a Monticello package with the same name (‘tODE-AmberClient’) using the Monticello Browser in your image.
  3. Register the Monticello package with the KOAmberBrowser class:
     KOAmberBrowser addMonticelloPackage: 'tODE-AmberClient'

Thereafter, when you hit the Commit package button for ‘tODE-AmberClient’ in the Amber Browser, the .js and .st source will be saved in the ‘tODE-AmberClient’ Monticello package.

Thats it!

The class KOAmberBrowser is also a good example for how to integrate Amber code into a Seaside component.

Importing classes into Amber

If you want to import a class from your Smalltalk image into Amber, you can evaluate an expression like the following in an Amber workspace:

KOImporter importClass: 'TOSession' intoModule: 'tODE-Amber'

Be aware that there are differences between Amber Smalltalk and other Smalltalk implementations (see the section entitled Differences with other Smalltalk implementations on the Amber documentation page). KOImporter does not check for correctness.

Summary

Kaliningrad 0.1 is based on Amber 0.9.

I’ve been using Kaliningrad with Pharo for a couple of weeks now, but the code should run in GemStone and Squeak.

If you run into problems, let me know.

—–

[1] Photo by http://www.flickr.com/photos/paul_garland/5133520694 / CC BY-SA 2.0

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 441 other followers

Categories

RSS GLASS updates

  • An error has occurred; the feed is probably down. Try again later.

RSS Metacello Updates

  • An error has occurred; the feed is probably down. Try again later.

RSS Twitterings

  • An error has occurred; the feed is probably down. Try again later.
September 2014
M T W T F S S
« May    
1234567
891011121314
15161718192021
22232425262728
2930  
Follow

Get every new post delivered to your Inbox.

Join 441 other followers