On May 6, 2011, at 3:47 PM, Christophe COEVOET wrote:

> 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 ?

I think the Doctrine doc does an okay job of explaining this as well...  maybe 
not quite as clear as it *could* be but that is likely an issue in their 
documentation.

>> 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 think this is somewhat true, however there may be some best practices for 
writing tests in Symfony.  Ultimately I know my test writing is weak at best, 
and seeing examples of well written tests would likely be my best example, I 
can see where others would struggle to try and learn this way.    Perhaps some 
examples of best practices in testing sessions, forms, etc?  Nothing too 
complex if the framework changes and doc needs to be updated.  

Honestly the PHPUnit doc is not very verbose, nor does it even attempt to help 
developers figure out how to use it effectively (which is also likely an 
oversight in the PHPUnit 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

-- 
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

Reply via email to