September 29th, 2004, 10:40 PM
Using archetypes, RDBMS or both in Zope/Plone
This isn't so much a programming question as it is an architectural one, so please bear with me here. I've just gotten started with Plone/Zope but am coming from a strong PHP/MySQL/PostgreSQL background...
I need to build a job traffic / time tracking application for internal use, and I'd like to do it in Zope/Plone. I can envision very easily how to arrange the data in PGSQL and then write stored procs and PHP code to do it...
deadline (one to many with jobs, used to set deadlines and events for a particular job)
employee (many to many with jobs, used to assign employees to work on a job)
task (many to many with employees and jobs, used to keep track of time billed)
I'm having a tough time visualizing how to do it in Zope though. I've read extensively about Archetypes and how to use them to build new content types, but I'm having a tough time figuring out how the different objects would interrelate. If each employee is a Zope user, how do I "assign" a user to a job? Is there a way to point a reference to one Zope object inside a Zope another object (whereby a job would acquire a "reference" to a user object?) Similarly I'm having a tough time seeing how I would assign tasks to an employee/user object.
Is this kind of app just not suitable for being written as I describe? Would it make more sense to store the data in an RDBMS and access it using ZSQLMethods? Also, if I wanted to create a listing of the jobs and show some data would I need to create a "JobFolder" object to store my Job objects and then create a view that would accomplish this?
Thanks for the input... I'm really looking forward to digging into Python/Zope/Plone but would appreciate any advice you guys could give.