Hi Daniel,

I'm not sure it is the same concept, but what you describe sounds very
similar to some work i did on the templating engine for the photon
framework (one of my open source projects). It was inspired by prado,
mxml, and jstl. Here is an example:

site/tags/Site.phtml:
<html>
  <head>
    <title><?=$title?></title>
  </head>
  <body>
    <?=$content?>
  </body>
</html>

site/tags/Page.phtml: (I suppose you could say that this tag 'extends'
from Site)
<p:Site title='{$title}'>
  <div id='page'>
    <div id='header'>
      Some header stuff
    </div>
    <div id='page-body'>
      <?=$content?>
    </div>
    <div id='footer'>
      Some footer stuff
    </div>
  </div>
</p:Site>

site/tags/ProjectPage.phtml:
<p:Page title='{$project->Name}'>
  <div>Project Logo</div>
  <?=$content?>
</p:Page>

site/pages/project.phtml:
<p:ProjectPage project='{$this->project}'>
  Project Description: <?=$this->project->Description?>
  (All this gets put on the content variable of the ProjectPage tag)
</p:ProjectPage>

I hope that's enough to convey the way it works.

Is close to what you're describing?

Alvaro

On Sat, Sep 19, 2009 at 6:19 PM, Daniel C. <[email protected]> wrote:
> I've been thinking about this for a while and I'd like to hear what
> you folks think.
>
> Most web pages can be classified or organized into broad categories,
> according to the kind of things on the page.  For example, most bio
> pages have a picture of the individual and a lot of text, but not much
> else.  Most product pages in a shopping cart have one or more pictures
> of the product, a short and a long description of the product, and
> (depending on the structure of the site) a link to add it to your
> cart.
>
> It seems like there would be an advantage to codifying these patterns
> somehow, possibly into a class-like structure, where each document
> class inherits features from a superclass (the most generic of which
> is simply a blank HTML document).
>
> No information about layout, HTML, etc. would be present in the class
> structure - all you'd have is the class name and a list of "slots"
> that control what kind of information can go into them.  To turn this
> into an actual web page, you would need some kind of translator or
> compiler that would accept as input the document class (with data to
> fill each of the slots) and an HTML + CSS template.  Combine the two
> and you've got your web page.
>
> What are your thoughts about this?  If you think it's a good idea, how
> would you implement it?
>
> -Dan
>
> _______________________________________________
>
> UPHPU mailing list
> [email protected]
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to