Re: [PROPOSAL] PHP Component Model
| From: | Sebastian Bergmann | Date: | Tue, 16 Sep 2003 06:06:03 +0000 |
| Subject: | Re: [PROPOSAL] PHP Component Model | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21532@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
> Still not conviced on the need for the actual classes.
The classes contain the functionality needed for
PHP_ComponentModel_Component instances to be run in
PHP_ComponentModel_Container implementations. The latter is an
interface because I want to have a degree of freedom regarding
component container implementations (eg. SRM, no-SRM).
> class templates
Classes that are to be used as PHP Components inherit from the
PHP_ComponentModel_Component class. PHP_ComponentModel_Component is
not an interface.
I agree that an IDE could have a template for such a class.
>> * Generate an XML representation of a PHP Component.
Maybe I should have explained a bit more what I mean by this. Also,
"representation" might not be the best choice of words.
What I meant by this is an XML-based description of the component,
like a package.xml file that describes a PEAR package.
This description should contain the following:
- Name of the component
- Synopsis, Copyright Information, ...
- A list of needed and provided services
- A list of handled and fired events
- A list of customizable properties
> dont try and write a parser/writer for xml - it will be increadibly
> slow loading up.
That why PHP is generated from the XML for the deployment.
>> * Generate a PHP source skeleton from an XML representation of a
>> PHP Component.
>>
> Thats templates :)...
Indirectly, yes.
--
Sebastian Bergmann
http://sebastian-bergmann.de/ http://phpOpenTracker.de/
Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/