[Zope] Composite Objects?

2005-04-11 Thread Jeffrey E. Forcier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey all,

I'm attempting to use mostly-vanilla Zope to implement an intranet
here at my office, but am finding it difficult to use a 'feature' that
I imagine should be possible. I've created a template for what ideally
would be a single object/class type, containing multiple different
kinds of Zope objects, and want to be able to clone new copies of that
template as one can do with the existing Zope objects (e.g. as one
would add a new File or Folder).

The template currently consists of a typical index_html ZPT, a
Formulator form, a small collection of Python Scripts, and two generic
Files which are the CSS and JavaScript includes for the ZPT. These are
all contained in a normal Folder object.

The ideal situation is that I want a single object, which has various
data fields (storage location is not important at this time) that are
manipulated with the above objects--the ZPT+files generate a form
page, using Formulator for rendering and validation, and the Python
scripts for various other tasks, including the eventual input
processing. And, as stated before, I need to be able to instantiate
new copies of this object.

Now, I first looked at ZClasses (which according to the Zope Book is
exactly what I want), but it appears that each ZClass instance shares
the 'methods' in the ZClass definition--so that if I wanted each
individual object to add fields to its own Formulator form, it
couldn't. On top of that, I read and (mostly) understand some of the
recent discussions here about possible deprecation of ZClasses, making
it even less of a desirable option.

I then looked at CPSSchema, but what appears to be its homepage on
zope.org cannot be accessed even after one creates an account on the
site; furthermore, what little I was able read about it suggests that
it too is not quite what I'm looking for. Ditto for Plone's ArchTypes
(plus I'd *rather* not have to use Plone, as this intranet is not
really going to be a CMS in the classical sense).

So, I'm pretty much out of ideas; obviously I could just write my own
Product from scratch, and that's what I'll be looking into in the
meantime, but this seems like something that should be possible, and I
hope I'm just missing something or being misled by what I've already
read. Please help :)

Regards,
Jeff

- --
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com

This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information. No right
to confidential or privileged treatment of this message is waived or
lost by any error in transmission.  If you have received this message
in error, please immediately notify the sender by e-mail or by
telephone at 212.981.6540, delete the message and all copies from your
system and destroy any hard copies.  You must not, directly or
indirectly, use, disclose, distribute, print or copy any part of this
message if you are not the intended recipient.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWuF5p45MMXK8DgERArShAKCYkeCGkI4lqYz0YHWT6yHOUtCK3gCg+b9L
EQqJ2c7J1SOGmEugQ/lZ4Qg=
=rh/h
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Newbie questions:

2005-04-11 Thread Jeffrey E. Forcier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Enrique Arizón wrote:

 Hi again, I'm starting to make up with Zope, but still basic doubts
 remains:

 Q1: When using normal python I'got used to the dir(Object) to learn
 new APIs/Libraries. But when trainning with my first Zope Scripts I
 can't. The dir not defined error appears. ???

Being a relative newbie myself, I'm not positive this is correct, but
I can tell you that Python Scripts are limited in Zope--you can't
access the entire set of normal Python libraries and functions. A
large part, yes, but not all of them. I'd be surprised if 'dir' was
not in the allowed functions, but that would be one reason why it's
claiming it's not defined.

- --
Jeffrey E. Forcier
Junior Developer, Research and Development
Stroz Friedberg, LLC
15 Maiden Lane, 12th Floor
New York, NY 10038
[main]212-981-6540 [direct]212-981-6546
http://www.strozllc.com

This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information. No right
to confidential or privileged treatment of this message is waived or
lost by any error in transmission.  If you have received this message
in error, please immediately notify the sender by e-mail or by
telephone at 212.981.6540, delete the message and all copies from your
system and destroy any hard copies.  You must not, directly or
indirectly, use, disclose, distribute, print or copy any part of this
message if you are not the intended recipient.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCWv2hp45MMXK8DgERAsrLAKC0N7Pt43jhfuwVdG/i2Qwpr97t9QCghc9X
fgDpaU9iFGD/3x/NAv9imuU=
=ZOlF
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Composite Objects?

2005-04-11 Thread Jeffrey E. Forcier
Paul Winkler wrote:
In that case, I'd write a filesystem Product for the logic.
Replace the scripts with methods of the Product class.
Make it folderish so it can contain Forumator forms and anything
else you want: inherit from Folder and use its UI to manage
contents.
You could then use AbracadabraObject to clone instances of
this thing; or you could do it all in code and have a manage_afterAdd 
method that adds a preconfigured Formulator form.
Source and/or docs of Formulator should give you a clue how
to instantiate one with the right config.
 

That's kind of what I was thinking. AbracadabraObject appears to have a 
method call that allows you to use its magic in code, which I think is 
exactly what I want, although as before I'm very surprised that this 
sort of functionality doesn't exist in Zope proper.

I guess my desires aren't actually all *that* in-line with the main body 
of Zope users, as I do *not* want the users of this application to ever 
see a ZMI screen. So I need this half-and-half situation where I or 
another admin can tweak some aspects of a class (e.g. Formulator forms, 
ZPT) via the ZMI or WebDAV, but the instances of those objects are 
instantiated *via code only*, by Python logic and my own (ZPT-driven) 
HTML form interface.

Another possibly far-fetched feature I'd like, which again I believe was 
part of ZClasses, would be to be able to tweak the instances' Formulator 
forms after the fact...e.g. add another data field a year down the road. 
Of course this then means that I both do and don't want these cloned 
forms to match up with the central one, and I'm not at all sure that I 
can accomplish this without writing lots of my own code to handle it.

Thanks for the help, by the way, it's appreciated.
Regards,
Jeff
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )