I'm developing a system, and I've had a question that might help other people.

The system would be written in PHP, with a lot of chance of turning a mobile app later, too. Normally, I would create it with a controller that would make the connection to the database, and others responsible for inserts, updates, etc.

Considering the application, you would then do an API with endpoints for the same functions.

Thinking about it, I imagined then that the system itself could also work with the API. In this way, it would be the same as the mobile application: It would not connect directly to the database, but would connect to the API and it would take care of operations.

I see that, this way, the system would be slower than connecting directly to the database, but, perhaps, it would be more useful in maintenance, because it would be just a place to change, the API.

  • Could you clarify your question? I don't see a question mark in your post. – Shelby115 Jan 9 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.