Much of what I read about this talks about, e.g., building a REST API then using that in your application rather than direct database access.
Isn't this largely "Program to an interface, not an implementation" wrapped up in webspeak?
Whenever we start a new web project, we organize our code into groups of services, and use interfaces to represent those groups rather than concrete classes. Where possible, the implementation of the interfaces are direct database calls. When we need to use it externally, we have an implementation that uses remote calls.
So ultimately we program to interfaces which are designed to be automatically exposed as an API call. In some ways the recommendation to rely on your own REST API to build out your application feels like a way to make up for the lack of structure interfaces can enforce. Maybe I'm wrong though.
Isn't this largely "Program to an interface, not an implementation" wrapped up in webspeak?
Whenever we start a new web project, we organize our code into groups of services, and use interfaces to represent those groups rather than concrete classes. Where possible, the implementation of the interfaces are direct database calls. When we need to use it externally, we have an implementation that uses remote calls.
So ultimately we program to interfaces which are designed to be automatically exposed as an API call. In some ways the recommendation to rely on your own REST API to build out your application feels like a way to make up for the lack of structure interfaces can enforce. Maybe I'm wrong though.