[Zope] Newbie Design Issue

Steve Spicklemire steve@spvi.com
Sun, 25 Nov 2001 12:41:22 -0500


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 )