[ZODB-Dev] Ape and ConflictError's
Rocky Burt
rocky.burt at bricsnet.com
Wed Apr 30 21:00:42 EDT 2003
On Wed, 2003-04-30 at 15:12, Shane Hathaway wrote:
> basemapper creates the mappers with no gateways. sqlmapper adds the
> gateways. Both modules are begging to be rewritten in XML, I think.
> But I didn't want to come up with an XML schema until I had a good
> motivation and I knew what the configuration would be like. Making it
> easier for people to put together custom mappers is a strong motivation,
> and the configurability is almost clear, so I plan to write an XML
> schema soon.
>
That sounds like a great idea.
> I would write a function that calls sqlmapper.createMapper() then
> modifies the generated mapper. The function would add two mappers to
> the root mapper (one mapper per class.) The function would assign a
> serializer and gateway to each mapper. Then the function would tell the
> root classifier to use the new mappers when it encounters A_meta_type
> and B_meta_type instances.
Perfect. This is exactly the "steps" I was asking for. Of course this
is conceptual so my next step is to translate the idea's you describe
into actual code ;)
> Once this is done in XML, though, I hope it will be much more natural:
> you'll copy a sample configuration into an XML file in your own Zope
> product, change the XML to match your needs, and activate the new
> configuration. Instead of learning lots of gory details, most people
> will only have to write serializers, gateways, and configuration files.
>
This sounds good. But keep in mind that there are a few generic
mechanisms (including your current generic mechanism) that will probably
be used by most people. I think the second generic mechanism that
people will want is the ability to have each class stored in its own
table (where table name is generated dynamically based on class name or
meta_type or something).
> > ps. I'm also in the process of reading Martin Fowler's, "Patterns of
> > Enterprise Application Architecture".
>
> I wish the book were still up on the web. At least there are skeletal
> remains.
Didn't realize any of it was on the web. I've been looking for material
like this for quite some time (having a heavy background in J2EE). When
I saw your reference to this book and noticed the author was Martin
Fowler (for whom I have a lot of respect) I immediately went out and
bought the book.
Its great so far, content-wise... but unfortunately a rather boring read
:(
- Rocky
More information about the ZODB-Dev
mailing list