I use something similar to this with mod_perl to flash using xml.
Flash then uses xml in a template fashion.  Our templates are
highly configurable this way.

In the near future we will be doing it as mod_perl to ajax.

Unfortunately we haven't decided on how we want to make
our code public yet.  Maybe in the near future...

When we have it doing ajax output, the template mechanisms
will become a lot more visible via javascript.

The nice thing about doing this way is off loading some of the
processing onto the client.

Boysenberry

boysenberrys.com | habitatlife.com | selfgnosis.com

On Dec 26, 2005, at 10:26 AM, Frank Wiles wrote:

On Mon, 26 Dec 2005 14:17:00 +0100
Joachim Zobel <[EMAIL PROTECTED]> wrote:

I think it makes sense to use Apache filtering to seperate the
presentation layer. The idea is to have an application layer that
outputs xml and a template engine attached by filtering that merges
the xml into html pages.

What is already there? Are there any template engines that can be
attached through filtering? Is there any spec. for an interface xml?
What are the cons of this approach?

  Separating your application like that is a great idea, most large
  applications do this type of separation inside of the app itself.
  While I haven't heard of anyone doing this in practice, I have at
  times thought about it.

  It would be fairly trivial to write a filter that takes XML input
  and rework it so that it can be passed into a templating engine like
  Template Toolkit.

  The only real drawback is that you've got the extra encode/decode
  cycle going on.  Assuming you gather your data into some complex
  data structure, convert it to XML and then output it.  You then
  have to convert the XML back into a perl data structure and then
  pass it to the template engine. This could cause significant
  performance problems depending on your hardware/traffic.

  If your app interfaces with a lot of various applications, uses
  REST/SOAP/XML-RPC, etc. extensively then it might be more worthwhile
  to do this, allowing you to completely separate your "internal"
  logic/data from the outside world.

  Another option entirely is using XSLT to do your transformation
  between XML and HTML.  There is a plugin for Template Toolkit for
  this even.

 ---------------------------------
   Frank Wiles <[EMAIL PROTECTED]>
   http://www.wiles.org
 ---------------------------------




Reply via email to