jte
jte copied to clipboard
[Question] Who is using jte?
Hey everyone,
just curious if you use jte on your projects and what for?
I'll make a start - I use jte for HMTL rendering of
- the jte website: https://jte.gg/
- my game website https://mazebert.com/
Our company - https://flowcrypt.com/ - is using jte for for our Admin Panel: https://flowcrypt.com/docs/business/enterprise-admin-panel.html
We did not want the complexity of a front-end framework for rendering, and existing server-side rendered solutions in Java/Kotlin were awkward to use and not type safe. For us, jte has been a very productive and pleasant tool, and support from the team was excellent.
Aww, thanks so much for the heads up @tomholub!
That dashboard looks pretty clean 👍
Very happy that jte is working for you.
I've been experimenting with building web services with Graal native-image. I started using jte because ahead-of-time compilation of templates fits well with ahead-of-time compiling the rest of the server side.
However, in practice for future webapps I think I'm likely to use client side components (e.g. React or Vue) with a server that sends JSON responses, so server side templates are not so useful.
@edward3h Client side rendering is quite common these days, but there are probably still places where you'll like to rely on server side rendering, such as sending HTML emails or SEO relevant pages. :-)
Or if you happen to develop a web app that doesn't actually need any JavaScript front-end framework (which in my view is most of them :) )
@kelunik If you use e.g. React for frontend you probably also want to use the tooling that uses the same components for server-side rendering (sorry I forget exactly what it's called).
Now that you have KTEs you could try to increase usage by getting on this list somehow? https://kotlin.link/ It's a curated list and you'd need to start by getting on Kotlin Slack group https://surveys.jetbrains.com/s3/kotlin-slack-sign-up (I'm not on there)
I've replaced FreeMarker by JTE (with Kotlin) in a couple projects mostly for email html rendering as the front-end is React. Just wish the IDEA Kotlin plugin did a better job of identifying bugs. Apart from that it's so nice to have template compilation with Java/Kotlin and makes me wonder why something like this is not the norm instead of imho the overly complex FreeMarker, Thymeleaf, etc.
Thank you for the heads up! I'm glad you're a fellow happy user of jte :-)
Yeah, I wish the Kotlin IDE support would be better, I still haven't heard from Jetbrains on this question: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008216139-Is-MultiHostInjector-the-right-approach-for-a-Kotlin-based-template-engine-plugin-
The approach works with Java, but unfortunately only half way for Kotlin.
It's a shame the kotlin plugin is somewhat stuck in the current state. It would make JTE a more compelling choice if it had proper kotlin support in IDEA. I understand now why Kotlin support isn't referenced in your documentation, it's a better experience for the time being to simply use Java.
I am. Nice job.
The best for me is that jte is able to check domain model at COMPILE time.
Thanks casid ;)
Thank you, very glad you enjoy the lib!
I've added a Jte plugin to Ktor: https://ktor.io/docs/jte.html
It's been working great so far!
Oh, wow, that's impressive! Thank you so much for creating a Ktor integration!
By the way, the plugin's API is really clean and the documentation looks very helpful.
I'm going to add this right away to the list of framework integrations :-)
We're using it to generate Asciidoc which we can then feed to Asciidoctor/J to make PDFs.
Planning in using it for my side project (job board)
http://ergonodes.net which I created on July of this year has been using it since the start.
It integrates very nicely with the HTML and I really like just using pure Java inside the templates and not having to learn a new language for it. While some things can be a little annoying like the need to call toString()
on objects it makes it more strict and less prone to mistakes.
For the server I use Spark (with a custom class to facilitate jte integration).
Nice, thanks for sharing! I really like how fast and snappy this site feels!