Hyperclay | Single File HTML APPS
22 points by mpweiher
22 points by mpweiher
Please don’t hide pricing behind collecting my email address. I was really curious about what the pricing had to say about the complexity of what you’re actually running as the service provider here— because from the outside, it sounds like something I wouldn’t pay more than like $1/month for given how simple it is to host static content.
The vibe of your description is cute and fun, but I still can’t tell if this is a CMS, or is it supposed to somehow magically be interactive for many (anonymous, I guess) users? Is it producing apps for one person, or many people? It doesn’t have to solve all of the worlds problems, I just legitimately couldn’t figure out the scope of your product while quickly scrolling through lobste.rs on my phone while a CI build happens :p
I got to this somehow when looking for a solution to how to have standalone web apps that live outside of the control of their creator (who hosts them) then I registered with my email and confirmed my subscription and I still have no idea if this helps or if it brings any new idea to the table.
EDIT: Nevermind, there is a documentation page that explains a lot. This doesn’t solve my problem directly but gives me some interesting ideas at least.
I was curious - I’m always curious to see how things could make my life easier. I usually start with the docs, but here’s where I stopped:
The first thing you should reach for is jQuery.
This undermines the idea of HTML and simplicity that it seems like the landing page is trying to espouse.
If you don’t have custom back-end code, how are you going to make a useful web page without JS?
(Unless it’s a purely static page, in which case you can just use a wiki.)
But JavaScript isn’t jQuery, though jQuery is JavaScript.
Vanilla JavaScript should be fine, right? Instead the first direction is to push people towards an antiquated shim library that is largely geared, last I checked, towards ensuring older sites maintain their modern compatibility.
So why, with a new product, make that suggestion right out of the gate?
Gotta agree with this, we have so many better tools built straight into our browsers now. Custom elements and templates for them in particular are simply a built-in feature, and you can freely add behavior to those things without legacy DOM tools. JQuery is for the era before these tools.
jQuery may be old and basic browser DOM incompatibilities are not so much a concern these days, but it still offers some useful affordances. jQuery’s $ operator makes it much easier than the DOM API to manipulate a selection which may have 0-N elements. In the DOM you have to iterate a NodeList explicitly. In jQuery you just call methods on the object returned by $() and you’re done.
This is just my opinion because I personally don’t think jQuery adds as much value as it did 15 years ago, and in many ways the abstraction hides the value of modern JavaScript.
I guess because it’s so easy to manage 0-N elements with vanilla js these days, the syntactic sugar doesn’t really feel like it provides any value (to me - and in my opinion encourages bad habits) and even if I got tired of typing document.querySelector() or document.querySelectorAll(), I could make my own syntactic sugar:
// pretend we're something easy, but not jquery - using an underscore to prevent confusion
const _ = (selector) => { dash_elements = document.querySelectorAll(selector); return dash_elements.length === 1 ? dash_elements[0] : dash_elements; };
// vanilla js do nothing if no matches for class="box", but change color to red if there are matches for class="box"
_("#button").addEventListener('click', () => _(".box").forEach(el => el.style.backgroundColor = 'red'));
I mean jQuery is slightly shorter, because the iterator is hidden. Alternately, if we did just iterate the same way it saves nothing from the above, really.
// jQuery set the style property with an abstracted iterator
$("#button).click(() => $(".box").css({backgroundColor: "red"});
// use an iterator with $.each()
$("#button1").click(() => $(".box").each((idx) => $(".box")[idx].style.backgroundColor = 'red' ));
I just don’t like using a crutches where (again, in my opinion) the ROI is minimal or negative because it introduces dependencies or complexity that is unnecessary.
Jquery’s still good as a Swiss Army knife of DOM manipulation. I’m not an expert on JS frameworks, but the newer ones, starting with React, seem to be about structuring an entire app around building and managing the DOM, rather than just adding specific bits of interactivity. Is there a better replacement I should know of?
Hmm, a few years ago I saw a similar project that took this approach a step further by using a CRDT for synchronizing the HTML between multiple clients and the server. I can’t find it anywhere…
Yesss, thank you! This looks like quite a nice open source alternative to hyperclay. A bit prototype-y but advanced features like permissions are there.