I read this and it made me sad. Exposing CRUD API makes me sad. CRUD is for databases, within transactions, not services. Services should have query (GET) and submit (POST) only. Oh, and calling a service an API makes me sad. Calling a URL or its path an “endpoint” makes me sad. An endpoint is a computer which processes a message, it’s not a URL path. The idea of “routing” makes me sad. Using plurals in URLs makes me sad. Exposing hierarchies unnecessarily in URLs makes me sad. Business process which doesn’t cater for optimistic concurrency controls makes me sad.
Category Archives: Programming
Computer Science courses with video lectures
This is pretty awesome: Computer Science courses with video lectures.
RisingLight
RisingLight is an OLAP database system for educational purposes: RisingLight. If I had more time I would check this out.
Arrays in PHP
Some notes about arrays in PHP over here: PHP: Frankenstein arrays. I was already aware of most of that but I thought the notes at the bottom about supporting JSON were handy:
If you want to enforce an array to encode to a JSON list (all array keys will be discarded), use:
json_encode(array_values($array));
And if you want to enforce an array to encode to a JSON object, use:
json_encode((object)$array);
Also array_is_list is available as of PHP 8.1.
A REXX XML PARSER
This is fun: A REXX XML PARSER.
A Whole Website in a Single HTML File
Via Hacker News today: A Whole Website in a Single HTML File. As can be seen over here.
PDOStatement::fetchAll()
I’m reading the source code for PDOStatement::fetchAll().
Minimal CSS Framework for semantic HTML
This via Hacker News today: Minimal CSS Framework for semantic HTML.
Principles & Best practices of REST API Design
Some thinking points for service design: Principles & Best practices of REST API Design.
Bread factory
Talking to @enterprisey on #lobsters and these “bread factory” articles from Spolsky came up: