Re: [Zope] Isn't DTML more like what other frameworks do?

2007-01-09 Thread Paul Winkler
On Tue, Jan 09, 2007 at 08:31:29PM +0100, Maciej Wisniowski wrote:
> > As for me, I am lazy. ZPT does things in a way that few other frameworks do,
> > although Ruby's Amrita2 sort of resembles ZPT.

Not really. It's more closely related to the Meld family (pymeld,
pymeldlite, meld3), and to XMLC.

> > Displaying phantom  text in a static page  which will
> > not be there dynamically is not superior to DTML.
> > It is just more confusing. I have never learned ZPT
> > well and I may never do so.
>
> There is also Twiddler from Simplistix. It is something
> pretty new and interesting. It claims that there is no
> need to learn new templating language.

Twiddler also looks very similar to the Meld family.  Looks nice, but
I haven't had time to get a sense of what distinguishes it from meld3.

> I'm not using dtml, only if I have to modify existing code,
> but it is painful. Often I don't know what happens and where
> from are all these variables :)
> Other thing is, that AFAIR dtml is faster than ZPT.

My feeling about the DTML-vs-ZPT debate is that it can basically be
reduced to the following chart:


FEATURE | DTML  |  ZPT|
+---+-+
potential for   |   | |
confusion due to| Lots  | A little|
implicit magic? |   | |
+---+-|
"familiar" syntax?  | Yes   | No  |
+---+-|
round-trip with | Hell no   | Maybe, with |
an HTML designer?   |   | some pain   |
+---+-|
Useful for  | Yes   | Not really  |
non-X(HT)ML?|   | |
+---+-|
Prevents invalid| No| Yes |
markup? |   | |
+---+-+


So, you have to ask yourself which of the above you care about for the
projects you work on. With Zope, I am typically doing HTML or XML,
usually with somebody else doing the design. For me, ZPT has nice
advantages.

OTOH, sometimes we're doing ZSQL so we use DTML syntax for that.  ZPT
would be useless for building SQL queries.

--

Paul Winkler
http://www.slinkp.com
___
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] Isn't DTML more like what other frameworks do?

2007-01-09 Thread Maciej Wisniowski
> As for me, I am lazy. ZPT does things in a way that few other frameworks do,
> although Ruby's Amrita2 sort of resembles ZPT.
> Displaying phantom  text in a static page  which will
> not be there dynamically is not superior to DTML.
> It is just more confusing. I have never learned ZPT
> well and I may never do so.
There is also Twiddler from Simplistix. It is something
pretty new and interesting. It claims that there is no
need to learn new templating language.

I'm not using dtml, only if I have to modify existing code,
but it is painful. Often I don't know what happens and where
from are all these variables :)
Other thing is, that AFAIR dtml is faster than ZPT.


-- 
Maciej Wisniowski

___
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] Isn't DTML more like what other frameworks do?

2007-01-09 Thread Mark, Jonathan (Integic)
I was reading a public blog post among the Zope honchos. And they were agreeing 
that ZPT was a mistake. Some said that Zope ought to have used something like 
CSilver.

Jim Fulton had complained that he had just spent an entire morning setting up 
tests for a ZPT page, and that he, Fulton, was supposed to be good at this 
stuff. 

One good thing about Ruby on Rail's RHTML is that it clearly separates RHTML 
calls with side effects but no returned value ("<%") from those that return a 
value but have no side effects on the page ("<%="). The developer of Eiffel 
says that in good O-O design routines either have side effects or they return a 
value, but not both. 

As for me, I am lazy. ZPT does things in a way that few other frameworks do, 
although Ruby's Amrita2 sort of resembles ZPT. Displaying phantom  text in a 
static page  which will not be there dynamically is not superior to DTML. It is 
just more confusing. I have never learned ZPT well and I may never do so.

Of course, I am not a Zope developer guy, just a user. As for _ being 
confusing, if I need to figure something out about the namespace variable then 
I look it up.
 

