3 ms·
I'd like to see someone create a CMS that uses HTML files to store data and let's you query and copy data between the files using CSS selectors. This, to me, wo
by ollerac 6y ago
I'd like to see someone create a CMS that uses HTML files to store data and let's you query and copy data between the files using CSS selectors. This, to me, would be the simplest CMS.
You could just do:
<div data-copy-content-from="#about-page .profiles"></div>
And that would go into your about page, copy the content from there, and insert it into the current page.
If you built it out well enough, you could do everything using just static HTML and CSS files and just syncing the content whenever it changes.
I've been thinking about this idea for a while. I even started my own framework to try to make something like this work. I'd love to know what other people think.
- yohannparis 6y agoI mean, you kind of describe web-component. Or if you are old-school, PHP templating, you can do a simple: `<div><?php include('about.html'); ?></div>` This is how I did most of my static files website 10+ years ago. I had an `index.php` file that based on URL will load the content of an article. This is what PHP was created for.
- ollerac 6y agoI guess I'm looking for web-components with really powerful APIs. I could see it happening within the next couple years: building a full web app using only 4-5 new concepts on the front-end, all powered by web components. Any good resources you'd recommend on that? I've been looking around and it seems like a lot of projects are still in the early phases. Also, yes, PHP is awesome. Just not built for the modern web. Still is a really impressive language, however. I just wish there was a PHP equivalent built specifically for building dynamic, real-time web applications.
- johnchristopher 6y agoWouldn't it be like reinventing XSL in the end ?
- ollerac 6y agoYes! I'd never heard of XSL until today, thank you for pointing me to it! This looks exactly like what I'm trying to do. Could you point me to any resources on XSL that would make a good starting point? Or any XSL libraries that help you produce dynamic web applications?
- winrid 6y agoWhy not just use JSON paths and store the data in JSON?
- ollerac 6y agoActually, that's exactly what I ended up doing. Using HTML alone ended up being too cumbersome. I needed a single source of truth that I could serialize the data into and JSON ended up being perfect. I'm still holding out hope for a single XML-like language that can describe web apps in full, however. The tools we use now are way too broad and powerful compared to what you end up implementing with them 99% of the time.
- raving-richard 6y agoCheck out Server Side Includes. They used to be all the rage. <!--#include virtual="../quote.txt" --> You don't need to reinvent anything. Just use what used to exist. (Also, you start doing SSI, and then you want a bit more power, so you switch to PHP, then before you know it, you go all out with PHP and MySQL. Finally, you say, "MySQL sucks, SQLite is much better and easier" (see also the other comment about SQLite). In the end you realize that nothing matters. We all die alone in the end.
- ollerac 6y agoYes, I've been down this rabbit hole before :) I'm not just looking for static includes, but dynamic, real-time, editable includes built in to a framework that uses a single syntax to describe a full web app. I'm tired of using full programming languages for describing app data — and how it can be edited — when so much of what a web app can do has already been implemented a billion times. PHP is great for that, but, in my opinion, is 500% more powerful in areas that don't count (low-level language constructs that make it Turing complete, but not ideal for building real-time, editable web apps) and 10% as powerful as it should be in areas that do count (i.e. performing higher level tasks automatically, like structuring data, syncing data between pages, moving data around, rendering data to the page easily, etc.).