ZClasses and non-ZMI interface (was: how to add a ZClass instance from Python)
I'm trying to get a basic undestanding of the various techniques available in Zope to create a very common kind of application: something where you have one (or more) classe that implement your "business domain data and logic" and you want a GUI to create/edit/list/delete instances of those classes. For any part of the job there are many different ways to do the needed thing and I would like to explore at least some of them in a as-simple-as-possible example. For each approach I would like not only to find "a" solution, but I want to find out how to write it in a way that allows it to be changed with another one without hurting too much the rest of the app. For example to go from plain ZClasses in Folder to Python Products with Specialist without rewriting the interface (presentation) stuff. I think Zope has the needed "flexibility" but, still, one has to find out how to take advantage of it. When I say "application's parts" and "different ways to do things" I mean: For the back-end: 1) pure ZClasses (everything done via ZMI), 2) ZClasses based on external Python classes, 3) pure Python ZClasses. For the storage: 1) instances added to "plain" Folders and "saved" in ZODB, 2) database backend (with hand-made SQL methods), 3) ZPatterns (with Specialists, Data-Skins and Racks). For the interface: 1) the ZMI and the automagically (for ZClasses) created stuff, 2) something you roll yourself. And finally (at least for the HTML/Web newbie, like me) you have to survive the various "technical" ways to set up the interface: 1) to frame or not to frame, 2) to javascript or not, 3) use links (<a heref...>) or buttons, 4) how to substitute for the missing "modal" windows (that is how to jump to another page and come back home). The ZopeBook examples, other "known" examples like Poll, ZPatterns examples (Attendance and Lunch) do show different ways to do different things (also with different "style" depending on the writer) but they do not (seems to me) explain the "why" and the "how else". I would like to make one thing in many ways, understanding (and commenting) the pros and cons. I will surely ask for help on the list, so I hope I'll be able to give back some "zexp" or some "how-to". If you are still reading, here comes some initial stuff! See attaches for: - zexp's of the Product (import in Control_Panel/Products), - zexp of the example (import wherever you want), - kind of how-to for both (for your eyes only). I'll wait for feed-back (i.e. interest) before sending more stuff to the list (sorry no personal web-site yet for that). bye, Luca.
participants (1)
-
Luca Manini