TQ
dev.com

Blog about software development

Subscribe

Automatic REST API for SlimPHP 4

16 Aug 2019 - by 'Maurits van der Schee'

Today, about 4 years after the initial commit, the promise of "upload a single PHP file to add a REST API to your database" is still very much alive. It is now possible to use PHP-CRUD-API (2k stars) as a library executed on an endpoint in the SlimPHP 4 framework...

Continue reading...

Script to undelete all files in Git

13 Aug 2019 - by 'Maurits van der Schee'

I have written a Bash script to quickly undelete all files that are deleted in a Git repository (on any previous commit). The script only recovers the last known state of files of which the filename is not currently in use. It is optimized so that it executes quickly...

Continue reading...

API authorization strategy: use the DB

29 Jul 2019 - by 'Maurits van der Schee'

When building an API you may find the need to implement authorization in a generic way. Using the authorization implementation of your (relational) database is a well-documented, simple and proven strategy. The user that is used for the database connection...

Continue reading...

Database multi-tenancy strategies

28 Jul 2019 - by 'Maurits van der Schee'

When you are building a SaaS software product you need to chose a way to store the data of your customers. You can store everything in one database or you can create multiple databases. There are roughly four main approaches...

Continue reading...

Handling GeoJSON tiles in Leaflet

20 Jul 2019 - by 'Maurits van der Schee'

Leaflet is world's most popular open-source JavaScript "Tiled web map" library offering Google maps like functionality on your own (or public) data. In the past weeks I have implemented a GeoJSON vector tile plugin for Leaflet...

Continue reading...

Lossless compression of PHP files

19 Jul 2019 - by 'Maurits van der Schee'

How small can a PHP file get? I was wondering this, while building PHP-CRUD-API, a full-featured API in a single PHP file. PHP has a really nice feature called 'halt_compiler', which allows you to have gzip contents in your PHP file. In the code below...

Continue reading...

Open source software pyramid

11 Jun 2019 - by 'Maurits van der Schee'

For us (professional software developers) there are open source libraries and tools that cover most of what we are doing. Even in commercial projects we can often leverage these as their licenses are often permissive towards commercial use...

Continue reading...

PHP-CRUD-API gets GeoJSON support

04 Jun 2019 - by 'Maurits van der Schee'

PHP-CRUD-API is an automatic API script: Upload a single PHP file and get an instant REST API to your PostgreSQL, MySQL/MariaDB or SQL Server database. Currently support for GeoJSON FeatureCollection views on tables has been added...

Continue reading...

Celebrating 3 years TQdev

09 May 2019 - by 'Maurits van der Schee'

Today I am celebrating the 3 years that the TQdev.com blog exists. In this period I have written 125 blog posts on various software development related topics. Best visited post was the "The "Boring Software" manifesto" with more than 33 thousand visitors...

Continue reading...

PHP templating engine from scratch

01 May 2019 - by 'Maurits van der Schee'

In a previous post I have introduced PHP templating in 165 lines of code with no dependencies. I have added several features since it's initial release and the line count has roughly doubled. This post gives you an overview of the added functionality...

Continue reading...