You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by jb...@team-linux.com on 2000/07/27 21:41:56 UTC

RE: [is it time for something other than html?] RE: Templating s

> I could go off about why HTML sucks for dynamic page caching. If there was
> somehow a way to cache say the template, leaving only the same dynamic
> portion uncached, it would certainly help things along quite a bit. If
> anyone knows of a good way of doing this I would certainly be interested
> in hearing it. 

There is. Use HTML::Embperl.

I've been using it for several years now. I build objects for accessing any
data I need and then do simple things in my templates like:

<H2>[+ $forum->title +]</H2>

-- 
Jason Bodnar + jbodnar@team-linux.com + Team Linux

If it'll make you feel any better, I've learned that life is one crushing
defeat after another until you just wish Flanders was dead.

                -- Homer Simpson
                   Homer and Apu


RE: [is it time for something other than html?] RE: Templating s

Posted by jb...@team-linux.com.
On 27-Jul-2000 Jauder Ho wrote:
> 
> No. The problem is that you cannot cache the subsequent page that is
> generated because of the dynamic component. The template is always going
> to remain the same (interface changes should be rare for a stable web
> site), but the content (say news headlines or personalized component) is
> going to be dynamic. It is not reasonable to expect to cache that entire
> page. So what I am saying is that using HTML for such purposes is
> fundamentally broken unless we can figure out to tag a region of an html
> file as non-cachable i.e. dynamic. 

All the HTML is chached. Are you saying you want to cache everything including
the output of dynamic components? If so, then just stick squid in front of your
server.
 
> And as I replied to another reply about this, embedding code in a HTML
> file strikes me as an inelegant solution plus it leads to all sorts of
> problems such as html "designers" that delete tags for whatever reason. I
> know that the correct solution is to lart them but we can't always do that
> no matter how much we would like to :).

If you've got designers deleting tags then you need to educate them or fire
them. You cannot be flexible on that issue. Also, embedding code in HTML is no
different then putting arbitrary tags that some of the "templating" solutions
use. 

My last job was with Tivoli Systems and I used HTML::Embperl with great success
in several applications including ones that involved "designers" going in and
modifying pages with embedded perl code.

> On Thu, 27 Jul 2000 jbodnar@team-linux.com wrote:
> 
>> > I could go off about why HTML sucks for dynamic page caching. If there was
>> > somehow a way to cache say the template, leaving only the same dynamic
>> > portion uncached, it would certainly help things along quite a bit. If
>> > anyone knows of a good way of doing this I would certainly be interested
>> > in hearing it. 
>> 
>> There is. Use HTML::Embperl.
>> 
>> I've been using it for several years now. I build objects for accessing any
>> data I need and then do simple things in my templates like:
>> 
>> <H2>[+ $forum->title +]</H2>
>> 
>> -- 
>> Jason Bodnar + jbodnar@team-linux.com + Team Linux
>> 
>> If it'll make you feel any better, I've learned that life is one crushing
>> defeat after another until you just wish Flanders was dead.
>> 
>>                 -- Homer Simpson
>>                    Homer and Apu
>> 
>> 

-- 
Jason Bodnar + jbodnar@team-linux.com + Team Linux

Yeah, Moe, that team sure did suck last night!  They just plain
sucked!  I've seen teams suck before, but they were the suckiest bunch 
of sucks that ever sucked!

                -- Homer Simpson
                   Team Homer


RE: [is it time for something other than html?] RE: Templating s

Posted by Jauder Ho <ja...@carumba.com>.
No. The problem is that you cannot cache the subsequent page that is
generated because of the dynamic component. The template is always going
to remain the same (interface changes should be rare for a stable web
site), but the content (say news headlines or personalized component) is
going to be dynamic. It is not reasonable to expect to cache that entire
page. So what I am saying is that using HTML for such purposes is
fundamentally broken unless we can figure out to tag a region of an html
file as non-cachable i.e. dynamic. 

And as I replied to another reply about this, embedding code in a HTML
file strikes me as an inelegant solution plus it leads to all sorts of
problems such as html "designers" that delete tags for whatever reason. I
know that the correct solution is to lart them but we can't always do that
no matter how much we would like to :).

--Jauder

On Thu, 27 Jul 2000 jbodnar@team-linux.com wrote:

> > I could go off about why HTML sucks for dynamic page caching. If there was
> > somehow a way to cache say the template, leaving only the same dynamic
> > portion uncached, it would certainly help things along quite a bit. If
> > anyone knows of a good way of doing this I would certainly be interested
> > in hearing it. 
> 
> There is. Use HTML::Embperl.
> 
> I've been using it for several years now. I build objects for accessing any
> data I need and then do simple things in my templates like:
> 
> <H2>[+ $forum->title +]</H2>
> 
> -- 
> Jason Bodnar + jbodnar@team-linux.com + Team Linux
> 
> If it'll make you feel any better, I've learned that life is one crushing
> defeat after another until you just wish Flanders was dead.
> 
>                 -- Homer Simpson
>                    Homer and Apu
> 
> 


RE: [is it time for something other than html?] RE: Templating s

Posted by Kee Hinckley <na...@somewhere.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>  >
>>  > <H2>[+ $forum->title +]</H2>
>>
>>	The problem with this is that it looks really ugly in
>  >	Dreamweaver (for example).

http://www.somewhere.com/software/ has the DreamWeaver extensions 
that will make EmbPerl tags look just like ASP or CFM tags, 
completely with the cute little graphics.
- -- 

Kee Hinckley - Somewhere.Com, LLC - Cyberspace Architects

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOYGtiCZsPfdw+r2CEQKrXQCgiqHKAZv3NS2ZnsbilzwveQkRM5gAn0cH
dk8vp51MiPfmllRvgYEWtUsf
=dJHn
-----END PGP SIGNATURE-----

RE: [is it time for something other than html?] RE: Templating s

Posted by Gerald Richter <ri...@ecos.de>.
>
> > <H2>[+ $forum->title +]</H2>
>
> 	The problem with this is that it looks really ugly in
> 	Dreamweaver (for example).

That's a matter of taste...

And because it's a matter of taste (what is one of the results for me of
this discussion, everybody likes his aproach most :-), I have designed
Embperl 2 so, that you can define your own syntax, while don't have to
reinvent the rest.

Gerald


RE: [is it time for something other than html?] RE: Templating s

Posted by "Paul J. Lucas" <pj...@barefooters.org>.
On Thu, 27 Jul 2000 jbodnar@team-linux.com wrote:

> <H2>[+ $forum->title +]</H2>

	The problem with this is that it looks really ugly in
	Dreamweaver (for example).  The HTML designer can't design a
	mock-up page with dummy content using that technique that can
	then be passed off to the coder.

	With HTML Tree you can say:

	<H2 CLASS="text::forum_title">Recreational basketweaving</H2>

	i.e., put dummy content so the web page designer can see what a
	real page will look like and tweak things like spacing, etc.

	That HTML then can be used *as-is*, dummy content and all, with
	HTML Tree since the dummy content is replaced dynamically.

	- Paul