tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <jeromy.ev...@blueskyminds.com.au>
Subject Re: [Tiles 2] Standard practice for customising/rebranding websites through tiles
Date Sun, 02 Sep 2007 23:53:48 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Antonio, we looked at Dimisions but found the simple
implementation below would suffice.<br>
<br>
I'll share the details and welcome any comments or criticisms.
<br>
<br>
1. The session includes a unique key that identifies the current theme.
<br>
2. We implement our own DefinitionsFactory that decorates the default
DefinitionsFactory impl (UrlDefinitionsFactory).
<br>
3. We adopt a naming convention for tiles that incorporates the theme
name.
<br>
eg. the default tile is "account.home".&nbsp; The themed tile is
"companyA.account.home"
<br>
<br>
4. Within the new definitions factory, the getDefinition method checks
if there's a theme defined in the session.&nbsp; If a theme exists, it check
to see if there is a theme-specific tile defined for the requested name
and returns that if it does, otherwise the default implemntation is
called.
<br>
<br>
eg. a call to getDefinition("account.home", tilesContext) within the
customerA theme returns the "customerA.account.home" tile.
<br>
<br>
Requests for theme specific tiles are passed straight through to the
default impl.&nbsp; eg. getDefinition("customerA.account.home.intro",
tilesContext)
<br>
<br>
Works a treat.&nbsp; Using this approach we can add new theme tiles without
affecting existing tiles, or with refactoring isolated only to the
affected tiles. Also in order to add avoid a monolithic definitions
file we add any tiles-&lt;theme&gt;.xml files as definition sources.
<br>
<br>
regards,
<br>
Jeromy Evans
<br>
<br>
Antonio Petrelli wrote:
<blockquote
 cite="mid:aae96ca0708270116y5b3a684fo2aae9b0e183e534a@mail.gmail.com"
 type="cite">
  <pre wrap="">2007/8/24, Jeromy Evans <a class="moz-txt-link-rfc2396E" href="mailto:jeromy.evans@blueskyminds.com.au">&lt;jeromy.evans@blueskyminds.com.au&gt;</a>:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi guys,

I was just wondering if there's any standard practice or suggestions for
how Tiles 2 can be used for rebranding/customizing a website.

One of my clients has a single website with many large customers that
require subtle (and sometimes significant) changes to certain pages in
order to win the contract with them (not my decision).  The site already
incorporates themes through templates and css based on a session
attribute, but this problem is more oriented towards once-off functional
changes specific for each customer.

Example:
After their user logs in, the home page includes a form that integrates
to their external site, specialised text and links to some new pages
that include their exclusive functionality. Some irrelevant tiles are
replaced or removed.

It comes up quite frequently and the existing conditional logic is
getting a little out of hand.

I was toying with a few approaches, but thought I should put the
question out there to see what the community has already come up with
within the Tiles context.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You could take a look to Dimensions: the port to Tiles 2 is in the SVN
trunk, but it should work.
<a class="moz-txt-link-freetext" href="http://mutidimensions.sourceforge.net/">http://mutidimensions.sourceforge.net/</a>

Antonio



  </pre>
</blockquote>
<br>
</body>
</html>

Mime
View raw message