All custom attributes must start with data, read the convention
HN user
guseyn
Sure: https://e-html.org
You serve your static files and that's it. You just create multipage app. And you can cache almost entire page by e-wrapper template.
EHTML — Extended HTML for Real Apps
Why do we need another framework for Node.js? This is my wish list:
I want to build my web application on a framework with zero dependencies.
I want to utilize native Node.js APIs without any additional layers of abstractions.
I want to hack my framework when I need to, e.i. I want to have quick access to my framework's folder and make quick changes.
I want to have zero downtime when I update my appliction's logic just by sending a signal.
I want to use Cluster in Node.js. It will allow me to scale my application with very little price. I also don't want to anything else for orchestration and other fancy things that Node.js provdes itlself.
I want to have HTTP/2 as a default.
I want to handle 500 User error properly.
I want to configure my application out of box in my primary and worker processes.
I want to have very simple secrets reader.
I want to be able to log into an output log file.
I want to have composable API provided by my framework and not use middlewares that reduces the code clarity. I want to be able to copy/paste logic to achieve clarity.
I want to have access to params and queries in each request URL.
I want to have control when I read body of my requests.
I want to have quick access to my external dependecies like db clients and other integrations without attaching them to request object. I want to have dependecy injection without any huge frameworks.
I want to easily configure my index.html, not-found.html files.
I want to focus on building my products quicky and make money.
Hopefully it can be interesting for somebody who want something similar from a framework.
This is one is also good: unisonofficial.com
thank you!
Yes, you're right, thank you for such explanation.
It's not just static content. It's Markdowns loaded right into HTML.
I believe Turbo/Stimulus rely more on server rendering + their Turbo Drive is quite powerful, will try to catchup on turbolinks. I had implemented them previously, but it's quite difficult to make them smooth.
Yeah, because I am using highligher for code fragments in markdowns, will try to optimize it.
could you please give a reference?
I think the biggest difference is that EHTML works more with JSON API rather than with HTML Server Rendering integration.
It's based on JS, of course, but the goal is to get rid of JS as much as possible for the developers who want to build frontend for their apps
loading pages with some information from endpoints and mapping it to html template, sending and validating forms, making navigations with turbolinks, making authorization via google and getting url parameters by specified pattern. And you don't need JS for such simple things
Complex HTML is always better than complex JS, because HTML is declarative language, it's much easier to maintain and modify
This lib allows you not to write js, it's just based on it.
it evals, but only some part of it, so it prevents XSS attacks
#box is just a selector, it means element with id box, and you can see errors like "element is not found" anyway
I am not sure that it hides it, it just declaratively represents it.