slashfan / symfony-realworld-example-app Goto Github PK
View Code? Open in Web Editor NEWSymfony 5 codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
License: MIT License
Symfony 5 codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
License: MIT License
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!
https://github.com/gothinkster/realworld/tree/master/api#errors-and-status-codes
be able to manage the project entirely from the makefile like in the https://github.com/mykiwi/symfony-bootstrapped repository
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.