Re: [PECL-DEV] extension: phpdoc support and extensions - Feedback requested

[email protected] (Alexey Zakhlestin)
Newsgroups php.pecl.dev
Message-ID <[email protected]>
Hi.

Theoretically it sounds fine, but I don't like the naming.
As far as I understood, extension will focus on extended reflection docblock functionality. It is required for your AOP-task but does not provide AOP on it's own.
Wouldn't "docblock parser" name be better?

If you plan to add actuall AOP implementation later, then, wouldn't it be better to implement it as the second extension, which depends on this first one?

I believe, that generalised docblock-parser would be useful for many other projects, which do not need actual AOP-functionality.


On 05.02.2010, at 11:12, BGHosting.de - power for games wrote:

> Hi.
> 
> 
> I am Martin Eisengardt, and I would like to share an extension. It will be simply called "aop" in future. Currently it has another name because the code was originally planned as part of our private commercial extension.
> 
> The extension "aop" will provide two features. First of all there will be support to read and parse the phpdoc from classes/functions and allow php extensions to register those with additional phpdoc. However the php builtin reflection already allows us to get the phpdoc for several entities. But the phpdoc will only be returned as a string. The extension "aop" will parse the phpdoc on demand and provide additional methods: hasTag/ getTag/ getRegularDoc.
> 
> Why do we need this? The main feature of the extension is native support for aspect oriented programming. For details on aspect orientied programming see the description of the flow3 developer group: http://flow3.typo3.org/documentation/manuals/flow3/flow3.aopframework/
> Flow3 introduces aspect oriented programming at php level withou any need of additional extensions. But there are some limitations on the flow3 solution:
> * During development time it is very slow (mainly because of deactivated caching)
> * You are not able to create aspects for preloaded/builtin classes.
> * You are not able to create aspects for functions.
> The reason why reflection extensions are needed is the way flow3 provides aop. Flow3 uses special phpdoc tags like "@aspect". In order to enable aop on extension level we need the reflection feature.
> However that is different from the java solution (AspectJ) which makes extensions to the java language itself.
> 
> The current task is to do some refactoring on the reflection feature. And it still needs to be renamed to the new name "aop". Target versions will be >=5.3. The used namespaces will be "\aop" and "\aop\reflection"
> The aop feature currently causes some seg faults so I did not add it to the svn yet.
> And yes, it will need many testcases :-)
> 
> svn access:
> http://srv.bghosting.de/svn/bgh/branches/bgh-typo3/extensions/src/
> Username: pecl
> password: anonymous
> 
> 
> For now I would like to get your feedback. Should this extension become part of pecl once it reaches beta?
> 
> 
> Ciao
> Martin 
> 
> -- 
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.