On 26.11.2010, at 14:22, Lukas Kahwe Smith wrote: > Aloha, > > So Jordi and I spend the morning implementing a view layer for Symfony2: > https://github.com/fabpot/symfony/pull/200 > > Again the idea with this solution is that more or less nothing is harder for > beginners at all. However even for beginners it will not be much easier to > support different formats. We decided to give special attention to HTML, JSON > and XML, but custom handlers for other formats can easily be added. > > A few highlights: > - ability to write controllers without any format specific code (especially > redirect() is handled automatically for non HTML) > - Non HTML formats do not have to go through the twig layer (but can > optionally do of course) > - ability to extend or hook into the default view to selectively customize > the logic and/or add new supported formats (for example you can simply > overwrite the default transformer for JSON to be able to combine twig > generated HTML into a JSON structure) > > Feedback appreciated :)
I guess one thing that is open for discussion and where we struggled a bit was with the parametersTo*() methods, especially the requirement for objects to implement a toArray() method to be handled generically in the JSON and XML cases. regards, Lukas Kahwe Smith [email protected] -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
