You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Glen Ezkovich <gl...@hard-bop.com> on 2004/12/04 20:17:04 UTC

Re: [RT] do me a favor, don't call them taglibs

On Dec 3, 2004, at 3:33 PM, Ralph Goers wrote:

> Glen Ezkovich said:
>>
>> On Dec 3, 2004, at 2:50 PM, Stefano Mazzocchi wrote:
>>
>>> All I ask from a template language:
>>>
>>>  1) something that HTML designers can edit with Dreamweaver
>>
>> Why? I really don't want HTML designers touching my templates. I want
>> them to work withe the data received from my generator and transform
>> that into something renderable by a browser.
>
> Wow. I guess we really have a different point of view.  I see 
> templates as
> an alternative to XSLT to generate the HTML.  Of course I would want an
> HTML designer to be able to do that.

I did too. Just wound up with the same old problem, mixed concerns. 
Each template had to be maintained as the site's visual style evolved. 
As much as we tried to use CSS, we still had to modify the HTML. Divs 
here, tables there, the ice was all around.  :-)

While I can see using a template to directly generate the HTML it makes 
each page layout a separate maintenance issue. That is, some changes to 
a sites design might require each template to be modified. Using XSLT, 
it might be possible to change just a single XSL  template. Think of 
something as simple as changing the image used as a bullet in a bullet 
list, or placing adds between paragraphs instead of all in the left 
column.

As usual, what you choose to do depends on what you anticipate the 
needs of your site to be. If I needed to nothing more then take a 
result set and display it in a table, I probably would just generate 
the table in the template. The more complex the page becomes the less 
likely I am to use HTML in the template.

What I've tried to do is define common entities that are rendered the 
same across various layouts and to define general page layout 
components that can be reused. By entities I  mean things like 
products, product lines, features, feature, article, paragraph, etc.. 
These are generally given an XML representation using JXTG and are in 
turn rendered by XSLT. By general page layout components I mean rows, 
columns, grids, bullet lists, images, etc.. These are defined in a 
style sheet.  A product can be laid out the same wether it is on a page 
by it's self or part of a catalog page. The difference might only be in 
the styles applied and/or the layout component that contains it. HTML 
element wise, the two renderings are identical, but visually maybe very 
different. Sometimes we do have to have use modes to render entities 
differently, but I generally consider these cases a failure of 
imagination. What is nice about this, is that the same template that 
generates XML data for a product on one site can be used with no or 
slight modification on another. The XSL defined layout components can 
be reused as well. The only things that need changing are the CSSs and 
some of the XSL templates for the entities.

The aim is to be able to have a data/content driven model of a website 
as well as a page driven model.  I'm not quite where I want to be yet. 
But I'm working on it. I still need to flesh out the concept a bit more 
and I need more sites to experiment on. Shhhhhh... Don't tell my 
clients. ;-) (this a private secure list... right?)

Glen Ezkovich
HardBop Consulting
glen at hard-bop.com
http://www.hard-bop.com



A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to 
worry about answers."
- Thomas Pynchon Gravity's Rainbow


Re: [RT] do me a favor, don't call them taglibs

Posted by Stefano Mazzocchi <st...@apache.org>.
Daniel Fagerstrom wrote:
> Stefano Mazzocchi wrote:
> <snip/>
> 
>> Still, CSS is not enough because is not able to change the layout of 
>> things and, even worse, sometimes the style dictates the markup 
>> (example: if you want to use stuff like rounded boxes).
> 
> 
> <OT>
> For rounded corners at tabs you can use :before and :after pseudo 
> selectors http://www.w3.org/TR/REC-CSS2/selector.html#before-and-after, 
> unfortionally it only works in modern browsers and not in the popular 
> broken one that our custommers tend to have :/
> 
> Then if you feel that your CSS style sheets are by far to easy to 
> understand, there are a couple of interesting CSS tricks for getting 
> rounded corners even in IE:
> 
> http://www.alistapart.com/articles/slidingdoors/, 
> http://www.alistapart.com/articles/slidingdoors2/, 
> http://www.alistapart.com/articles/customcorners/
> 
> They are so subtle that the XSLT solution probably is better idea.
> </OT>

I do that. The problem is that you have *4* corners, not 2 ;-) that's 
why it forces you to use two elements, so that you can have the top 
corner be the :before of the first and the bottom corner to be the 
:before of the second.

That's my favorite example of why CSS is not powerful enough for what 
people need.

-- 
Stefano.


