Home – New Forums Tech talk Shopping Cart “Holy Grail” Reply To: Shopping Cart “Holy Grail”

#1021108
bradzo
Member
  • Total posts: 335
Up
0
::
Chris Bates, post: 24854 wrote:
Then you get the joys of trying to template it too =)

Speaking of templates, what about this for an idea?

The entire product data for that “webpage” is in an XML format.

Then you write an XSLT that generates the web page using that XML data. Different XSLT’s can be written for different devices – so an iPhone would get completely different look than say a standard resolution monitor.

The data always stays the same – its the XSLT that changes the look and feel of the display. And the two – data and presentation, are separated.

I’ve tried this and it works like a charm. Its server side, but I’ve no doubt it could work client-side too to take the load off the webserver.

I think its just that html templates are easier to code, but as Julie has probably found out, not the best way to go IMHO, given that tags in the template are replaced with the actual content, possibly giving weird display results (unless your CSS is perfect of course!)

More thoughts – I should really stop – but the server can always get the browser capabilities (800×600, 32bpp or whatever) and choose the appropriate XSLT to render into HTML for that display resolution.

Nicer for the end user.

Ok – too much geek.

We return you to your scheduled entertainment.

:)