[Seaside] Automatic Object Storage To MySQL

stephane ducasse stephane.ducasse at free.fr
Thu Jan 26 22:07:06 CET 2006


>>
>> I wonder why you are trying to guess the i-vars? Wouldn't it be much
>> more powerful to have a meta-model (like Magritte) where you could
>> specify what and how to store the values of a model? I think the code
>> could also benefit from a propre description, so that you could avoid
>> all those long manual type-checks with the nested #ifThen: clauses.
>
> On of the core ideas of the project is to limit the amount of work  
> a developer has to do. The deveolper should only have to be  
> minimally aware of how the object is being stored. Think of it this  
> way. The developer has already defined the class why should she  
> have to define the way the class is stored.

I suggest you to have a look at Magritte.  You use a simple meta  
description to declare more information
that is used everywhere.

IOSPersistent subclass: #IOSPageInfo
     instanceVariableNames: 'user date fileId page'
     classVariableNames: ''
     poolDictionaries: ''
     category: 'IOS-FLHSPMerge'


IOSPageInfo class>>descriptionDate
	^ MADateDescription starting: 1900; required; storedAs: SimpleDate

IOSPageInfo class>>fileId
	^ MASmallIntegerDescription accessors: fieldId;

Note that this is not Magritte but this was to gave you the idea.

How do you handle relationships in your approach?

Stef


More information about the Seaside mailing list