PHP-CRUD-API gets GeoJSON support

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. The REST API already supported GIS (Geographic Information System) functionality through WKT (Well Known Text) formatted output for geometry columns in the database. The GeoJSON support allows to quickly add a table as a map layer to for instance QGIS. ...

June 4, 2019 · Maurits van der Schee

Celebrating 3 years TQdev

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. Below you find the visitors of the blog per month. Visitors graph The graph below is a (copy of) a server side generated SVG document from the backend of this blog. ...

May 9, 2019 · Maurits van der Schee

PHP templating engine from scratch

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 and explains how to use it. An ‘if’ now supports ’else’ and ’elseif’ Conditionals are an essential construct in a template. When you implement them without ’else’ or ’elseif’ you get either a lot of repeated conditions and unnecessary nesting. ...

May 1, 2019 · Maurits van der Schee

Split while respecting quotes in PHP

The PHP ’explode’ function splits a string into an array based on a separator character (or separator string). This is not enough to build a parser for a template language on as most languages allow strings to contain any character. In this post we will show a function that will split while respecting quotes and one to remove the quotes while allowing for escaped quotes as part of the string. ...

April 27, 2019 · Maurits van der Schee

Automatic REST API for Laravel

This is the third post in a blog series on how to integrate PHP-CRUD-API (a single PHP file that adds a REST API to your database) into popular PHP web frameworks. In this post we integrate PHP-CRUD-API with Laravel, a PHP web framework. With 50k Github stars Laravel seems to be more popular than Symfony (20k stars) and SlimPHP (10k stars), the frameworks we have integrated with in earlier posts. Integration with these frameworks is possible as they all adhere to the PHP-FIG’s (PHP Framework Interop Group) HTTP standard PSR-7. ...

April 22, 2019 · Maurits van der Schee

Automatic REST API for Symfony 4

I’m writing a series of blog posts on how to integrate PHP-CRUD-API (a single PHP file that adds a REST API to your database) into popular PHP web frameworks. In this post we integrate the PHP-CRUD-API (2k stars) with the Symfony framework (20k stars). This is possible as they both adhere to the PHP-FIG’s (PHP Framework Interop Group) HTTP standard PSR-7. Install Symfony You need to run the following commands on your Linux system: ...

April 21, 2019 · Maurits van der Schee

Automatic REST API for SlimPHP 3

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 3 framework (10k stars). This is possible as they both adhere to the PHP-FIG’s (PHP Framework Interop Group) HTTP standard PSR-7. Updated! SlimPHP 4 has been released! This tutorial is for SlimPHP 3, while SlimPHP 4 has been released. It is recommended that you follow the updated tutorial here: ...

April 20, 2019 · Maurits van der Schee

Small form factor mechanical keyboards

Small form factor mechanical keyboards are popular as they are durable, portable, comfortable and exclusive. The 4 small layouts: 80% (TKL), 75%, 65% and 60% have pros and cons that I will discuss. I will also recommend affordable models, one for every layout, so you can try them out without spending a fortune. NB: This article is based on my own experience and not sponsored in any way. Keyboard size matters The common keyboard sizes are: 100%, 80%, 75%, 65% and 60%. The percentage is not related to the sizes of the key: the actual (letter) keys on these keyboards all have the same size. The percentage relates to the number of keys and their different layouts that take up less space. Below you see these different layouts (as geeky ASCII arts): ...

April 12, 2019 · Maurits van der Schee

7 web development practices challenged

There are many myths in the software business that have led to wrong best practices. In this post I will address 7 of these best practices and explain on which wrong assumptions they are based. I’m worried about the state of the industry, because I feel these are serious engineering mistakes and nobody is speaking up about them. Here we go: 1. Client side rendering Based on the wrong assumption that client side rendering is faster than server side rendering we frivolous apply React and Vue. Not even the load on the servers is diminishing as escaping data for HTML or JSON is equally expensive. Rendering HTML is faster than executing JavaScript to draw the DOM. But don’t you need to send much more data when you are sending HTML? Well not really, because you can send all dependencies in separate files. It was for HTTP 1.0 that web pages were in-lining CSS and script to avoid TCP connections. In HTTP 2.0 all requested files are multiplexed over the same connection. Today we can have multiple separate files, which increases the ability to cache these files. More cached files reduces the data transfer which makes your site faster. This is also why resource bundles should be avoided. ...

April 6, 2019 · Maurits van der Schee

Linux dream machine under 900 euro (v2)

My previous post of a Linux dream machine under 900 euro received quite some attention. Yesterday I have built an even more powerful machine and again under 900 euro. This built hits a sweet-spot between price and performance and that’s why I’ve dubbed it “v2”. NB: This article is based on my own experience and not sponsored in any way. Note: I’m a programmer, not a gamer. Read the original Linux dream machine under 900 euro for a little more background information on my use case. ...

March 29, 2019 · Maurits van der Schee