Note to self: Need an ‘add a page’ option

It’s a good job I know how to hack my own database

Friday evening and the end of a long week. Last week was all about reviewing new stuff, and this week I’ve been back in my own old code ‘eco-system’. It’s not expressive or the other thing, but I know every line of it and and can work with it quickly without having to guess where things are or refer to a manual.

I need to add an options menu to add headings rather than just text.

Meanwhile, auto-views. That’s something I like about my code. I comes from always letting the data structure lead the way. You start with a data table, say recipes, and then add code to deal with the CRUD. The code for each table plugs into a core system for handling repetitive or obscure functions - sanitizing posted data, preparing queries, erc, but handles its own routing and logic.

Until recently, part of this method involved creating a set of views each time a record was requested, and for different users: public, registered user, super admin. Now though more information is sent with each request so that only minimum amount processing is needed, and unnecessary related database queries are avoided. The result is faster all round. Faster IO and faster coding. Whoop whoop. well it is Friday.

heading: Update - Sat Sep 10 [must add headings]

'Create a new page' option has been added. As before, it involves throwing a form into a modal, launching it, then submitting the content using JS fetch API. The default form action is suppressed so that the submission can be processed server side and a response sent back as JSON. If the submitted data is rejected, an err message is included in the returned JSON which displays in