-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 09, 2007 2:01 PM
To: Andreas Jung
Cc: Mark, Jonathan (Integic); zope@zope.org
Subject: Re: [Zope] Isn't DTML more like what other frameworks do?


Andreas Jung wrote at 2007-1-8 19:08 +0100:
> ...
>The question is: what is easier to learn and to understand - DTML or ZPT?
>Can you explain the "nonsense" of the _ namespace in DTML to a newbie?

Sure.

There is only one caveat: that two positional arguments need to
be passed for recursive calls of DTML objects ("None" and "_").

>Can you explain the sequence-item magic with all special cases to a newbie?

There is no need. Newbies do not need to know *all* special cases
only the most essential ones.

The myriads of TALES expression types are almost as bad the
"sequence-item" special cases.

>ZPT is another approach to generate HTML. It's more logical, easier to learn
>and read.

This is arguable...



-- 
Dieter
___
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] Isn't DTML more like what other frameworks do?

2007-01-09 Thread Dieter Maurer
Andreas Jung wrote at 2007-1-8 19:08 +0100:
> ...
>The question is: what is easier to learn and to understand - DTML or ZPT?
>Can you explain the "nonsense" of the _ namespace in DTML to a newbie?

Sure.

There is only one caveat: that two positional arguments need to
be passed for recursive calls of DTML objects ("None" and "_").

>Can you explain the sequence-item magic with all special cases to a newbie?

There is no need. Newbies do not need to know *all* special cases
only the most essential ones.

The myriads of TALES expression types are almost as bad the
"sequence-item" special cases.

>ZPT is another approach to generate HTML. It's more logical, easier to learn
>and read.

This is arguable...



-- 
Dieter
___
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] Isn't DTML more like what other frameworks do?

2007-01-09 Thread Andreas Jung



--On 9. Januar 2007 07:47:28 + Chris Withers <[EMAIL PROTECTED]> 
wrote:



Andreas Jung wrote:


The question is: what is easier to learn and to understand - DTML or ZPT?


The correct answer is, of course, Twiddler ;-)

http://www.simplistix.co.uk/software/python/twiddler




Yes, you deserve the Zope Lifetime Award for Twiddler :-)

Andreas


pgpqhzSUPSgNm.pgp
Description: 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] Isn't DTML more like what other frameworks do?

2007-01-09 Thread Chris Withers

Andreas Jung wrote:


The question is: what is easier to learn and to understand - DTML or ZPT?


The correct answer is, of course, Twiddler ;-)

http://www.simplistix.co.uk/software/python/twiddler

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
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] Isn't DTML more like what other frameworks do?

2007-01-08 Thread John Schinnerer

Aloha,

Mark, Jonathan (Integic) wrote:

What does matter is that DTML is very similar to RHTML (as in Ruby On
Rails), ASP, etc. ZPT requires a new way of thinking. I would much
rather convert RHTML to or from DTML than to or from ZPT.

So I don't really get the benefit of using ZPT. The fact that no one
outside of Zope seems to have created a ZPT-like solution suggests to
me that ZPT, as I said, solves a problem which doesn't exist. 


As mentioned other frameworks use TAL/METAL (the basis for ZPT; bear in 
mind ZPT is a zope-specific use of TAL and METAL) - I have worked with 
Roundup a bit and it was a joy to see that it used TAL for template 
language.


One major factor nobody has mentioned yet is that TAL/METAL offers much 
better ability to separate logic, presentation and content.
By their very nature HTML-munging template markups violate this 
well-known (if not well-respected ;-) design principle.


The WYSIWYG editor thing is merely a side benefit of markup that is both 
XML compliant and cleanly separates logic, presentation and content.


I suspect that nobody else created TAL because it is easier to go with 
what one is familiar/comfortable with - HTML-munging - than to break new 
ground, even when the new ground is better in both design and practice.


Sure DTML is more like PHP and ASP and Ruby/Rails' HTML munge and 
Alfresco's HTML munge and so on (whatever they're called). As my grandma 
used to say, if everyone were jumping off a cliff, would you do it too 
just because they were?

;-)

cheers,
John S.

