Hi Larry, Of course I know how it can benefit a full stack framework. For example Zend Framework can benefit of it by auto-generating WSDL files in Zend_Soap.
You're right about Symfony integrated system of property validation of Domain Objects. If you would like to see how it would be implemented in Doctrine/Symfony without Annotations, here are the links of them: Doctrine sample user class: https://github.com/doctrine/doctrine2/blob/master/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php Symfony injection of property validation: http://docs.symfony-reloaded.org/guides/validator.html (at the end of HTML file) Cheers, On Thu, Nov 18, 2010 at 3:00 PM, la...@garfieldtech.com <la...@garfieldtech.com> wrote: > 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 > > -- Guilherme Blanco Mobile: +55 (16) 9215-8480 MSN: guilhermebla...@hotmail.com São Paulo - SP/Brazil -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php