atom feed193 messages in net.php.lists.internalsRe: [PHP-DEV] annotations again
FromSent OnAttachments
129 earlier messages
Lars SchultzMay 11, 2011 12:59 am 
Lester CaineMay 11, 2011 1:04 am 
dukeofgamingMay 11, 2011 1:11 am 
Lars SchultzMay 11, 2011 1:25 am 
dukeofgamingMay 11, 2011 1:39 am 
Johannes SchlüterMay 11, 2011 1:54 am 
dukeofgamingMay 11, 2011 2:04 am 
Lester CaineMay 11, 2011 2:21 am 
Rasmus LerdorfMay 11, 2011 2:30 am 
Johannes SchlüterMay 11, 2011 2:44 am 
dukeofgamingMay 11, 2011 2:59 am 
Lester CaineMay 11, 2011 3:43 am 
Richard QuadlingMay 11, 2011 4:31 am 
Christian KapsMay 11, 2011 5:21 am 
DrakMay 11, 2011 5:29 am 
Mike van RielMay 11, 2011 5:35 am 
Ferenc KovacsMay 11, 2011 5:52 am 
Lester CaineMay 11, 2011 6:18 am 
Mike van RielMay 11, 2011 6:27 am 
Ferenc KovacsMay 11, 2011 6:31 am 
Lester CaineMay 11, 2011 6:59 am 
Matthew Weier O'PhinneyMay 11, 2011 8:30 am 
Matthew Weier O'PhinneyMay 11, 2011 8:32 am 
Philip OlsonMay 11, 2011 8:42 am 
guil...@gmail.comMay 11, 2011 8:58 am 
guil...@gmail.comMay 11, 2011 9:06 am 
guil...@gmail.comMay 11, 2011 9:21 am 
Christopher JonesMay 11, 2011 9:54 am 
Rasmus LerdorfMay 11, 2011 9:58 am 
Lester CaineMay 11, 2011 10:11 am 
Arvids GodjuksMay 11, 2011 10:18 am 
guil...@gmail.comMay 11, 2011 10:28 am 
Andi GutmansMay 11, 2011 11:03 am 
Ilia AlshanetskyMay 11, 2011 11:14 am 
Johannes SchlüterMay 11, 2011 11:20 am 
Philip OlsonMay 11, 2011 11:33 am 
Martin ScottaMay 11, 2011 11:34 am 
Stas MalyshevMay 11, 2011 11:43 am 
Stas MalyshevMay 11, 2011 11:50 am 
Johannes SchlüterMay 11, 2011 11:54 am 
dukeofgamingMay 11, 2011 12:17 pm 
Stas MalyshevMay 11, 2011 12:30 pm 
Stas MalyshevMay 11, 2011 12:32 pm 
Sebastian BergmannMay 11, 2011 1:55 pm 
Sebastian BergmannMay 11, 2011 1:59 pm 
Sebastian BergmannMay 11, 2011 2:01 pm 
Sebastian BergmannMay 11, 2011 2:05 pm 
Philip OlsonMay 11, 2011 2:10 pm 
Mike van RielMay 11, 2011 2:53 pm 
dukeofgamingMay 11, 2011 2:53 pm 
Rasmus LerdorfMay 11, 2011 2:55 pm 
guil...@gmail.comMay 11, 2011 2:57 pm 
Marcelo GornsteinMay 11, 2011 3:05 pm 
dukeofgamingMay 11, 2011 3:06 pm 
guil...@gmail.comMay 11, 2011 3:14 pm 
Stefan MarrMay 11, 2011 3:20 pm 
Philip OlsonMay 11, 2011 4:28 pm 
Stas MalyshevMay 11, 2011 5:02 pm 
Jordi BoggianoMay 11, 2011 5:55 pm 
Philip OlsonMay 12, 2011 10:29 am 
Alexey SheinMay 13, 2011 7:13 am.txt, .txt
Alexey SheinMay 16, 2011 6:51 am.txt, .txt
Michael MorrisMay 16, 2011 2:16 pm 
Kalle Sommer NielsenMay 16, 2011 2:29 pm 
Subject:Re: [PHP-DEV] annotations again
From:dukeofgaming (duke@gmail.com)
Date:May 11, 2011 2:53:43 pm
List:net.php.lists.internals

On Wed, May 11, 2011 at 12:29 PM, guil@gmail.com < guil@gmail.com> wrote:

Hi Larz,

On Wed, May 11, 2011 at 3:35 AM, Lars Schultz <lars@toolpark.com> wrote:

Am 11.05.2011 00:28, schrieb guil@gmail.com:

- Entities with knowledge about its persistence information

That must be something I simply have no knowledge about. But isn't it just a theoretical difference, because in practice, the "code" being annotations or PHP-Code is kept within the class, therefore the entity is not separated from its persistence information...but then I don't really understand the problem in the first place;)

I hope you have OO architecture knowledge. By having entity implementing an interface/abstract class, you make your domain classes depending on persistence package. This dependency breaks OO encapsulation of packages.

By having the code (annotations) within the class you just meta classify each property/method of your class. You probably don't know, but annotations that you use in Doctrine follows a standard document usually referred as JPA (or JSR-317), second version. So, you may be surprised, but any persistence tool that follows this document would be able to support this Entity. One good example is how ORM package of Doctrine works and you're able to have your Entity "schemaless" with almost 0 changes in ODM package (read as CouchDB and MongoDB).

I think part of the problem on the discussion —regarding the acceptance of the feature— is that annotations are being seen just as a "cute feature", instead of an architectural advantage to all good PHP code (i.e. OO taking advantage of design patterns) and its implications. In summary: they are huge. If simple reflection can tell the developers what the code is, annotations let them know what it can be in depending on their context (i.e. behavior is decoupled).

- Resources being wasted

Now you sound like Rasmus when he talks about his assembly-history. Do you really expect Annotations to perform better than hard-wired php-code?

Yes, and built-in support is WAY faster.

If I'm not mistaken, the current comment-parsing solutions are so slow that the annotated classes and methods and attributes *NEED* the metadata to be cached in separate PHP code in order to function, otherwise it would be practically impossible to use them in production sites; conversely, if they were supported natively caching would not be absolutely necessary. Is this the case?, if so, I think it is a strong use case to be considered for the RFC.

BTW, why is it rejected in the wiki now?. Is it completely completely rejected?, or just postponed?... if it is just cataloged as declined for now, perhaps it will be harder to retake for discussion later if it appears as declined?.