A few questions from a newbie
I would just like to say hi all to the zope community. I was previously using Mason (which I still like) and found zope and it looks *GREAT*! I'm quite the newbie though and have a few questions (I have been reading the online books for like a week now and still confused) I did see some previous messages in this group, but the answers didn't help me :( I have zope (2.3.3-1) and a few other modules. I'm using the older version because I'm using debian using apt-get, thats the version that's available. 1) How long would you say it takes to really become proficient with zope? 2) Is it possible to create a variable using DTML and then access it? If so, what would the syntax be? 3) I read about Zope Page Templates (ZPL). Should I just go with that and not bother with DTML? 4) My main question. I have a Z SQL method which takes a parameter. It works using the Test tab. I get it to work thru DTML too. How do I properly pass a parameter to it using Python? I try something like: context['MyZSQLMethod'](MyParam=1) It might be right for all I know, but even if it is I dunno what to do with it. How would I loop thru the data it returns? Thanks greatly for any feedback from you mighty gurus out there :) Azbok
On Tue, Oct 02, 2001 at 02:29:37PM -0000, azbok@yahoo.com wrote:
I would just like to say hi all to the zope community. I was previously using Mason (which I still like) and found zope and it looks *GREAT*!
Welcome!
1) How long would you say it takes to really become proficient with zope?
Eternity :)
2) Is it possible to create a variable using DTML and then access it? If so, what would the syntax be?
No (well, almost). DTML is for displaying already prepared data. You can use REQUEST.set() or <dtml-let> for temporary vars.
4) My main question. I have a Z SQL method which takes a parameter. It works using the Test tab. I get it to work thru DTML too. How do I properly pass a parameter to it using Python?
I try something like: context['MyZSQLMethod'](MyParam=1)
It is enough to say context.MyZSQLMethod. And context.MyZSQLMethod(MyParam=1) looks good for me. Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Tue, Oct 02, 2001 at 07:05:30PM +0400, Oleg Broytmann wrote:
On Tue, Oct 02, 2001 at 02:29:37PM -0000, azbok@yahoo.com wrote:
I would just like to say hi all to the zope community. I was previously using Mason (which I still like) and found zope and it looks *GREAT*!
Welcome!
1) How long would you say it takes to really become proficient with zope?
Eternity :)
This is not a fair answer. Think of Debian as an analogy for Zope. There are users, who essentially have to know how to log in and how to use a browser. (This doesn't take much time at all!) There are administrators who need to know how to install a package and keep it running. Zope's packaging system is nowhere near as slick as Debian's, but this generally takes only a few days. There are shell developers (glue programmers). This takes a couple weeks to a couple months, depending on what you already know. These are people who never leave DTML or ZPT, who may or may not use ZSQL methods, these days the documentation for this kind of programmer ranges from adequate to very good. After a while, such programmers will also be working the Scripts (Python) and External Methods. I suspect that there will eventually develop a class of people similar to debian package maintainers (people who compile, patch, and often document the work of product developers.) This may not happen, as a simple tarball almost suffices now. Then there are product developers. Here you have to know python well, be able to read other works and glean the intent from the code. These are more or less the equivalent of upstream developers. Documentation ranges from mediocre to non-existent. You can start writing reasonably well in a couple of weeks, but you may paint yourself into corners that you have trouble getting out of. It is really hard to say how long this will take. It depends on problem domain and how good your 'feel' is. Because what I have been doing until recently is not all that amenable to pluggable products, I am just starting this process. It is not a lot harder, but you have to understand the machinery better and have much more to look at. Finally, there are Zope Core Developers. These are like the kernel hackers. If you need this level of proficiency, particularly as an 'outsider', budget a couple of years. You need to read python very well, have considerable overall knowledge of the project as a whole, and be able to keep up with lots of very smart programmers. Jim Penny
On Tue, Oct 02, 2001 at 02:29:37PM -0000, azbok@yahoo.com wrote:
3) I read about Zope Page Templates (ZPL). Should I just go with that and not bother with DTML?
It depends what you want to do. My own opinion: Getting started quickly: Doing simple things in DTML is really easy. Simple things in ZPT tend to be a bit more wordy than in DTML. Existing code: Most of the Zope products out there use DTML, so there are a lot more examples. If you want to use other people's products you will probably have to learn a little DTML. Readability: DTML gives you the impression that you can get by without learning a little python. This is, IMHO, an illusion that just leads you into trouble. You will inevitably start writing python expressions in your <dtml-if> or <dtml-let> tags, and you'll probably start doing it without really understanding what you're doing, or knowing what the "_" variable is. Many newbies are confused by the fact that in DTML, names in quotes are not the same as names outside of quotes. Everything in quotes is python, which is not self-evident. ZPT is much more explicit about this. ZPT pretty much expects you to use python for anything sophisticated. Python expressions in a ZPT document are easy to identify - they start with the word "python". Web design tools: DTML uses proprietary tags that third-party web design applications will not understand. You can't easily edit DTML with Dreamweaver, GoLive, etc. ZPT is done with tag _attributes_, so a Page Template is valid XHTML. You can use your favorite design tool and it won't ruin your work. You can view the page outside of Zope and it'll actually look like something. So overall, my advice is, if you have time, learn both. :) And learn a little python. Here's a great python tutorial: http://www.andamooka.org/reader.pl?section=thinkpython Depending on your prior programming experience, you can work through that in a few hours or a few weeks. It'll teach you more than enough python to write python expressions in DTML or ZPT, and you'll also be able to write some Python Scripts to take complicated logic out of your pages (a good idea). The only time I'd suggest learning DTML but not ZPT is if you really have a quick project, don't want to invest a lot of time in Zope, and want to use a lot of other people's zope products. But don't be surprised when DTML starts confusing the heck out of you. I also highly recommend the ZDebug product, http://www.zope.org/Members/hathawsh/ZDebug It really helps make errors a lot more meaningful, especially for DTML. It doesn't help much with ZPT unfortunately. :( -- ................ paul winkler ................ custom calendars: http://www.calendargalaxy.com A member of ARMS: http://www.reacharms.com home page: http://www.slinkp.com
participants (4)
-
azbok@yahoo.com -
Jim Penny -
Oleg Broytmann -
Paul Winkler