Le 06/05/2011 21:11, ridcully a écrit :
Hi,
i've read today the Symfony 2 documentation called Book on the Symfony
2 website.
For me their are missing two things:
1. An example documentation for an custom EntityRepository for using
as DAO. The way in the documentaion to use the enity manager in a
normal controller is easy to be miss understood. The main problem is
that people who're coming from Symfony 1 may think this is the
replacement for the old doctrine_table. And beginners doesn't know the
concept of Data Access Object and are thinking this is "best practice"
to do this in a controller. This produce lines of code with will work
but is not in a good style and hard to refactor and I think it's the
responsibility of the documentation to give a good example of good
clean code.
To find a good example to do this i've searched some minutes :
http://mackstar.com/blog/2010/10/04/using-repositories-doctrine-2 but
it was not easy to find.
The Doctrine doc explains how repositories work. there is nothing
special about them in the Symfony integration so why would you paste the
entire Doctrine doc in the Symfony one ?
2. A good example for a unit test ! Why are their so many place for
Functional Tests and only a "not saying anything" example for a unit
test ?
There is nothing related to Symfony about writing unit tests as this
only uses the tested class. the Symfony doc is not about documenting
PHPUnit. they have their own doc.
I know these things are missing in the Symfony 1 Book too, but I think
the documentation fro Symfony2 should be on a higher level than the
old was.
The most People who're reading the Book are mostly people who're
coming from symfony1 and even beginners would have some benefits.
--
Christophe | Stof
--
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