Re: [RT] do me a favor, don't call them taglibs

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Roy G. Biv wrote:
> Daniel Fagerstrom wrote:
> 
>> Stefano Mazzocchi wrote:
>> <snip/>
>>
>>> Still, CSS is not enough because is not able to change the layout of 
>>> things and, even worse, sometimes the style dictates the markup 
>>> (example: if you want to use stuff like rounded boxes).
>>
>>
>> <OT>
>> For rounded corners at tabs you can use :before and :after pseudo 
>> selectors 
>> http://www.w3.org/TR/REC-CSS2/selector.html#before-and-after, 
>> unfortionally it only works in modern browsers and not in the popular 
>> broken one that our custommers tend to have :/
> 
> 
> http://dean.edwards.name/IE7/

Nice, I have to test that. Might be able to remove some of my uglier CSS 
hacks for showing thing in IE :)

/Daniel


Re: [RT] do me a favor, don't call them taglibs

Posted by "Roy G. Biv" <mi...@pcextremist.com>.
Daniel Fagerstrom wrote:

> Stefano Mazzocchi wrote:
> <snip/>
>
>> Still, CSS is not enough because is not able to change the layout of 
>> things and, even worse, sometimes the style dictates the markup 
>> (example: if you want to use stuff like rounded boxes).
>
> <OT>
> For rounded corners at tabs you can use :before and :after pseudo 
> selectors 
> http://www.w3.org/TR/REC-CSS2/selector.html#before-and-after, 
> unfortionally it only works in modern browsers and not in the popular 
> broken one that our custommers tend to have :/

http://dean.edwards.name/IE7/

- Miles Elam

Re: [RT] do me a favor, don't call them taglibs

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Stefano Mazzocchi wrote:
<snip/>
> Still, CSS is not enough because is not able to change the layout of 
> things and, even worse, sometimes the style dictates the markup 
> (example: if you want to use stuff like rounded boxes).

<OT>
For rounded corners at tabs you can use :before and :after pseudo 
selectors http://www.w3.org/TR/REC-CSS2/selector.html#before-and-after, 
unfortionally it only works in modern browsers and not in the popular 
broken one that our custommers tend to have :/

Then if you feel that your CSS style sheets are by far to easy to 
understand, there are a couple of interesting CSS tricks for getting 
rounded corners even in IE:

http://www.alistapart.com/articles/slidingdoors/, 
http://www.alistapart.com/articles/slidingdoors2/, 
http://www.alistapart.com/articles/customcorners/

They are so subtle that the XSLT solution probably is better idea.
</OT>

/Daniel

Re: [RT] do me a favor, don't call them taglibs

Posted by Glen Ezkovich <gl...@hard-bop.com>.
On Dec 4, 2004, at 10:52 PM, Stefano Mazzocchi wrote:

>
> Glen,
>
> I don't think we are talking about very different things.

I know.

>
> I *completely* agree with you that the power of pipelines and SoC is 
> exactly that: change one file and make all the others adjust. Damn, 
> there wouldn't be a cocoon if that wasn't the case ;-)
>
> What I want is to create a 'bridge' for those who don't get it.

To some extent. I want something simpler then XSLT and is more markup 
oriented (an XHTML template). I'd also like to not ask my designers to 
invoke java methods.

>
> CSS is already a tremendous bridge that allows people to cleanup their 
> pages and they understand the power of SoC, since changing a 
> stylesheet allows them to change all the pages.
>
> Still, CSS is not enough because is not able to change the layout of 
> things

It can change the layout of things with absolute positioning. Its just 
very difficult to get things right. and it becomes a night mare to make 
changes to.

> and, even worse, sometimes the style dictates the markup (example: if 
> you want to use stuff like rounded boxes).

Need to talk to your designers then ;-)

>
> *but* what is possible is to have something like
>
> <div class="header">Header</div>
>
> be transformed into a massive, highly graphical, header.
>
> In short, it is possible to give *some* visual but style free 
> placeholding material for the layout designers to work with, then 
> transform these with some XSLT.

What we have is something slightly different, we have <header> tags. 
These get transformed differently depending on context. Possibly with 
different classes.

>
> What you need is not WYSIWYG,

I wish there was such a tool. :-)

> web designers care about that, but usability managers really don't. 
> They care about colors and fonts and spaces and positioning and error 
> messages and visibility of things (all things that CSS can do for 
> them), so it's entirely possible to have placeholders for things they 
> don't care about, they just want to care about the content, but also 
> about  the layout of the page.

Agreed. However, our place holders represent entities, not page 
elements. Things such as products, images or headings. We use XSLT to 
transform them into html. Right now I go so far as to insist that we do 
not use html tag names for our entity names. i.e. you can't use <img> 
you need to use <image> . I know its anal, but I really want to 
emphasize the difference between content and layout. We are not always 
successful but we are working on it.


