Automatic REST-API from Doctrine-Entities – Module evaluation

The times in web-development are over, that the backend side was allmighty and the frontend part was “pixel pushing” and fixing cross-browser issues. Today, modern applications are build in the client and the backend is just providing the data through an API. (And the backend still does the automatic background processes)

Given that I was looking for an existing module, which could create automatically the REST-endpoints for an existing databases, which was connected through Doctrine.

I had a rough look on three modules: stanlemon/rest-bundleR3VoLuT1OneR/doctrine-rest and oligus/jad.

Stanlemon/RestBundle

Latest commit March 2017, Stars 127, Forks 21, thus a little bit outdated. But build on known libraries like  JMS Serializer, Will Durands Content Negotiation library and Doctrine Object Relation Mapper library. Documentation seems quite good. But it requires Symfony. On the other hand validation and events are already given.

R3VoLuT1OneR/doctrine-rest

Latest commit 16 days, Star 7, Forks 1. At least active development! And 99% code coverage! Uses symfony/http-foundation for requests/responses and league/fractal for response building. Framework agnostic, but does solely provide basic tools, so that you have to glue everything up on your own.

oligus/jad

Latest commit 12 days, Stars 14, Fork 6. Also active development. Works with annotations (validation, visibility, etc).  A lot of features like built-in filtering, sorting, relationship-handlingFramework agnostic and good documentation.

Recommendation

It seems worth to look deeper into oligus/jad! There will be either an article about the setup or an update of this article 😉