It's github page is created by Javalin. This web framework also look interesting. It is a lightweight framework that works with Jetty, websocket and Vue frontend.
I don't think I have extra time to explore these projects. See if anyone is interested to wrap them or explore further.
Yes!
Different approach to build web frontend.
It is like HTMX is different from using the popular Web framework. Depend on individual preference. Maybe some people scared seeing html tags.
Well, it has a hugely extensive command set and a single example. But which solution should I consider? Now I have gotten some things working, but... Because if you look at an HTML header, for example, it is different for every web page. A wrapper I made with my header solution that I needed may not be interesting at all for someone else.
For what it's worth, that example (including more html tags) seems simple to make as a native B4X solution. (I haven't looked at what other things j2html can do.)
I can imagine that a set of preset templates will be useful as reusable components. It will work like code snippets that save someone time to create them every time.
I will try to make my own library without relying on the j2html.
Currently it looks like this:
B4X:
Dim html As MiniHtml
html.Initialize
html.Tag1("body")
html.TabsIncrease
html.Tag("h1", Array(CreateMap("text": "Hello, World!")))
html.Tag2("img", Array(CreateMap("src": "/img/hello.png")))
html.Tagx("body")
Dim content As String = html.ToString
File.WriteString(File.DirApp, "hello.vm", content)
In future I will try make a version that allow tag to add children, auto close and auto indent.
I will try to make my own library without relying on the j2html.
Currently it looks like this:
B4X:
Dim html As MiniHtml
html.Initialize
html.Tag1("body")
html.TabsIncrease
html.Tag("h1", Array(CreateMap("text": "Hello, World!")))
html.Tag2("img", Array(CreateMap("src": "/img/hello.png")))
html.Tagx("body")
Dim content As String = html.ToString
File.WriteString(File.DirApp, "hello.vm", content)
In future I will try make a version that allow tag to add children, auto close and auto indent.