On 11/18/10 7:34 AM, guilhermebla...@gmail.com wrote:
Hi Larry,
For existent project examples and usage, here are 2 links of the
upcoming versions of Doctrine 2 and Symfony 2:
http://www.doctrine-project.org/projects/orm/2.0/docs/reference/basic-mapping/en#introduction-to-docblock-annotations
http://docs.symfony-reloaded.org/guides/validator.html
Please understand that Roman, Benjamin, Jonathan and I wrote this
Annotation parser for Doctrine, which was reused by Bernhard on
Symfony.
So I have clean understanding of the issue we have on hands and every
single point that it is required to address. That's why I wrote the
RFC.
Yesterday night a couple of people joined on #php.pecl and discussed a
possible new implementation.
I'll write what was discussed and probably some sample code.
No offense, but as I've noted before Symfony and Doctrine are very very
different types of frameworks/libraries than a lot of the code out
there. Much of what may make sense in a component framework doesn't
make sense in a full stack framework (e.g., Drupal, which I work on) and
vice versa. So while I respect that you put a lot of work into the
Doctrine and Symfony implementations that does not mean you will
understand "every single point that it is required to address".
That said, from looking at the Symfony page above it looks like it's an
integrated system for providing variable-level validation. True?
If that's the case, what would a before/after look like for code using
annotations vs. not?
As far as implementation goes, for something like this to be useful for
a highly-dynamic system like Drupal we'd need to be able to add
annotations/validation rules out-of-band, that is, from somewhere other
than syntactically right on the variable/function/method being
validated. We frequently have highly-generic objects that get used in a
multitude of different ways, so we would need to be able to associate
validation rules at runtime for them to work.
Naturally the error messages from them would also need to be
returned/thrown, not printed, so an application can take proper steps
with them in its own error handling routines.
--Larry Garfield
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php