Re: Archtypes SQL Storage
Bill Schindler <bill-1W0Ar4md6L5Wk0Htik3J/[email protected]> Tue, 10 Oct 2006 16:16:21 -0700
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
> I am looking for a way of using the Archetype Content Object only as > the View (presentation layer) for easy rendering of the forms and > mapping them directly to a relational database without any interference > of the ZODB. > > Is it possible to modify an Archetype that it looks up the content items > completly in the relational database and not first in the zope DB (that > maps to the rel. database like in SQLStorage)? > I don't see a reason why one should store the same object 2 times in the ZODB and MySQL. I'm doing this using zope3/Five formlib to build the view and SQLAlchemy to manage the interaction with the database (PostgreSQL in my case). It's thin and fast, which is exactly what I needed. My first attempt used Archetypes. That became excruciatingly slow when we loaded all of the data (many thousands of records). Archetypes is great for a broad range of Plone apps, but when you're dealing with lots of dynamic data, Archetypes is a bad fit. My second attempt used a blend of Archetypes and zope3 that I borrowed from plone_schemas. That was better, but it had lots of problems. I had to patch around many of the features that Archetypes offers. In the end, I was doing more patch-around than application building. I finally bit the bullet and went for the thinnest layer I could build on top of SQLAlchemy. (Thanks for pushing me that way, rafrombrc!) It's still a work in progress, but so far it's very close to 20 times faster than the Archetypes version. (And I have far more of it implemented now than I did in Archetypes.) I intend to donate a stripped-down version of it back to the community -- as an example app, at least. The learning curve is outrageous, but the final code is stunningly simple. My problem in figuring it out is the dearth of working examples. Unfortunately, I won't have time to produce that example code until the end of the month. (I have to deliver this app, first!) Anyway, I'd recommend looking at zope3's formlib and views as a potential solution. --Bill / bitranch ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV