Thursday, May 07, 2015

The Garage database driver API for Pharo

Garage is a database driver API for Pharo. Garage is meant to be a common interface to access several database servers, in a JDBC style.

The current version works in Pharo3 and Pharo4 and includes drivers for:

  • mysql (pure smalltalk)
  • postgres (pure smalltalk)
  • sqlite (using ffi)
  • opendbx (allowing connecting with several db vendors, using ffi) 
Read more here in the announcement or on the website. There is also a CI job.


Doug in Colorado said...

Hi Torsten, I'm very eager to add persistence to my Pharo app but struggling to find anything that works. Currently on Pharo 5. Ideally would like something that will work locally during construction that would work on the web with Seaside. Any help greatly appreciated.

Torsten said...

Hi Doug,

it would be better to discuss such things on the mailinglist or Discord than on the blog.
Nonetheless three (beside many other) routes you can go:

1. if you like your data to be persisted in RELATION DATABASES then use a file based
SQlite DB (check GlorpSQLite in catalog) for local work and use another database
in production (for instance PostgreSQL with
or check with the developers of Garage for other DB options.

I would use Glorp as the abstraction layer (Object relation mapper) to abstract
from the DB details so you do not have to take care of too many RDBMS details
and stay more portable with the DB options

2. if you like your data in NoSQL then use a local file based UNQLite database and
for deployment use later scalable databases like Mongo.

Voyage framework allows you to abstract and use both (check for VoyageMongo and
VoyageUnqlite in catalog)

3. if you like to only work with objects then check Gemstone (develop with Seaside in Pharo and deploy and run in Gemstone server)