Re: [Fwd: PHPTAL - PHP Template Attribute Language]

From: Date: Tue, 18 Mar 2003 17:18:17 +0000
Subject: Re: [Fwd: PHPTAL - PHP Template Attribute Language]
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14408@lists.php.net to get a copy of this message
> > Another feature to consider would be to allow for objects at the end of > a tal path. If the object had a eg toString() method, this would get > called. (As in Python __repr__() method) > Already done unless bug :) output calls the toString() method if given parameter is an object. >> Thousands thanks for your proposition, i surely need help (mainly tests >> at this time but may be development in a near future). >> There's also an huge work for documentation, i tryied to explain most of >> PHPTAL in the Documentation.txt file but there's more and more to say :) > > I'll try and do some more documentation and examples then, following the > format described at... > http://pear.php.net/manual/en/packages.skeleton.php > Thanks again, i can't maintain a docbook documentation, the only format i can write/read/think on is plain text. I've done yesterday a dirty text=>docbook converter based on an uggly text=>html library i wrote a long time ago to identify titles, paragraph, examples, etc... but it will never be as clean as a manually written docbook :) I don't know how we will distribute PHPTAL on pear.php.net, there will be some problems do discuss concerning : - Types package (i use a custom exception system prepared for try/catch transition) and 'Types' name is a little 'generic' but that is its role. - GetText location (I18N seems to be a package so GetText can't go here, can it ?). - PHPTAL base directory, as PHPTAL can output XML or XHTML (different behavious due to some XHTML tags like <img/> <br/> <input/> <link/> ... HTML_Template_PHPTAL is wrong XHTML_Template_PHPTAL is not entirely right XML_Template_PHPTAL is not entirely right but my prefered I don't know which one to choose and i don't have other ideas right now :) - concerning class naming convention, as there shouldn't be any conflict with the PHPTAL name, i'd like to keep PHPTAL class name shortcut instead of XXX_Template_PHPTAL class. Same for interfaces : PHPTAL_Cache, PHPTAL_SourceResolver and PHPTAL_SourceLocator. That is for users, they don't like to type 128 characters class names (neither do i). - And for non pear users, i'd like to keep a simple to install independant package as i had some requests for that. A lot of things to discuss in fact :) But i'm sure we'll find good solutions for all these points. > Out of interest, how long have you spent on phptal sofar. It's a bit of > a cheek, but I only ask because I want to try and gauge whether I'm a > slow programmer:) Inspired by www.phppatterns.com etc, I've been trying > to design my projects using patterns etc, but find that I get bogged > down planning (and replanning) the design while not actually getting > down to programming. It's hard to say exactly, PHPTAL is my 3rd php template system over 4 years, so i inherit from previous experiences. I've done a labo version (means 'dirty just to test if this could work') in about 3 days using code i wrote here and there. Then i've started the real version, starting as ever from the user point of view (how will they use the system). From this point, PHPTAL is almost 3 weeks old (not 8h/8h because i have other stuff to do, let's say about 2 weeks of think/code/doc). What took me the most time is PHPTALES (expression parser) and i'm not entirely satisfied of the result (planed some refactoring for version 2). These 3 weeks also include the adaptation of Types package for PEAR and the creation of GetText package. I also code in java/c++/python, this background helps a lot when designing my PHP projects. Of course it's hard to find a good balance between designing and programming, i'm used to put dead lines on projects and sometimes you just end with a design you're not fond of. But aware of that, you can make some good API that 'hide' your implementation and create a better implementation later without recoding your entire library/application. PHPTAL isn't perfect, but that give me things to do for v2 :) laurent -- Laurent Bedubourg laurent.bedubourg@free.fr PHPTAL :: version 0.4.1 -- testers wanted PHPTAL home : http://laurent.bedubourg.free.fr

« previous php.pear.dev (#14408) next »