[Zope3-Users] How do I learn how to use Zope?

Hermann Himmelbauer dusty at qwer.tk
Tue Jun 16 08:47:01 EDT 2009


Am Dienstag 16 Juni 2009 01:26:24 schrieb Edward Zwart:
> I've been limping along for a couple weeks trying to learn this
> framework, and I'm completely stuck, and can barely even form a good
> question... so apologies in advance...
>
> My problem is I'm brand new to Zope, and it's impossible to tell when
> I'm reading something current or not.  I've been following the z3c
> (3.4 specific?) tutorial and also von Weitershausen's book.  But I
> think sometimes those two approaches are mutually exclusive.  I don't
> even know if that's true or not.  If someone could confirm that, that
> alone would be great.

It is true to some degree, yes. The problem with Philipps book is that it 
concentrates quite a lot on using the ZMI and adapting things via the ZMI. In 
reality, the ZMI is not that useful, as it can't be adapted that well very 
often. For that reason, most people (like me) don't use it at all. I 
personally use a combination of z3c packages (like z3c.form).

> Someone on this list recently pointed out to me that Zope 3.4
> directory stucture (using zopeproject) versus the 3.3 one (using
> mkzopeinstance) was the issue I was encountering...  but I really
> don't know how far that issue goes when I'm reading other literature.

I don't think that Philipps examples work with Zope 3.4, but I'm not sure.

> Then today, I downloaded the just-announced z3c.form 2.0.0 demo to see
> if I could gain some insight into the various problems I've created
> for myself in the last few weeks, and I see again a completely
> different directory structure!

Interesting - I was stuck the very same like you appr. 1.5 years ago. First I 
tried Philipps book, could not apply the given patterns to my application and 
dig into z3c.form then. This was hard, but with help of the community and 
much time, I got into it more or less.

What helped me most, were the doctests, as one can see how things work here. 
In case of a business project I'd suggest to hire some zope3-experienced 
programmer for consulting and basic startup, as zope3 requires much 
experience - I remember when a ForbiddenAttributeError took me 3 days to 
figure out why it happened, which I could now solve in appr. 2 minutes.

If you don't like Grok or something else on top of Zope3, then I suggest to 
stick to the z3c.form demo and build up from there.

> Ok, so how do I learn from this?  It is extremely difficult to
> penetrate!  Is there a process for reducing this barrier to newcomers?
>  What can I do to help?!  I'm sold on many aspects of Zope, and I
> would really like to be able to employ them!

I'm personally not aware of any process that lowers the barriers, except for 
on-top-of-Zope3-products like Grok...

> In the meantime, here's a specific problem...
>
> I am trying to make a custom template to render my form...
>
> Basically, I followed the Carduner z3c tutorial, and am trying to do
> this in my template...
>
> <div tal:content="view/render">the form goes here?</div>

That won't work - It's the render function that displays the page template, so 
what you do here is:

The render function displays the page template. You call the render function, 
which renders the page template, which.... Got it?

This pattern can be used when e.g. having an object attribute, e.g. "title" in 
the view class, which can then be displayed like this here: 

<div tal:content="view/title">My title</div>

Best Regards,
Hermann


-- 
hermann at qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7


More information about the Zope3-users mailing list