News for hackers. Stuff that matters.
Re:SQLPage – Building a full web application with nothing bu... by archiewood on Monday March 11, 2024 @10:00AM (#39668342)
It’s interesting to me how far you have pushed the SQL language in this framework, such that it truly is “SQL only”.

The challenge as I see it with enabling analysts to build websites is that you need to build abstractions to get from familiar (SQL, yaml) - the language of analytics, to new (HTML, CSS, JS) - the language of the web browser

As one of the maintainers of Evidence (https://evidence.dev), one of the things I’ve often considered is how accessible our syntax is to analysts. Our syntax combines SQL and Markdown, with MDX style components e.g. <Component/>

The </> are inherently webdev-ey, and I do think they put off potential users.

On the flip-side, by adhering to web standards, you get extensibility out of the box, and working out what to do is just a Google search away.

Anyway, thanks for the thought provoking piece.

Re:SQLPage – Building a full web application with nothing bu... by lovasoa on Monday March 11, 2024 @10:55AM (#39669000)
Hey! It's me on the video.

Indeed, making this really 100% SQL-only had very interesting and unexpected consequences. I see people who were initially far away from programming circles creating GitHub accounts just to post on the discussion page.

I'm currently working on some new exciting features. I hope we can push the frontier of what can be done in SQL even further...

Re:SQLPage – Building a full web application with nothing bu... by tomhallett on Monday March 11, 2024 @12:02PM (#39669833)
When I look at the Tiny Twitter example and see the code below, I'm curious if there is a more "SQL" way to implement it.

``` select 'checkbox' as component, 'Terms and conditions' as label, true as required; ```

I'm thinking "What would the workflow of a sql-enthusiast be, to build that page".

I think they'd want todo this first:

``` select * from sqlpage.components; ```

which would list the `name` of each component. Which then takes me to:

``` INSERT INTO sqlpage.dom SET name = 'checkbox', label = 'Terms and conditions ', required = TRUE FROM sqlpage.components ```

(or VALUES syntax for INSERT)

This would allow you to re-order your dom, update dom entries, etc. Very similar to jsx, but instead of jsx creating in-memory javascript objects, it's sqlpage's sql creating rows in a postgres table. Then the SQLPage virtualdom gets transformed into actual html.

Just a thought, :)

Re:SQLPage – Building a full web application with nothing bu... by lovasoa on Monday March 11, 2024 @03:14PM (#39672190)
I'm not sure what you mean here?

The "select 'checkbox' as component" is just an example, but nothing prevents you from creating a my_form table and writing it as "select * from my_form" instead.

You don't need any special feature from SQLPage for that.

Re:SQLPage – Building a full web application with nothing bu... by swasheck on Wednesday March 13, 2024 @10:04AM (#39691339)
would love to see duckdb included as a data source. it really is a swiss army knife when it comes to processing data formats. json, gpx, csv, xml, sqlite …

this would be a convincing feature for me