Glen Ezkovich
HardBop Consulting
glen at hard-bop.com
http://www.hard-bop.com



A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to 
worry about answers."
- Thomas Pynchon Gravity's Rainbow


Re: [RT] do me a favor, don't call them taglibs

Posted by Stefano Mazzocchi <st...@apache.org>.
Glen Ezkovich wrote:
> 
> On Dec 3, 2004, at 3:33 PM, Ralph Goers wrote:
> 
>> Glen Ezkovich said:
>>
>>>
>>> On Dec 3, 2004, at 2:50 PM, Stefano Mazzocchi wrote:
>>>
>>>> All I ask from a template language:
>>>>
>>>>  1) something that HTML designers can edit with Dreamweaver
>>>
>>>
>>> Why? I really don't want HTML designers touching my templates. I want
>>> them to work withe the data received from my generator and transform
>>> that into something renderable by a browser.
>>
>>
>> Wow. I guess we really have a different point of view.  I see 
>> templates as
>> an alternative to XSLT to generate the HTML.  Of course I would want an
>> HTML designer to be able to do that.
> 
> 
> I did too. Just wound up with the same old problem, mixed concerns. Each 
> template had to be maintained as the site's visual style evolved. As 
> much as we tried to use CSS, we still had to modify the HTML. Divs here, 
> tables there, the ice was all around.  :-)

> While I can see using a template to directly generate the HTML it makes 
> each page layout a separate maintenance issue. That is, some changes to 
> a sites design might require each template to be modified. Using XSLT, 
> it might be possible to change just a single XSL  template. Think of 
> something as simple as changing the image used as a bullet in a bullet 
> list, or placing adds between paragraphs instead of all in the left column.
> 
> As usual, what you choose to do depends on what you anticipate the needs 
> of your site to be. If I needed to nothing more then take a result set 
> and display it in a table, I probably would just generate the table in 
> the template. The more complex the page becomes the less likely I am to 
> use HTML in the template.
> 
> What I've tried to do is define common entities that are rendered the 
> same across various layouts and to define general page layout components 
> that can be reused. By entities I  mean things like products, product 
> lines, features, feature, article, paragraph, etc.. These are generally 
> given an XML representation using JXTG and are in turn rendered by XSLT. 
> By general page layout components I mean rows, columns, grids, bullet 
> lists, images, etc.. These are defined in a style sheet.  A product can 
> be laid out the same wether it is on a page by it's self or part of a 
> catalog page. The difference might only be in the styles applied and/or 
> the layout component that contains it. HTML element wise, the two 
> renderings are identical, but visually maybe very different. Sometimes 
> we do have to have use modes to render entities differently, but I 
> generally consider these cases a failure of imagination. What is nice 
> about this, is that the same template that generates XML data for a 
> product on one site can be used with no or slight modification on 
> another. The XSL defined layout components can be reused as well. The 
> only things that need changing are the CSSs and some of the XSL 
> templates for the entities.
> 
> The aim is to be able to have a data/content driven model of a website 
> as well as a page driven model.  I'm not quite where I want to be yet. 
> But I'm working on it. I still need to flesh out the concept a bit more 
> and I need more sites to experiment on. Shhhhhh... Don't tell my 
> clients. ;-) (this a private secure list... right?)

Glen,

I don't think we are talking about very different things.

I *completely* agree with you that the power of pipelines and SoC is 
exactly that: change one file and make all the others adjust. Damn, 
there wouldn't be a cocoon if that wasn't the case ;-)

What I want is to create a 'bridge' for those who don't get it.

CSS is already a tremendous bridge that allows people to cleanup their 
pages and they understand the power of SoC, since changing a stylesheet 
allows them to change all the pages.

Still, CSS is not enough because is not able to change the layout of 
things and, even worse, sometimes the style dictates the markup 
(example: if you want to use stuff like rounded boxes).

*but* what is possible is to have something like

<div class="header">Header</div>

be transformed into a massive, highly graphical, header.

In short, it is possible to give *some* visual but style free 
placeholding material for the layout designers to work with, then 
transform these with some XSLT.

What you need is not WYSIWYG, web designers care about that, but 
usability managers really don't. They care about colors and fonts and 
spaces and positioning and error messages and visibility of things (all 
things that CSS can do for them), so it's entirely possible to have 
placeholders for things they don't care about, they just want to care 
about the content, but also about the layout of the page.

-- 
Stefano.