Greetz Reading the ZopeBook.pdf one get the impression the DTML is on its way out and TAL on its way in. Is that the case? If yes, why does Devshed then post an article about DTML? \Oliver
Oliver Marx wrote:
Reading the ZopeBook.pdf one get the impression the DTML is on its way out and TAL on its way in.
Yup.
Is that the case?
Well, ZPT rather than TAL, but yet...
If yes, why does Devshed then post an article about DTML?
They're lazy and out of date? ;-) *grinz* Chris
chris, your statement about the future of DTML is incorrect. DTML support will be retained and even improved in the future. the difference in DTML- and ZPT-support is simply how much time we are spending on it. more time is going into ZPT because we use it more extensively internally and the take-up in the community seems to indicate the same is true for a large part of zope developers out there. devshed is not lazy and out of date for publishing an article about DTML. DTML is as valid and future-proof a templating system for zope as ZPT is. jens On Thursday, May 23, 2002, at 07:56 , Chris Withers wrote:
Oliver Marx wrote:
Reading the ZopeBook.pdf one get the impression the DTML is on its way out and TAL on its way in.
Yup.
Is that the case?
Well, ZPT rather than TAL, but yet...
If yes, why does Devshed then post an article about DTML?
They're lazy and out of date? ;-)
*grinz*
Chris
On Thu, 2002-05-23 at 15:17, Jens Vagelpohl wrote:
DTML support will be retained and even improved in the future. the difference in DTML- and ZPT-support is simply how much time we are spending on it.
hi, dtml = programmers point of view zpt = designers point of view I'm very glad to hear that DTML will be "supported" (means not thrown into /dev/null) by ZC in the future... I can sleep far better now...;-) greetings, maik. -- maik jablonski http://www.sachunterricht-online.de universitaet bielefeld http://www.zfl.uni-bielefeld.de zentrum fuer lehrerbildung tlph://+49.(0).521.106.4234
My understanding is that there are things that you can do in DTML that you can't readily do in TAL, and that making the optimum use of all of them you end up with the following: DTML Documents - mainly only used for storing basic content ZPT - Basic Presentation Logic - particularly where this will need to be editable by designers DTML Methods - More sophisticated presentation logic (and most likely more used to generate a section of a page) Python Scripts - Still more complex presentation logic, and/or business logic. Personally I'd hate to see either ZPT or DTML vanish, since I have a particular use for both - often prototyping mostly in DTML to work things out quickly and then creating a final version using ZPT and Python Scripts to separate out the code and presentation where proper design will be necessary... ZPT is definitely easier for the designers - you'll have a tough time getting most WYSIWYG editors to let you enter any DTML, let alone not breaking existing DTML.... On the other hand, I'd be keen to see a 'Static Text' document type, which would be like a DTML Document in many ways - editable from the ZMI, history storage, history viewing, etc, but not parsed for any tags, so presentation would (theoretically) be quicker. David 23/05/2002 14:17:53, Jens Vagelpohl <jens@zope.com> wrote:
chris,
your statement about the future of DTML is incorrect.
DTML support will be retained and even improved in the future. the difference in DTML- and ZPT-support is simply how much time we are spending on it. more time is going into ZPT because we use it more extensively internally and the take-up in the community seems to indicate the same is true for a large part of zope developers out there.
devshed is not lazy and out of date for publishing an article about DTML. DTML is as valid and future-proof a templating system for zope as ZPT is.
jens
On Thursday, May 23, 2002, at 07:56 , Chris Withers wrote:
Oliver Marx wrote:
Reading the ZopeBook.pdf one get the impression the DTML is on its way out and TAL on its way in.
Yup.
Is that the case?
Well, ZPT rather than TAL, but yet...
If yes, why does Devshed then post an article about DTML?
They're lazy and out of date? ;-)
*grinz*
Chris
_______________________________________________ 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 )
"Into the abyss we stare, hoping that the abyss does not gaze so intently upon us"
David Burton wrote:
DTML Documents - mainly only used for storing basic content
Biggest mistake in Zope ;-)
ZPT - Basic Presentation Logic - particularly where this will need to be editable by designers
Nope, I use 'em exclusively, a lot of other people do too..
DTML Methods - More sophisticated presentation logic (and most likely more used to generate a section of a page)
Oh PLEASE! There are so many reasons why that is not true... And ZPT is MUCH easier to use for generating sections of pages...
Python Scripts - Still more complex presentation logic, and/or business logic.
I'd stick to doing business logic in them...
Personally I'd hate to see either ZPT or DTML vanish, since I have a particular use for both - often prototyping mostly in DTML to work things out quickly and then creating a final version using ZPT and Python Scripts to separate out the code and presentation where proper design will be necessary...
that's a less-than-optimal way of doing things.
On the other hand, I'd be keen to see a 'Static Text' document type, which would be like a DTML Document in many ways - editable from the ZMI, history storage, history viewing, etc, but not parsed for any tags, so presentation would (theoretically) be quicker.
Indeed. What you want is dumb data object with presentation layered over it. Seen Zoep 3 or the CMF lately? ;-) cheers, Chris
ZPT - Basic Presentation Logic - particularly where this will need to be editable by designers
Nope, I use 'em exclusively, a lot of other people do too..
Nah use DTML Methods
DTML Methods - More sophisticated presentation logic (and most likely more used to generate a section of a page)
Oh PLEASE! There are so many reasons why that is not true... And ZPT is MUCH easier to use for generating sections of pages...
DTML is much easier for those who like splitting everything down into little chunks. To be honest the best way in my mind is: - do as much in python - do simple dtml - use as much css as possible
Python Scripts - Still more complex presentation logic, and/or business logic.
I'd stick to doing business logic in them...
Unfortunately I agree with Chris there :)
Personally I'd hate to see either ZPT or DTML vanish, since I have a particular use for both - often prototyping mostly in DTML to work things out quickly and then creating a final version using ZPT and Python Scripts to separate out the code and presentation where proper design will be necessary...
that's a less-than-optimal way of doing things.
Yeah why bother with ZPT?
On the other hand, I'd be keen to see a 'Static Text' document type, which would be like a DTML Document in many ways - editable from the ZMI, history storage, history viewing, etc, but not parsed for any tags, so presentation would (theoretically) be quicker.
Indeed. What you want is dumb data object with presentation layered over it. Seen Zoep 3 or the CMF lately? ;-)
Have a look for HTML Document on Zope.org -- Andy McKay
Jens Vagelpohl wrote:
DTML support will be retained and even improved in the future. the difference in DTML- and ZPT-support is simply how much time we are spending on it. more time is going into ZPT because we use it more extensively internally and the take-up in the community seems to indicate the same is true for a large part of zope developers out there.
For me, that reads pretty close to "DTML is on its way out and ZPT on its way in."
DTML is as valid and future-proof a templating system for zope as ZPT is.
Sorry, I gotta point out how crazy that is... Have you tried maintaining DTML you wrote 2 years ago when you didn't know you had to be really careful about using ""? cheers, Chris
DTML support will be retained and even improved in the future. the difference in DTML- and ZPT-support is simply how much time we are spending on it. more time is going into ZPT because we use it more extensively internally and the take-up in the community seems to indicate the same is true for a large part of zope developers out there.
For me, that reads pretty close to "DTML is on its way out and ZPT on its way in."
No it reads what it says. DTML works.
DTML is as valid and future-proof a templating system for zope as ZPT is.
Sorry, I gotta point out how crazy that is... Have you tried maintaining DTML you wrote 2 years ago when you didn't know you had to be really careful about using ""?
Yes, and bad DTML is hard to maintain. Im sure we are going to see some really ugly ZPT that is hard to maintain. So is really badly written Python. The main reason DTML from 2 years ago sucked was the lack of Python Scripts in the days when you either wrote DTML or a Product. -- Andy McKay
----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Oliver Marx" <oliver@tekk.dk> Cc: "Zope@Zope. Org" <zope@zope.org> Sent: Thursday, May 23, 2002 4:56 AM Subject: Re: [Zope] DTML or TAL
Oliver Marx wrote:
Reading the ZopeBook.pdf one get the impression the DTML is on its way
out
and TAL on its way in.
Yup.
Oh give it a rest Chris. And we wonder why people get worried about DTML going away. Its not. If it did Zope would fork, but its not.
Is that the case?
Well, ZPT rather than TAL, but yet...
If yes, why does Devshed then post an article about DTML?
They're lazy and out of date? ;-)
They arent interested in ZPT because they can use DTML and find it fast and simple? -- Andy McKay
Andy McKay wrote:
Oh give it a rest Chris. And we wonder why people get worried about DTML going away. Its not. If it did Zope would fork, but its not.
History will tell ;-) Sure, it'll be there for backwards compatability, but I will not "give it a rest" when it comes to trying to persuade new users to use something that may well persuade them not to use Zoep at all. The number of people I've seen confused by DTML's idiosyncracies, confused namespace and excessive implicitness means that I'm not gonna just stand by while people do the equivalent of pointing someone wearing a blindfold towards the edge of a cliff... cheers, Chris
On Friday 24 May 2002 4:16 pm, Chris Withers wrote:
The number of people I've seen confused by DTML's idiosyncracies, confused namespace and excessive implicitness means that I'm not gonna just stand by while people do the equivalent of pointing someone wearing a blindfold towards the edge of a cliff...
I dont think DTML is fatally flawed.... not even close. dtml has a place even in new projects I start today. Some improvements for those quirks have gone into 2.6, and I dont see its maintenance and development stopping for the foreseable future.
On Fri, May 24, 2002 at 04:16:53PM +0100, Chris Withers wrote:
Andy McKay wrote:
Oh give it a rest Chris. And we wonder why people get worried about DTML going away. Its not. If it did Zope would fork, but its not.
History will tell ;-)
Sure, it'll be there for backwards compatability, but I will not "give it a rest" when it comes to trying to persuade new users to use something that may well persuade them not to use Zoep at all.
The number of people I've seen confused by DTML's idiosyncracies, confused namespace and excessive implicitness means that I'm not gonna just stand by while people do the equivalent of pointing someone wearing a blindfold towards the edge of a cliff...
Ah, but there are things in zope that can simply not be done, as far as I know, with ZPT. These things certainly includes ZSQL methods. They probably include places where you want to use the equivalent of dtml-with (although I think that you could mostly use "Portable Holes" to do what I am using this kind of stuff for). And using ZPT in python products seems to be not well documented, and may be problematic, see "Grrr for ZPT and python product" on the zope mailing list. While I believe that ZPT is superior to DTML, in ZPT's intended realm, there can be no doubt that ZPT looks pretty unfamiliar to a programmer who does not have an extensive XML background. One of the things I need to get around to is writing some example code showing alternate styles in simple tal. I think that much of the Zope Book's example code will prove to be non-idiomatic. Jim Penny
cheers,
Chris
_______________________________________________ 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 )
Jim Penny wrote:
Ah, but there are things in zope that can simply not be done, as far as I know, with ZPT.
Can you give some examples? I love a good challenge ;-)
These things certainly includes ZSQL methods.
There's no reason why ZSQL methods couldn't be done use ZPT, but no-one has written a parser for them yet. To be fair though, the whole database integration side of Zope hasn't been worked on in a _long_ time (I'm not sure if this is the case in Zope 3...) and has other intricacies beyond being DTML-based that make them 'interesting' ;-)
They probably include places where you want to use the equivalent of dtml-with (although I
I find tal:define takes care of any situation where I'd have used dtml-wtih before...
this kind of stuff for). And using ZPT in python products seems to be not well documented, and may be problematic, see "Grrr for ZPT and python product" on the zope mailing list.
Couldn't find the thread, what's the problem? I use these all the time...
While I believe that ZPT is superior to DTML, in ZPT's intended realm, there can be no doubt that ZPT looks pretty unfamiliar to a programmer who does not have an extensive XML background.
...so does any other language to people who haven't seen it before ;-)
One of the things I need to get around to is writing some example code showing alternate styles in simple tal. I think that much of the Zope Book's example code will prove to be non-idiomatic.
http://www.zope.org/Members/peterbe/DTML2ZPT ...although I'd code some of the examples there differently, but it is a good place to start... cheers, Chris
I have to agree with Andy here. Not that any of you know who I am... People should be allowed to make their own decisions based on their needs. In my case, I have absolutely no need for interoperability with design program like DreamWeaver. I do need sophisticated data queries. I also need it done quickly. For me, ZPT was far too odd and incomplete to meet my needs. Sure, DTML is weird. So is C, C++, Python (Yes, it is. Don't argue), Perl, Java, Forth, Lisp, Pascal... It's all a matter of perspective and experience. All languages have booster and detractors. Most of us are just trying to get our work done and try to keep the religious arguments at home. I have no issue with you telling folks you love ZPT and how great they are or warning them that they might not meet their future needs. I'd love to have examples of how DTML will not support my future work and how ZPT is better. But it's a different matter altogether to claim they are on the way out when they aren't. Charlie "I'm using DTML and I'm OK." Reiman
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chris Withers Sent: Friday, May 24, 2002 8:17 AM Cc: Zope@Zope. Org Subject: Re: [Zope] DTML or TAL
Andy McKay wrote:
Oh give it a rest Chris. And we wonder why people get worried about DTML going away. Its not. If it did Zope would fork, but its not.
History will tell ;-)
Sure, it'll be there for backwards compatability, but I will not "give it a rest" when it comes to trying to persuade new users to use something that may well persuade them not to use Zoep at all.
The number of people I've seen confused by DTML's idiosyncracies, confused namespace and excessive implicitness means that I'm not gonna just stand by while people do the equivalent of pointing someone wearing a blindfold towards the edge of a cliff...
cheers,
Chris
_______________________________________________ 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 )
...works fine for me. They seem to work with each other a lot more easily in zope itself than they do on this list. I don't use a wysiwyg editor, and I nonetheless appreciate ZPT/TAL's intentions and positive qualities for layout, templating, macros and prototyping. I know jack about XML and that doesn't (afaik) hinder my use of ZPT/TAL. DTML is real handy for quick and simple logic stuff. As I crawl up the Python/zope learning curve I'll use Python for non-quick non-simple logic stuff. Practical suggestion for those championing more ZPT/TAL use: Quit burning your cycles on rhetoric here, and get to work documenting and exemplifying it. There are a *whole lot* of howtos, code snippets, examples, etc. in DTML - if someone's struggling to get something done and can find one that works, they probably will. I certainly have. If it were doable and documented in ZPT/TAL and I could find that info, I'd use it. Go to it... John S. __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
Chris Withers wrote:
The number of people I've seen confused by DTML's idiosyncracies, confused namespace and excessive implicitness means that I'm not gonna just stand by while people do the equivalent of pointing someone wearing a blindfold towards the edge of a cliff...
Dang ... thats the problem with having learned dtml. I find ZPT difficult to grasp. Well at least at the cursory and superficial glance that I have given it. But it's a difficult decision to change language when I find that dtml works nicely. I have never har problems with too much logic in my dtml either as I have allways refactored it out into python. regards Max M
On Friday 24 May 2002 3:35 pm, Andy McKay wrote:
If yes, why does Devshed then post an article about DTML?
They're lazy and out of date? ;-)
They arent interested in ZPT because they can use DTML and find it fast and simple?
More likely they are sticking with what they know: DTML. Long version of this post: I feel I can speak pretty well on the subject of 'new users' and DTML/ZPT, since I have been a new user of bother pretty recently. When I first started using Zope I used DTML because it was the only option. Frankly, I hated it. It reminds me of ASP in the way it mixes up logic in your presentation code. I kept using it despite its inherant tendency to go awry, though, because there was really no choice. Then ZPT appeared on the scene and I tried it. It makes much more sense to me as a way of organising presentation of content on a web page. The only place I used DTML now is where it really can't be used, like in ZSQL methods, or (presumably) other non-XML things. Some people seem to complain about ZPT relying too heavily on knowledge of XML but I can't see how ZPT is that much more complex than HTML in structural terms. Semantically obviously it's very different but the only thing different to very basic HTML is the tal: and metal: namespace bits. Not exactly rocket science. Of course, you could do the same things (pretty much) in DTML that you could do in ZPT in terms of seperation of logic from content, but it makes it so easy to slip up and make a mess. You deliver a short-term solution to a problem that has cropped up after release that isn't really best practise but it's quick and easy. Then another comes in and you do the same. Then another. Over the maintenence lifespan of your app, that once-clean (although some people would say it's inherantly dirty ;-) ) DTML descends into a stinking cesspool of hacks. I don't know about anyone else, but I'm not a perfect programmer. I could use a little guidance now and again as to how my code is best structured. I'd rather have a few constraints that keep my code manageable in the long-term than make 'fast and simple' hacks that come back to bite me in the ass a few weeks/months/whatever later. On a vaguely related note, it seems lots of people make a big deal that the main aim of ZPT is compatibility with WYSIWYG HTML editors. Personally, I really couldn't give less of a shit about that. I don't use WYSIWYGs and I don't plan to. The big win for ZPT is the inherant structure, pure and simple. Short version of this post: dtml si su><0r!!111 ;-) Harry
Oliver Marx wrote:
Greetz
Reading the ZopeBook.pdf one get the impression the DTML is on its way out and TAL on its way in.
Is that the case?
If yes, why does Devshed then post an article about DTML?
\Oliver
Hi Oliver, TAL is certainly a newer model of how to mark up templates. It gets a lot of development attention. One might say that DTML has matured, and isn't being aggresively developed any more. However, that's not to imply DTML is dead -- right now DTML is more heavily optimized than TAL, so DTML pages will render with less CPU power. Arguably, there are slightly different audiences for DTML vs TAL -- TAL is really geared towards users of HTML markup tools, who need a markup language that fits seamlessly in their tool. There are some things you can get away with using DTML that are clumsy with TAL (e.g. dtml-else vs a tal:codition="not:"). You also use DTML expression syntax in SQL methods. This doesn't mean that either of the two methods is "perfect" or "ideal." A lot of people from the ASP or PHP sites want to be able to drop to an in-line script on a page. Neither DTML or TAL do that. DTML and TAL both encourage you to move your complex logic into supporting scripts. In any case, DTML is not being killed in favor of TAL; however, many Zope components are switching their templates from DTML to TAL. Many times this is for the convenience of authors who wish to use Dreamweaver or GoLive to mark up those templates. Anyway, just because TAL is new and shiny and getting a lot of attention doesn't mean DTML is dead, or going away, or even withering. If you're trying to decide which to use, pick the one you are most comfortable with, and that best meets your needs. -- Matt Kromer Zope Corporation http://www.zope.com/
participants (13)
-
Andy McKay -
Charlie Reiman -
Chris Withers -
David Burton -
Harry Wilkinson -
Jens Vagelpohl -
Jim Penny -
John Schinnerer -
Maik Jablonski -
Matthew T. Kromer -
Max M -
Oliver Marx -
Toby Dickenson