perl + Template Toolkit (using the underdocumented support for the fragment pattern with EXPOSE_BLOCKS), before finding htmx we used Jemplate, which let you compile Template Toolkit templates into Javascript functions
Contrary to what seems to be the rough consensus here, ESB/SOA (+ SOAP + WSDL + XML + ...) the 'correct way to do microservices' is probably something more like Self-Contained Sytems (SCS)