[nycphp-talk] Parsing <php: possible?

Daniel Krook krook at
Mon Jul 19 12:26:40 EDT 2004

> These example are a bite off ATG Dynamo JHTML/droplet stuff but what
> Im really after is the including files w/ params stuff from a tag
> based structure.  Im sure this either a) exists in some form somewhere
> b) can be done or c) no worth it.  Any thoughts?


I see where you're going with this, you basically want to emulate a 
templating system which uses a system like Java's taglibs or, prior to 
that, ATG Dynamo's JHTML, so as to shield your presentation layer 
developers from business logic.  In particular you want to be able to 
create a bean (or the result of an included function) for use on the page. 
 For example, getting a user bean from the following type of tag:

<php:importbean type="user" src="inc/classes/User.php"
<php:bean name="currUser" type="user">
        <php:param name="id" value="34"/>


<php:valueof param="currUser.firstname"/> 

This type of approach is interesting, and I've never seen anyone try it 
[answer "a"], but there are other ways (like you mentioned, Smarty) to 
accomplish a similar goal [answer "b"]:

"A Tale of Three [Four] Templates"

But I tend to argue against it for several reasons... [answer "c"]

"Tag-based server-side code is for goobers."

Daniel Krook, Application Developer
WW Web Production Services North 2,
1133 Westchester Avenue, White Plains, NY 10604


More information about the talk mailing list