spring-petclinic / spring-petclinic-htmx

Htmx version of the Spring PetClinic sample application
Apache License 2.0
27 stars 11 forks source link

JStachio version #2

Closed dsyer closed 1 year ago

dsyer commented 1 year ago

The latest version of htmx-spring-boot doesn't depend on thymeleaf, so I'd like to propose a maintained branch in this repo with at least one other template engine. My choice is JStachio because of the novelty of having a reflection-free compile time engine, and because that plays well in the new native image building world. There's a branch here that works: https://github.com/dsyer/spring-petclinic-htmx/tree/jstache. I could make it into a PR if there was a branch here.

arey commented 1 year ago

Hi Dave, thanks to the 3.0.0 version of the htmx-spring-boot project, we can use indeed other libraries than thymeleaf: https://github.com/wimdeblauwe/htmx-spring-boot/releases

I didn't know JStachio. Mustache templates are compiled at build time. It sounds great. This reminds me the arrival of MapStruct into the mappers world. Thus I think its a good idea to provide a second template engine for this htmx repositoy. The most difficult thing will be to synchronize the 2 branches because they diverge so much.

agrison commented 1 year ago

Hello, that seems like a good idea to have a second branch.

I didn't knew about JStachio either, but I will join Antoine on the fact it may be difficult to keep them in sync, but we can try.

Mustache templates are very hard to read and follow to me, so I may not be able to help that much with it, but I can understand the advantage of having them compiled at build time.

dsyer commented 1 year ago

OK great. If you create a branch I will send a PR. I can help maintain it - it shouldn't change much once we get it working.

agrison commented 1 year ago

I created the jstache branch.