[PHP] Re: Aspect Oriented Programming PHP

2004-05-28 Thread Bert Slagter
Michael Lauzon wrote:
Since PHP5 is going to feature OOP (Object Oriented Programming), will that mean PHP6 
will feature AOP (Aspect Oriented Programming)...so far it seems AOP is only being 
used for Java at the moment; but hopefully general programming and scripting languages 
will start using them as well?!

Michael Lauzon, Founder
The Quill Society
http://www.quillsociety.org/
[EMAIL PROTECTED]
The __get, __set and __call functions are distand cousins of AOP: they 
offer the possibility to react on the fact that some method is called, 
regardless which one. It models the aspect 'any method called, what to do?'.

But note that there are no 'native AOP' languages right now, Java only 
has some obscure extensions/mutations that partly implement the AOP 
paradigm (like AspectJ, JBoss and Hyper/J).

But it would be nice though if optional AOP support would find its way 
into PHP one day :).

Bert
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Aspect Oriented Programming PHP

2004-05-27 Thread Manuel Lemos
Hello,
On 12/31/1969 09:00 PM, Michael Lauzon wrote:
Since PHP5 is going to feature OOP (Object Oriented Programming),
will that mean PHP6 will feature AOP (Aspect Oriented
Programming)...so far it seems AOP is only being used for Java at the
moment; but hopefully general programming and scripting languages
will start using them as well?!
I don't know what do you think OOP is but PHP supports it since PHP 3.
AOP is not a feature of any language but rather an artifact to add or
remove code that implements certain aspects. This usually requires a
compiler or a code processing tool to enable the aspects you are
interested. There is nothing in Java that makes this possible that would
not be possible in PHP.
As a matter of fact there is an Aspect Oriented Programming tool named
Metastorage that generates DAO (Data Access Object) classes that lets
you control which aspects you want to build into your DAO classes. For
instance, if you do want a function in the generated classes to delete
objects, you have to explicitly request it. Otherwise the class will not
feature that aspect. This leads to much more optimized code that does
not feature aspects that are not needed.
This tool generates code that runs on PHP 4 or better. You may find more
about it here:
http://www.meta-language.net/metastorage.html
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php