incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Skins / css in Trinidad (and Tomahawk)
Date Thu, 17 Aug 2006 04:54:10 GMT
On 8/16/06, Martin Dickson <martin.dickson@peace.com> wrote:
> Hi Folks,
>
> I'm trying to get an idea of the planned way forward with css support in
> Trinidad, particularly around ADF's original/current skinning method vs.
> more more normal/standard css use.
>
> We have been using Tomahawk components, and recently added some ADF
> components, to get access to partial page reloads.  These two component
> sets manage css in very different ways: Tomahawk following what seems to
> be the norm of allowing the application of Classes and using linked
> stylesheets, while ADF performs the (to me) unusual action of parsing
> the css and then injecting it into the html that is sent to the client.

One way to think about it is in terms of how you skin
a real HTML app in the classic CSS sense.  You'd take something
like:

  <DL>
    <DT>..</DT>
    <DD>..</DD>
  </DL>

... and then apply selectors to those semantic elements:

  DL { border: red }

Trinidad skinning is like this; it lets you provide styling
information to a semantic type of component - like tr|table,
or tr|panelList, just like you would apply styling information
to a specific HTML element.

And It's way more flexible than that - styling icons,
specific sub-parts of a component, specific instances
of a component, various states of a component (selected,
disabled, etc.).

The injected CSS classes - which, of course, can be
supplemented by per-instance CSS classes - serve
as the glue to hook this altogether, and should be
considered an implementation detail.

> We have the ADF skinning working now, but the two systems are somewhat
> at odds. In addition, the ADF system appears less scalable to us; rather
> than allowing the users' browsers to cache the css and do the styling
> (something that scales based on the number of users) the css parsing and
> injection increases server load per user.

No, not true.  Browsers most definitely cache the CSS;  and it
is not parsed once per user, but once.  It does have support
for generating different CSS for different agents, languages,
reading directions, and browsers, all off of a single stylesheet -
but those are still generated once and cached.

> What I'm hoping for is some information, or a pointer to some
> information, on whether it is planned that this skinning system is
> retained in the fully integrated Trinidad, or whether it is being
> retired (or some other solution is being pursued). I'm afraid I haven't
> found any documentation on this but if it has been discussed perhaps
> someone could just point me in the right direction.

The skinning system is very much being pursued, enhanced,
and maintained for Trinidad;  it's one of the stronger features
of the library, and some committers are looking at the idea
of bringing it to Tomahawk.

-- Adam Winer

Mime
View raw message