Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-05 Thread Hanno Schlichting
On Sun, Sep 5, 2010 at 1:28 PM, Tim Hoffman  wrote:
> So I was looking for zope eco system based non html/xml based templating
> systems as a response to Martin
> saying DTML is dead, as I am currently using DTML for these sorts of tasks.

The Zope eco system for such tasks is the same as the wider Python eco
system these days. There's absolutely no need to stick with a
Zope-only approach anymore.

string.Template, Jinja2 and Mako all seem to be well maintained
templating solutions you could use. DTML is definitely dead as far as
open-source software can die.

Hanno
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-05 Thread Florian Friesdorf
On Sun, Sep 05, 2010 at 11:13:05AM +0800, Tim Hoffman wrote:
> Hi Florian
> 
> I use a model based generation approach (from enterprise architect) however
> even archgenxml has templates for large amounts of  boiler plate under the
> hood.
> 
> Have you actually looked at the src of archgenxml, if you did you will
> notices it uses dtml for templating the code output ;-)

Once did, but wasn't aware of any dtml, come to think of it, there is
some reason to it ;)

-- 
Florian Friesdorf 
  GPG FPR: EA5C F2B4 FBBB BA65 3DCD  E8ED 82A1 6522 4A1F 4367
Jabber/XMPP: f...@chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC


pgp9485K58h0p.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-05 Thread Tim Hoffman
Hi Laurence

I think you missed my point.  I was talking about generating code (sql as
DDL for instance)
not sql statements.  I use Enterprise architect to model the application in
UML for the data model,
entity model, I generate  generate storm schema and DDL for accessing the
database from the model.
And much of the model is originally reverse engineered from the RDBMS by EE.


And usually the RDBMS is pre-existing, not a new thing.  So the schema of
the RDBMS is fixed.

So I was looking for zope eco system based non html/xml based templating
systems as a response to Martin
saying DTML is dead, as I am currently using DTML for these sorts of tasks.

T

On Sun, Sep 5, 2010 at 6:47 PM, Laurence Rowe  wrote:

> On 5 September 2010 02:49, Tim Hoffman  wrote:
> >>>
> >>
> >> Please note that DTML is a dead (and horrid) technology.
> >> Martin
> >
> > But zpt is horrible for doing non html/xml based things ;-), What do you
> > think is good alternative in the zope eco system now
> > for templating other types of things (sql, python ...) ?
>
> If you don't need conditions or looping, then string.Template from the
> standard library is a reasonable choice. For templating SQL I would
> use SQLAlchemy, as you want appropriate quoting applied to your input.
> (You don't have to use it's ORM).
>
> Laurence
>
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-05 Thread Laurence Rowe
On 5 September 2010 02:49, Tim Hoffman  wrote:
>>>
>>
>> Please note that DTML is a dead (and horrid) technology.
>> Martin
>
> But zpt is horrible for doing non html/xml based things ;-), What do you
> think is good alternative in the zope eco system now
> for templating other types of things (sql, python ...) ?

If you don't need conditions or looping, then string.Template from the
standard library is a reasonable choice. For templating SQL I would
use SQLAlchemy, as you want appropriate quoting applied to your input.
(You don't have to use it's ORM).

Laurence
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-05 Thread Tim Hoffman
HI Vincent.

I haven't looked an jinja to date. Will definately have a look at it.

