Re:Show HN: SQLPage – Build Dynamic Websites with Just SQL Q...
by lovasoa on Tuesday June 06, 2023 @04:32PM
(#36218723)
This feedback is gold to me. Is there any way I can get in touch with you when I've made changes to see how whether that would work for you ?
Can you list the step you took, starting from opening the website, and where the first pain points were ? Did you go sql.ophir.dev -> Get started -> technical, then downloaded the binary, wrote the first select, and hit a wall ? What did you do then ? What is the app you were trying to build ?
Re:Show HN: SQLPage – Build Dynamic Websites with Just SQL Q...
by lovasoa on Tuesday June 06, 2023 @09:12PM
(#36221472)
Re-reading your comment, I realized what you seem to have hit was a bug in SQLPage !
Simple pages without an explicit 'shell' component were always supposed to work, but they were not tested ! I fixed that in v0.6.8
https://github.com/lovasoa/SQLpage/commit/f91f0d57c39360e560...
Thank you !
I really love the idea of having "virgin" SQL statements to get and set the data - doing all the JOINs etc in SQL so I can pull together the view I want from a few interlinked tables. The low effort declarative GUI which interacts with that is nice. It's super-powerful to be able to describe a CRUD app as a set of relational tables, and a set of SQL insert/select statements, and then a very lightweight declarative GUI to start modifying and reading data from it. Then if the app becomes important you can take the same underlying data structure and wrap it in a more established framework with a "real" front end. And if it doesn't, you only spent a few hours on it!
A few thoughts:
1. It took me a while to work out how to render anything. Maybe make the first example you hit in the "Your website's first SQL file" section actually have everything needed to render a page (including "select 'shell' as component")
2. More examples! Maybe a straightforward CRUD type example would be good - it took me a while to work out how to create a row.
3. I want a searchable table of database items with a way to edit each one - maybe an extension to the table view? Either a way to add a custom link to each row in the table, or an extension to it that allows editing of data. That's where a CRUD example would be good.
4. The form should have an input type "multi" which is constrained to the options I've queried from the database. That way I can use the form to insert relational data, or limit users to a set of selections.
5. The "checkbox" type is either whatever it's value is, or NULL. If I've got an integer not null type in the database, I have to coalesce($myCheckbox, 0) when saving it - can you make it have a default unchecked value?
6. The examples are all hard coded data - can you have more examples that use the result of database queries to get the data that's rendered?
It's a fun project though! I like how lightweight it is as well.