[Zope3-Users] ZCML debugger?

2006-02-12 Thread Roman Susi

Hi!

After having fight with ZCML I think some sort of debugger, checker, 
validator or wizard is needed to help writing ZCML!
Trial-and-error approach is too costly and frustrating to newbies. 
Discovering what goes where or from where is nightmare and error-prone too.
Zope3 already has a good doc system, based on ZCML and source code 
information (if I am not mistaken).
Could it be beneficial to have some kind of wizard which could help 
write ZCML configurations?


Or at least some good documentation on what is the meaning of ZCML 
constructs.

Declarative approach is good if one know:

- what is the purpose of declaration (for example, what is the purpose 
of declaring that OFS.Folder.Folder is traversable?) (that is, pragmatics)
- what is needed to be declared (and where) to achieve certain typical 
goals (like: in order to implement View class to this Content classes, 
you need to add this to ZCML configure)


Of course, this misunderstanding will go away with experience. But I 
think this is what really frustrates newbies.
Even programming language source code (especially imperative) is easier 
to understand: it can be followed. Object-oriented systems are less 
navigable, but still it is possible.

Now, the ZCML declarations seem to hang in the air...

Also, someone noted that write-once principle is broken with ZCML: it's 
very verbose to at least my taste.


And after ABC of ZCML there lay a layer of idioms, unspoken patterns, etc.

Regards,
Roman
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Users need to activate their accounts

2006-02-12 Thread Florian Lindner
Hello,
how would you implement something like that?

What comes into my mind is:

1) Let the registration script create a PendingPrincipal object and store them 
into a folder. The activation script create a real user in the PAU based on 
the PendingPrincipal und deletes the PendingPrincipal.
Can I reuse a existing principal info object for that? I'm not sure about 
creating them in content space.

2) Create a utility that stores the principal information. The activation 
script reads that information and creates a principal in PAU (or let the 
utiltity create it)

3) Create (subclass) a PrincipalFolder and the InternetPrincipal object. Give 
the principal a activated flag and the Fodler a activatePrincipal(key) 
method.
At the moment I'm not sure if I know how to do that, but I've not tried 
yet. ;-)



At the moment I tend to 1) or 3). What do you think? How do you do it?

Thanks,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Lookup AddForms

2006-02-12 Thread Florian Lindner
Am Sonntag, 12. Februar 2006 21:54 schrieb Marc Rijken:
 Hi All,

 In an application I want to lookup for the addform registered for a schema.
 I have tried to lookup via the adapter. That failed, because the schema is
 not used as an interface for an adapter. I do not know where to look now.
 Can someone help me?

The addForm is registerad as a view named +. Use getView to look it up.

Regards,

Florian
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Lookup AddForms

2006-02-12 Thread Marc Rijken

Hi Florian,

I tried that. It works for the interface the addForm is registered for 
(for in the zcml addform directive), but it won't work for the schema 
(schema in the zcml addform derictive.


Marc

Florian Lindner schreef:

Am Sonntag, 12. Februar 2006 21:54 schrieb Marc Rijken:

Hi All,

In an application I want to lookup for the addform registered for a schema.
I have tried to lookup via the adapter. That failed, because the schema is
not used as an interface for an adapter. I do not know where to look now.
Can someone help me?


The addForm is registerad as a view named +. Use getView to look it up.

Regards,

Florian

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users