4 ms·
Pharo. The latest stable version runs in the Cog VM (a fast JIT VM), and runs Seaside 3.0 great. However, choose your persistence carefully. The open-source
by futuremint 16y ago
Pharo. The latest stable version runs in the Cog VM (a fast JIT VM), and runs Seaside 3.0 great.
However, choose your persistence carefully. The open-source Smalltalk landscape is littered with abandon-ware databases.
If you want an OODB, you can just save the image itself, use Magma (an open-source OODB, but its not very wel documented) or use Gemstone (through GLASS), which is commercial but well documented.
SQL support is weak if you want a nice ORM (like Rails' Active Record), and I've had success using CouchDB (a JSON document pretty much just maps straight to an object: keys -> values = instVars -> values).
- sigzero 16y agoThere is a driver for mongodb as well...
- jcromartie 16y agoI give bonus points to CouchDB because there is no driver needed, just HTTP.
- futuremint 16y agoYeah, the one library I'm using is pretty lightweight. It just does JSON parsing of responses over a socket connection and handles a few HTTP details. I've been really happy with it, and its been reasonably fast in the Cog VM. I haven't explored using CouchDB's list views yet, but I'm considering that for just loading pre-built HTML for larger document lists.
- stcredzero 16y agoORM is weak? What about GLORP?
- gecko 16y agoI agree completely that the ORMs in Squeak are bad, and many abandoned, but as of six months ago, ROE still worked. ROE is not an ORM per se; rather, it's something close to LINQ on a SQL database: you write your queries in relational algebra, building up an AST. The AST is only ever compiled to SQL and sent to the database when you're finally ready to do the query. This allows easily building up a query over many methods by passing around the query object and avoids dealing with an ORM, since at the end of the day you're still just getting back the SQL model, rather than trying to cram it into an object. A quick overview of Roe is at http://www.cincomsmalltalk.com/userblogs/avi/blogView?showComments=true&entry=3246121322 http://www.cincomsmalltalk.com/userblogs/avi/blogView?showCo... and the current source is at http://squeaksource.com/ROE.html http://squeaksource.com/ROE.html . Note that ROE only supports PostgreSQL, but that's okay, because that's the only meaningfully supported SQL driver in Squeak/Pharo. Supporting other databases is actually quite easy in one front, but useless on another: I ported it to SQLite and MySQL around 2005, but never shared the changes, because MySQL simply cannot meaningfully optimize the queries generated by ROE, and SQLite at the time required a very unstable FFI wrapper that crashed the image constantly. If there's interest, I think I still have that code lying around somewhere.