--
John Schinnerer - MA, Whole Systems Design
--
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
[EMAIL PROTECTED]
http://eco-living.net
___
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] Isn't DTML more like what other frameworks do?

2007-01-08 Thread Andreas Jung



--On 8. Januar 2007 13:01:26 -0500 "Mark, Jonathan (Integic)" 
<[EMAIL PROTECTED]> wrote:



"""Why (the hell) are you (still) using DTML (as newbie). You are strongly
encouraged to use ZPT."""

My sense is that ZPT solves a problem which for most of us does not
exist. If you wish to have designers work directly on markup in an HTML
WYSIWYG editor then yes, ZPT is great.


That's a pseudo argument. I've never seen any designer working on top
of a ZPT



But most of us create our own HTML anyway. And for us it doesn't matter
if DTML works in a WYSIWYG HTML editor, because we don't use the latter.

What does matter is that DTML is very similar to RHTML (as in Ruby On
Rails), ASP, etc. ZPT requires a new way of thinking. I would much rather
convert RHTML to or from DTML than to or from ZPT.

So I don't really get the benefit of using ZPT. The fact that no one
outside of Zope seems to have created a ZPT-like solution suggests to me
that ZPT, as I said, solves a problem which doesn't exist.


The question is: what is easier to learn and to understand - DTML or ZPT?
Can you explain the "nonsense" of the _ namespace in DTML to a newbie?
Can you explain the sequence-item magic with all special cases to a newbie?
ZPT is another approach to generate HTML. It's more logical, easier to learn
and read. A person with PHP background might prefer DTML but from my 
experience with people starting with I can say that ZPT is more straight 
forward for them. ZPT has of course it's pros and cons but my general 
advice to people starting with Zope: thumb up for using ZPT, thumb down for 
using DTML.


Andreas





pgpAlvp8m8LtH.pgp
Description: 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] Isn't DTML more like what other frameworks do?

2007-01-08 Thread JPenny
[EMAIL PROTECTED] wrote on 01/08/2007 01:01:26 PM:

> """Why (the hell) are you (still) using DTML (as newbie). You are 
strongly
> encouraged to use ZPT."""
> 
> My sense is that ZPT solves a problem which for most of us does not 
> exist. If you wish to have designers work directly on markup in an 
> HTML WYSIWYG editor then yes, ZPT is great.
> 
> What does matter is that DTML is very similar to RHTML (as in Ruby 
> On Rails), ASP, etc. ZPT requires a new way of thinking. I would 
> much rather convert RHTML to or from DTML than to or from ZPT.
> 
> So I don't really get the benefit of using ZPT. The fact that no one
> outside of Zope seems to have created a ZPT-like solution suggests 
> to me that ZPT, as I said, solves a problem which doesn't exist. 

I initially resisted ZPT, strongly.  But, the designer/developer
dichotomy is not the real reason to use ZPT.  The real reason is that
ZPT makes it very difficult to generate ill-formed pages.

A secondary reason, is that if you are doing a lot of work with forms,
it is actually much easier to create a single forms that handles both
initial input and correction of errors.

jim penny
___
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 )


[Zope] Isn't DTML more like what other frameworks do?

2007-01-08 Thread Mark, Jonathan (Integic)
"""Why (the hell) are you (still) using DTML (as newbie). You are strongly
encouraged to use ZPT."""

My sense is that ZPT solves a problem which for most of us does not exist. If 
you wish to have designers work directly on markup in an HTML WYSIWYG editor 
then yes, ZPT is great.

But most of us create our own HTML anyway. And for us it doesn't matter if DTML 
works in a WYSIWYG HTML editor, because we don't use the latter. 

What does matter is that DTML is very similar to RHTML (as in Ruby On Rails), 
ASP, etc. ZPT requires a new way of thinking. I would much rather convert RHTML 
to or from DTML than to or from ZPT.

So I don't really get the benefit of using ZPT. The fact that no one outside of 
Zope seems to have created a ZPT-like solution suggests to me that ZPT, as I 
said, solves a problem which doesn't exist. 
___
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 )