3 ms·
I 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 some
by gecko 16y ago
I 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.