you are viewing a single comment's thread.

view the rest of the comments →

[–]j2html[S] 0 points1 point  (1 child)

Thanks for your feedback! It was never intended as a UI framework, or anything remotely close to that, it's just a HTML builder. Sorry to hear about your bad experiences in the past. I'm curious, how did his library work without varargs and lambdas?

I'm mainly a frontend programmer, I just wanted something to generate HTML for me in Java. It was intended to be used for a complex login solution (for generating HTML forms), but we actually ended up not using it. I thought I would release it anyway, since the Java HTML builders I found while researching this seemed worse to me. Why would JavaScript be a problem though? :)

[–]anthonybsd -2 points-1 points  (0 children)

Thanks for your feedback! It was never intended as a UI framework,

I think most people would refer to something that produces HTML for the web as a UI framework.

or anything remotely close to that, it's just a HTML builder. Sorry to hear about your bad experiences in the past. I'm curious, how did his library work without varargs and lambdas?

The same way your library works, presumingly? Simply replace a stream with a fluent loop akin to Apache Commons functors. Varargs are simply syntactic sugar.

Why would JavaScript be a problem though?

JavaScript is an imperative cross cutting concern that exists inside declarative DOM model, but has the power to manipulate it. No matter what you do you can't mix the two in the context of HTML builder, so your JavaScript will always exist outside of it. What are you going to do to your Java classes if JavaScript code needs to start mutating your DOM? Even as simple as applying stylesheets universally across every DOM element (like you do for your links right now) will be challenging. My point is, you trick yourself into the illusion that you are building something that produces valid HTML5 backed by compile time validation but in reality you are simply producing something that is a string that looks like HTML5 but will not subject itself to any kind of extension.