You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @slashfan 👋, I really appreciate your work, it's very qualitative, it allowed me to deepen my knowledge with Symfony and especially learn how to build a solid API.
I noted some questions about the good practices you used during the development of this project. I would be really grateful if you can enlighten me on some points, it will certainly be very useful for the followers of this project even for those how wanna contribute.
Why you prefer not to using the AbstractController proposed by the framework, instead of injecting all the services one by one under your controller consutruct. I feel that the answer is related to a good practice but I do not really see why!
What's the point of adding the final key, on services, controllers, subscribers ?
Does there is a convention used for renaming your controllers, for example often you use this format <Get|Create|Delete..><Entity>Controller.php like GetArticleController.php and sometimes you just use<some string>Controller.php like SecurityController.php
I wonder why you prefer having only one function per controller and not more. Is there a use behind this design !
Is there a rule or an RFC for renaming paths when defining routes. For example if you have a route responsible for exporting any article, do I should call it /api/article/1.pdf or /api/article/export.pdf ?
Is there a rule for renaming services, it is better to suffix them by Service or Handler or nothing. What about having one function per a service like you did inside the controllers ?
Instead of using the form component via $form->submit() + form types , why you didn't use the Denormelizers to retrieve your data and populate it in your entity for POST, PUT and PATCH methods and then you collect validations errors like it's mentioned here ?
What is the difference between EventListener and EventSubscriber, what is the most recommended for use and why you did put JWTAuthenticationSubscriber.php in EventSubscriber instead of putting it in EventLisetner ?
I see Rector, PHPstan or PHPslam, or PHPmd ? what is the difference are they all a statics analyzers tools !
I look forward to your response. Thank you so mush 🙏. Cheers!
The text was updated successfully, but these errors were encountered:
Hello @slashfan 👋, I really appreciate your work, it's very qualitative, it allowed me to deepen my knowledge with Symfony and especially learn how to build a solid API.
I noted some questions about the good practices you used during the development of this project. I would be really grateful if you can enlighten me on some points, it will certainly be very useful for the followers of this project even for those how wanna contribute.
Why you prefer not to using the AbstractController proposed by the framework, instead of injecting all the services one by one under your controller consutruct. I feel that the answer is related to a good practice but I do not really see why!
What's the point of adding the final key, on services, controllers, subscribers ?
Does there is a convention used for renaming your controllers, for example often you use this format
<Get|Create|Delete..><Entity>Controller.php
likeGetArticleController.php
and sometimes you just use<some string>Controller.php
likeSecurityController.php
I wonder why you prefer having only one function per controller and not more. Is there a use behind this design !
Is there a rule or an RFC for renaming paths when defining routes. For example if you have a route responsible for exporting any article, do I should call it
/api/article/1.pdf
or/api/article/export.pdf
?Is there a rule for renaming services, it is better to suffix them by
Service
orHandler
or nothing. What about having one function per a service like you did inside the controllers ?Instead of using the form component via
$form->submit() + form types
, why you didn't use the Denormelizers to retrieve your data and populate it in your entity for POST, PUT and PATCH methods and then you collect validations errors like it's mentioned here ?What is the difference between
EventListener
andEventSubscriber
, what is the most recommended for use and why you did putJWTAuthenticationSubscriber.php
inEventSubscriber
instead of putting it inEventLisetner
?I see Rector, PHPstan or PHPslam, or PHPmd ? what is the difference are they all a statics analyzers tools !
I look forward to your response. Thank you so mush 🙏. Cheers!
The text was updated successfully, but these errors were encountered: