I've just got involved with Zope, but I'm fairly versued in traditional web development, and python. I'm currently working on an app that tracks seting up computers based on a "check list" type deal, and who was responsible for it. If this were just a static "check list" of things that had to be done, this would be easy, but it needs the facilities to allow users to make new check lists, edit them, and destroy them. Since I'm not an old pro at Zope, I figured that I would just use some ZClasses to represent these things. My question is, what would be the easiest (as far as time, and need of indepth knowledge of Zope) way to do this? The ideas I have are...to let users enter in Check List items and then dynamically generate Zope Objects that represent each check list...Or another way would be to have Zope objects for all the check list items, and the check lists, and then more objects for the actual data stored in the check lists (Like who installed this piece of software, and what is the Computer's Service and Serial numbers.) As I said, the main purpose of this post is to get design ideas. Origionally, I had set this up in a RDBMS but that would cause too much overhead. Jeremy _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Hi Jeremy, I'm guessing the simplest way would be to have 2 ZClasses. "CheckList" would subclass from ObjectManager and would be permitted to contain "CheckListItems". A "CheckListItem" would be a simple ZClass with a propertysheet that held all the properties of an individual item. You could the Catalog all the "CheckListItems" so that searches could be easily performed. If you want these classes to be automatically cataloged you'll probably want to subclass from "CatalogAware", though I haven't actually used it myself for a long time. The tricky part with ZClasses is that you need to be careful to get the parent classes right at the beginning. There's no easy/supported/dependable way, yet, to change your mind later. Before I mention another approach (ZPatterns) let me say: 1) It's true that active development of new features of ZPatterns has basically stopped since the primary developers are now moving on the stage 2, TransWarp. 2) The current "release" of ZPatterns doesn't work "as is" with Zope 2.4.x. Steve Alexander has been very helpfully providing his own patches (along with some other folks' contributions) as another product "TransactionAgents" which does work in 2.4.x. You can get this at: http://www.cat-box.net/steve/TransactionAgents-0.0.4.tar.gz 3) There is an active ZPatterns "group" with CVS archives/mailing list etc. You can find out more at: http://www.eby-sarna.com/. Now, for better or worse, here's what I really think: Since you say your are "fairly versed" in development and python, I should also suggest you look into ZPatterns before putting in a lot of work. I've got some simple examples of ZPatterns in my member area you might visit: http://www.zope.org/Members/sspickle It's a bit of a learning curve to grok ZPatterns (but so is Zope in general!) but it does two important things for you: 1) Provides a way for you to start your design in ZODB, and later, if necessary, migrate to RDBMS with little disruption. 2) Gives you a number of great tools for adding "triggers" (e.g., automatic cataloging) and externally provided attributes (e.g., we have this RDBMS with serial numbers etc... how do I get that "into" my app?). Anyway... simple ZClasses are "simple"... and that's good. With ZPatterns you can use ZClasses, but also take advantage of lots of other good work to allow your app to expand beyond the "testing" stage. You can also use filesystem based classes if you need them. It would surely be best to play around with ZClasses a while before even thinking about other ways, such as ZPatterns. Anyway.. hope I didn't confuse you! Bottom line: Start with ZClasses, learn the ropes, then look around a bit before making a big investment. good luck! -steve On Sunday, November 25, 2001, at 02:20 AM, Jeremy Lowery wrote:
I've just got involved with Zope, but I'm fairly versued in traditional web development, and python.
I'm currently working on an app that tracks seting up computers based on a "check list" type deal, and who was responsible for it. If this were just a static "check list" of things that had to be done, this would be easy, but it needs the facilities to allow users to make new check lists, edit them, and destroy them.
Since I'm not an old pro at Zope, I figured that I would just use some ZClasses to represent these things. My question is, what would be the easiest (as far as time, and need of indepth knowledge of Zope) way to do this? The ideas I have are...to let users enter in Check List items and then dynamically generate Zope Objects that represent each check list...Or another way would be to have Zope objects for all the check list items, and the check lists, and then more objects for the actual data stored in the check lists (Like who installed this piece of software, and what is the Computer's Service and Serial numbers.)
As I said, the main purpose of this post is to get design ideas. Origionally, I had set this up in a RDBMS but that would cause too much overhead.
Jeremy
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I'm not sure about all the parameters of your situation, but I may be working on something similar, so consider this. How about if you write an external method SetupComputer that will create a dtml method for each computer from an HTML form that the user fills out. SetupComputer would take each form input field and turn it into a property of the dtml method (this way you can change your checklist by changing the HTML form). The body of the dtml method could be some dtml code that will go through and display each of the properties. Then each computer is represented by its own dtml method object, and you can write dtml code to automatically list them. Making changes is also fairly simple, and you could add and delete properties as you wish. A nice side effect of this approach is that you can easily use all the existing Zope stuff for editing properties and documents, rather than having to roll everything from scratch. *********** REPLY SEPARATOR *********** On 11/25/01 at 1:20 AM Jeremy Lowery wrote:
I've just got involved with Zope, but I'm fairly versued in traditional web development, and python.
I'm currently working on an app that tracks seting up computers based on a "check list" type deal, and who was responsible for it. If this were just a static "check list" of things that had to be done, this would be easy, but it needs the facilities to allow users to make new check lists, edit them, and destroy them.
Since I'm not an old pro at Zope, I figured that I would just use some ZClasses to represent these things. My question is, what would be the easiest (as far as time, and need of indepth knowledge of Zope) way to do this? The ideas I have are...to let users enter in Check List items and then dynamically generate Zope Objects that represent each check list...Or another way would be to have Zope objects for all the check list items, and the check lists, and then more objects for the actual data stored in the check lists (Like who installed this piece of software, and what is the Computer's Service and Serial numbers.)
As I said, the main purpose of this post is to get design ideas. Origionally, I had set this up in a RDBMS but that would cause too much overhead.
Jeremy
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
Hi Bruce, On Sunday, November 25, 2001, at 12:13 PM, Bruce Eckel wrote:
I'm not sure about all the parameters of your situation, but I may be working on something similar, so consider this.
How about if you write an external method SetupComputer that will create a dtml method for each computer from an HTML form that the user fills out.
Why an external method? Wouldn't a Python Script work? Also.. you mean DTML Document here? I don't think DTML Methods have properties of their own.
SetupComputer would take each form input field and turn it into a property of the dtml method (this way you can change your checklist by changing the HTML form). The body of the dtml method could be some dtml code that will go through and display each of the properties. Then each computer is represented by its own dtml method object, and you can write dtml code to automatically list them. Making changes is also fairly simple, and you could add and delete properties as you wish.
A nice side effect of this approach is that you can easily use all the existing Zope stuff for editing properties and documents, rather than having to roll everything from scratch.
That's a good point.. but I think in the end you'll have to reinvent a lot of the same machinery that's already in ZClasses with a lot less clarity. ZClasses already have meta_type, permissions, methods etc.. all object oriented goodies. Using DTML Documents as "simple" objects is pretty limited in this respect.. IMHO. OTOH you can no doubt get something "up and running" pretty quickly using DTML Documents. Simple is a good thing... except when it's not. ;-) -steve
*********** REPLY SEPARATOR ***********
On 11/25/01 at 1:20 AM Jeremy Lowery wrote:
I've just got involved with Zope, but I'm fairly versued in traditional web development, and python.
I'm currently working on an app that tracks seting up computers based on a "check list" type deal, and who was responsible for it. If this were just a static "check list" of things that had to be done, this would be easy, but it needs the facilities to allow users to make new check lists, edit them, and destroy them.
Since I'm not an old pro at Zope, I figured that I would just use some ZClasses to represent these things. My question is, what would be the easiest (as far as time, and need of indepth knowledge of Zope) way to do this? The ideas I have are...to let users enter in Check List items and then dynamically generate Zope Objects that represent each check list...Or another way would be to have Zope objects for all the check list items, and the check lists, and then more objects for the actual data stored in the check lists (Like who installed this piece of software, and what is the Computer's Service and Serial numbers.)
As I said, the main purpose of this post is to get design ideas. Origionally, I had set this up in a RDBMS but that would cause too much overhead.
Jeremy
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Most current information can be found at: http://www.mindview.net/Etc/notes.html =================== Bruce Eckel http://www.BruceEckel.com Contains free electronic books: "Thinking in Java 2e" & "Thinking in C++ 2e" Please subscribe to my free newsletter -- just send any email to: join-eckel-oo-programming@earth.lyris.net My schedule can be found at: http://www.mindview.net/Calendar ===================
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Bruce Eckel -
Jeremy Lowery -
Steve Spicklemire