1
I have a question regarding the folder structure of the application.
Next, doubt arises when there is a need to write a class that integrates with a API Which part would this class be allocated to? Because I believe that this class would not have behavior of a component (it does not have any kind of business logic) but maybe of a lib (Library) which would be an interface to consume API resources.
Imagine the following structure:
/app/
- controllers/
- components/
- models/
- vendors/
But the question is, if API is a package written by me, she shouldn’t go to vendors (since vendors are only for third-party packages), am I right? Or maybe it would be ideal to have a new directory librarys/ for internal application packages?
Thank you for answering @Hamboldt, I understand, so I can package all classes that do not have logic with the application but are used by the same, in a package of its own within
vendors
?– Caio Guedes
Exactly. When we are going to make a software we have to think about how we are going to make it so that it has the greatest possibility of having reusable parts. So if we can separate reusable things from specific business rule codes it means that we’re going to have less and less work in the future, being able to reuse our past codes without much effort. It is important to keep in mind also that we should organize so that we can assume where each thing is for example: * /library/Outlook/Email/Author.php * /library/Outlook/SMTP/Request.php * /library/Outlook/SMTP/Response...
– hamboldt