Categories
Architecture Software

Using the POST method for HTTP search queries

When designing RESTful services where data is queried, we tend to map this querying functionality to an endpoint that uses a HTTP GET method. This is good because GET is specifically designed for data retrieval. However, there are scenarios where this isn’t a sufficient solution. For example, if the search query becomes too complex — […]

Categories
Architecture Software

The Value of “Value Objects”

Herberto Gra├ža recently wrote a great summary on Value Objects, and I commented on it on Reddit, saying: …something that could flesh out the case for value objects [is] the fact that it allows you to model complex rule interactions by representing the concepts of the core domain and letting them interact as they would […]

Categories
Architecture Software

HATEOAS in the context of microservices

In the rise of RESTful, microservice-based architectures in our web applications, HATEOAS seems to have fallen out of favour. This is curious, given that the creator of REST specifically advocates for HATEOAS, going so far to say that REST isn’t truly REST without it. There have also been articles disparaching it as a practice, claiming […]

Categories
Architecture

Don’t call your interfaces interfaces

An old, prolific convention of software development has been to prefix or suffix interfaces with something that specifically designates them as such. So if I have an interface for a clock, rather than calling it Clock, many would call it IClock or ClockInterface. In PHP, the convention is so ingrained that our core inter-framework operable […]