tipsy / j2html

Java to HTML generator. Enjoy typesafe HTML generation.
https://j2html.com/
Apache License 2.0
765 stars 136 forks source link

[Architecture] Idea: Separating the Code-Generation from the Main Project #161

Closed pointbazaar closed 4 years ago

pointbazaar commented 4 years ago

This is a very minor Issue, and mainly has to do with making it easier to extend the J2HTML API in the Future.

I'm suggesting separating the Code-Generating code into a separate Maven project, with a separate pom.xml (still in this repository). The .jar which people would then use as a dependency then would not need to include the classes used for code-generation, which would make sense for people only using j2html, who want to inspect the decompiled .class files or view sources. It would also make j2html a (slightly) more lightweight dependency.

And this would make j2html simpler to understand if one does not care about the code-generation.

However the greatest benefit could be that Contributors modifying the code-generating code do not need to worry about being unable to run the code-generation again after making a mistake, which would cause the project to have compile-time errors.

Any Feedback would be nice :+1:

tipsy commented 4 years ago

Are you thinking of setting it up as a multi-module project, or simply two projects side by side?

pointbazaar commented 4 years ago

2 Projects side by side, since they do not depend on each other's code.

tipsy commented 4 years ago

Great, I think that's the simplest approach too.

pointbazaar commented 4 years ago

Anyone reading this, feel free to implement it, I'll probably be busy until 9th October 2020 due to exams. After that i would try to implement.