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:
- Create an Amber package (‘tODE-AmberClient’) in the Amber Browser.
- Create a Monticello package with the same name (‘tODE-AmberClient’) using the Monticello Browser in your image.
- 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
18 comments
Comments feed for this article
October 9, 2011 at 5:53 am
sebastian
fantastic.
I love to see progress on this route.
October 9, 2011 at 6:04 am
NicolasPetton
That’s awesome Dale!
October 10, 2011 at 3:44 pm
Graham
I am very intrigued by the possibilities of Amber, and storing code to Monticello is a great idea. Also good to see some integration between Seaside and Amber! Go Dale!
Graham
October 16, 2011 at 11:48 pm
Amber Answers 303 – Shaving
[…] #split {}#single {}#splitalign {margin-left: auto; margin-right: auto;}#singlealign {margin-left: auto; margin-right: auto;}.linkboxtext {line-height: 1.4em;}.linkboxcontainer {padding: 7px 7px 7px 7px;background-color:#eeeeee;border-color:#000000;border-width:0px; border-style:solid;}.linkboxdisplay {padding: 7px 7px 7px 7px;}.linkboxdisplay td {text-align: center;}.linkboxdisplay a:link {text-decoration: none;}.linkboxdisplay a:hover {text-decoration: underline;} function opensingledropdown() { document.getElementById('singletablelinks').style.display = ''; document.getElementById('singlemouse').style.display = 'none'; } function closesingledropdown() { document.getElementById('singletablelinks').style.display = 'none'; document.getElementById('singlemouse').style.display = ''; } Does this mix well?Kaliningrad: Developing with Amber, Seaside and Monticello […]
November 15, 2011 at 8:58 am
Marten
Create an Amber package (‘tODE-AmberClient’) in the Amber Browser.
How ???????
November 15, 2011 at 9:23 am
Dale Henrichs
Ah, the Amber package is created automatically for you when you create a class (or edit the package field of an existing class and save):
Object subclass: #NameOfSubclass
instanceVariableNames: ”
package: ‘packagename’
November 18, 2011 at 1:50 am
Marten
Just a simple question (too much stuff are entering my brain at this moment). How are all these projects related to each other:
Kaliningrad, Amber, tODE ?????
November 18, 2011 at 4:49 am
Marten
I just had to do new Ubuntu installation and tried again Gemstome and the whole stuff is running. Fine. Then I loaded Kaliningrad – fine. Then I entered the amber-browser URL mentioned above, but all (and only these…) JS-files reachable via …/Kaliningrad/js/… are not found ????
November 18, 2011 at 8:43 am
Dale Henrichs
@Marten, regarding your first comment … Kaliningrad was created to support my work on tODE. Kaliningrad is a project that allows you to manage your Amber Smalltalk source files using Monticello. tODE is a Smalltalk development environment that runs in a web-browser and I am using Amber Smalltalk to implement parts of tODE.
November 18, 2011 at 8:45 am
Dale Henrichs
@Marten, regarding your second comment … I am not sure I understand exactly what is happening…Could you provide a few more details about the problem?
January 24, 2012 at 7:59 pm
Paul DeBruicker
I created some Slime rules for Amber at http://www.squeaksource.com/AmberSlime.html that check the compatability conditions listed on the Amber wiki. Maybe KOImporter can be configured to run those rules befor performing an import. Thanks for making this Dale
January 25, 2012 at 9:53 am
Dale Henrichs
That sounds like a good idea, Paul. I’ve added the suggestion to the Kaliningrad issues list[1]. I’ll add that feature the next time I swing through Kaliningrad ddevelopment (which should be soon, since there is a new Amber release:)
[1] http://ss3.gemstone.com/ss/Kaliningrad.html/Issues
February 16, 2012 at 12:10 pm
Smalltalk: Links, News And Resources (3) « Angel “Java” Lopez on Blog
[…] Kaliningrad: Developing with Amber, Seaside and Monticello https://gemstonesoup.wordpress.com/2011/10/08/kaliningrad-developing-with-amber-seaside-and-monticell… […]
March 4, 2012 at 3:06 pm
Sebastian Sastre
Hey Dale, I’m starting to use Kaliningrad.
Can you remove packages? I mean, it removes in amber but then, when you reload the page, the removed package appears again. Even making a commit won’t help.
What I did was to manually remove the *extensions of that package that were installed in KOAmberSTFileLibrary and KOAmberJSFileLibrary.
It seems that a simple remove category command would fix it, though
March 5, 2012 at 12:09 pm
Dale Henrichs
Yeah a remove category command sounds like a good idea… I’ve added an issue to the Kalningrad project:
http://ss3.gemstone.com/ss/Kaliningrad.html/Issues
March 6, 2012 at 2:42 pm
Sebastian Sastre
Small update:
To load your packages in a fresh image with the latest Kaliningrad you have to evaluate:
KOAmberLoader addMonticelloPackage: aPackageNameString
April 22, 2012 at 9:32 pm
Amber Skeleton: Lookout Kaliningrad! « (gem)Stone Soup
[…] 22, 2012 in Amber, Cypress For those of you who are using or interested in Kaliningrad, you might want to take a look at Amber Skeleton, a project I just […]
May 26, 2012 at 6:54 pm
Public Store Repository Adds New Packages | Smalltalk Industry Council
[…] (https://gemstonesoup.wordpress.com/2012/04/22/amber-skeleton-lookout-kaliningrad/) or Kaliningrad (https://gemstonesoup.wordpress.com/2011/10/08/kaliningrad-developing-with-amber-seaside-and-monticell…). 24 MAY 0 Related PostsNo related posts found Categories: News, Smalltalk Subscribe to […]