modular php microservices with Slim framework
customized backend solutions with a small footprint
For building REST-based microservice backends I use Slim Framework.
Slim is a PHP micro framework which basically takes a HTTP request, calls a routine based on it and returns a response.
It relies on the same composer based environment like its bigger brothers laravel and symfony but is – how the name implies – reduced to the max.
This reduction comes with a little extra bootstrapping work. When bootstrapping is done you have a beautiful, flexible and powerful piece of software, which can provide backend-services for any modern app and also runs on almost every webhost.
The modular pattern, allows to integrate only the packages you need for your project.
I used Slim for a couple of projects and do not want to miss it anymore in my toolbox.
I used this setup to develop transver-database.
This server software is repeatedly querying SurveyMonkey for new or edited surveys. This is done with guzzle http. It inserts this survey data into its own database and taking care of updating procedures. Also it provides some REST-routes which are then used by a react app. See it in action here.
Handling database while development with migrations gives us a kind of revision management for databases and allows to intergrate database operations into develop- and build-pipelines.