[plt-scheme] continue web application: correspondence between blog/post objects and db tables

From: Sigrid Keydana (keydana at gmx.de)
Date: Sun Feb 15 01:37:25 EST 2009


arriving at the sqlite section of the Continue guide, I was a bit
confused at first by the non-correspondence between the blog and db
structures in the scheme code and the blog and db objects as represented
in the database.
(In the database, the objects are "like they are in the real world",
i.e. a post is something that has a title and a body, whereas in the
code it is, if one can say so, an object that allows us to work with the
database, i.e. it has an indirect database handle via the blog object
and an id corresponding to the table's primary key).

It seems I'm much more aquainted with a model that just mirrors the
table (like I suppose it's mostly done in Java applications, or even the
ActiveRecord pattern of Rails). Now I'd be curious to know whether the
fact that it's done differently here has anything to do with the kind of
language you use (functional or non-functional one)? (Or else, was it
done like this to keep the guide short and, if you had a real productive
application, you would do it the other way in scheme too?)

Thanks a lot for any hints,

Posted on the users mailing list.