I generate a lot of code (sql, gae models, storm schema, formish schema's)
from Enterprise Architect, and
currently using dtml for all non html/xml output.

 Cheers

T

On Sun, Sep 5, 2010 at 3:35 PM, Vincent Fretin wrote:

> Hi,
>
> For AGX3, we started to use Jinja for the template, for example for
> the generation of setup.py, we have:
>
> version = '{{version}}'
>
> setup(name='{{project}}',
>  version=version,
>  description="{{description}}",
> ...
>
> The syntax is simpler than dtml we use in AGX2:
> 
>
> Vincent
>
>
> On Sun, Sep 5, 2010 at 5:13 AM, Tim Hoffman  wrote:
> > Hi Florian
> > I use a model based generation approach (from enterprise architect)
> however
> > even archgenxml has templates for large amounts of  boiler plate under
> the
> > hood.
> > Have you actually looked at the src of archgenxml, if you did you will
> > notices it uses dtml for templating the code output ;-)
>
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-05 Thread Vincent Fretin
Hi,

For AGX3, we started to use Jinja for the template, for example for
the generation of setup.py, we have:

version = '{{version}}'

setup(name='{{project}}',
  version=version,
  description="{{description}}",
...

The syntax is simpler than dtml we use in AGX2:


Vincent


On Sun, Sep 5, 2010 at 5:13 AM, Tim Hoffman  wrote:
> Hi Florian
> I use a model based generation approach (from enterprise architect) however
> even archgenxml has templates for large amounts of  boiler plate under the
> hood.
> Have you actually looked at the src of archgenxml, if you did you will
> notices it uses dtml for templating the code output ;-)
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-04 Thread Tim Hoffman
Hi Florian

I use a model based generation approach (from enterprise architect) however
even archgenxml has templates for large amounts of  boiler plate under the
hood.

Have you actually looked at the src of archgenxml, if you did you will
notices it uses dtml for templating the code output ;-)

T

On Sun, Sep 5, 2010 at 9:11 AM, Florian Friesdorf  wrote:

> On Sun, Sep 05, 2010 at 08:49:39AM +0800, Tim Hoffman wrote:
> > >
> > >
> > >>
> > > Please note that DTML is a dead (and horrid) technology.
> > >
> > > Martin
> > >
> >
> > But zpt is horrible for doing non html/xml based things ;-), What do you
> > think is good alternative in the zope eco system now
> > for templating other types of things (sql, python ...) ?
>
> I would use a templating system for things that are easy to template
> (html/xml) and where more complex logic can be offloaded to a real
> programming language like python (as zpt does).
>
> Using a templating system for a programming language is I think a
> different programming paradigm than zope's component architecture and
> contrary to code reusage. With code generators like ArchGenXML or agx
> you are able to create models for your software on a more abstract level
> than based on templating, so I would not use templating but model-based
> code generation instead.
>
>
> florian
>
> --
> Florian Friesdorf 
>  GPG FPR: EA5C F2B4 FBBB BA65 3DCD  E8ED 82A1 6522 4A1F 4367
> Jabber/XMPP: f...@chaoflow.net
> IRC: chaoflow on freenode,ircnet,blafasel,OFTC
>
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-04 Thread Florian Friesdorf
On Sun, Sep 05, 2010 at 08:49:39AM +0800, Tim Hoffman wrote:
> >
> >
> >>
> > Please note that DTML is a dead (and horrid) technology.
> >
> > Martin
> >
> 
> But zpt is horrible for doing non html/xml based things ;-), What do you
> think is good alternative in the zope eco system now
> for templating other types of things (sql, python ...) ?

I would use a templating system for things that are easy to template
(html/xml) and where more complex logic can be offloaded to a real
programming language like python (as zpt does).

Using a templating system for a programming language is I think a
different programming paradigm than zope's component architecture and
contrary to code reusage. With code generators like ArchGenXML or agx
you are able to create models for your software on a more abstract level
than based on templating, so I would not use templating but model-based
code generation instead.


florian

-- 
Florian Friesdorf 
  GPG FPR: EA5C F2B4 FBBB BA65 3DCD  E8ED 82A1 6522 4A1F 4367
Jabber/XMPP: f...@chaoflow.net
IRC: chaoflow on freenode,ircnet,blafasel,OFTC


pgpD9QHMx5IZs.pgp
Description: PGP signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] DTML is dead, long live DTML ;-)

2010-09-04 Thread Tim Hoffman
>
>
>>
> Please note that DTML is a dead (and horrid) technology.
>
> Martin
>

But zpt is horrible for doing non html/xml based things ;-), What do you
think is good alternative in the zope eco system now
for templating other types of things (sql, python ...) ?

T
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )