Alan's going to cover some advanced ideas using Glorp - for instance, how can you use Glorp to do what Ruby on Rails /ActiveRecord does. Glorp itself is an open source (LGPL, with Smalltalk qualifications) that works across Smalltalk platforms. It's also the O/R future for Cincom Smalltalk. Glorp is meta-data driven.
So to basically define Rails - "opinionated software":
- Go really fast, in one direction
- Reaction against J2EE/.NET
- "Greenfield" projects
- Ruby based
- Some Smalltalk like "tricks" in RoR
- ActiveRecord pattern for persistence
To contrast: Glorp uses explicit metadata, while ActiveRecord is implicit. It uses strict naming conventions, hints at the class level, and is aware of (English) language forms. It does code generation (mostly for the web).
Glorp uses a single broker (session). It's responsible for object identity and manages automatic writes. It's agnostic to use (GUI, web, etc). Rails is actively for the web, classes act as brokers, there's no object identity, only one global session. Glorp puts a premium on flexibility, while Rails puts a premium on simplicity - there may not even be a domain model (per se).
So the question is, can we provide some of the benefits of Rails without losing our advantages?
- Automatic persistence
- convention driven
- but be less restrictive
- use a bit more information
- allow a graceful transition to non-automated
So first, we have to be able to read the DB schema - Glorp can now do that (at least, for Oracle and PostgreSQL). After a bit of explanation of how the schema is read, it's off to a demo. The demo hooks up one of the standard Seaside demos (the Sushi Store) to use a database instead of in-image data.
Technorati Tags:
smalltalk, cincom smalltalk, users conference