Hi Talin!
Hearing about the roadmap is really helpful, thank you! I'm very glad to hear about the focus (improving performance, security, portability instead of new language changes).
I have a couple questions
- is the final state for escaping going to be strict by default and all variables / params having kinds?
- what is the end goal for the dichotomy between SoyData and SoyValue? Presently we're using the last release (april 2014) and the api seems to be In transition and hard to use. For example there is no built-in SoyValue map type that is mutable
- any plans for a go backend?
- how do you achieve sending page content before rendering has completed without showing a garbled page in the event of an execution exception? (I always write responses to a temporary buffer first for this reason)
On the topic of evangelization, here is my take on why closure templates has not done as well as it merits:
- not integrated into any popular web framework. Most developers use frameworks and most frameworks are very particular about which template language they use.
- in terms of mind share, java is not exactly at the front for web development, and this is mostly targeted at the java users
- previously, it was a source drop with no information about the roadmap or community efforts (looks like that's changed!)
It's great to see more activity on the open source project. One thing that would be helpful is having official releases, including notes on changes and a set of the documentation for that version in particular. Right now I have to select a revision at random, host my own javadoc, gloss over any language differences between that and the last release, etc. Means I basically can't upgrade from last year's release. An example of doing it right is play framework, where you can select the version you're using and see the docs as of that release (javadoc, framework details, etc).
I think closure templates are technically superior to everything else, so that's a good place to start :).
Thanks again,
Rob
n Tue, Mar 31, 2015, 13:52 'Talin' via Closure Templates Discuss <closure-temp...@googlegroups.com> wrote:
I wanted to let folks know that Closure Templates is under heavy development within Google right now, with a lots of new stuff coming down the pipe. As you probably know, our main focus with Closure Templates is performance and security, and we're constantly working to improve the code in those areas.
We're not planning on making any changes to the templating language itself, but there's a lot of exciting stuff happening under the hood:
A completely rewritten (and much faster) engine for server-side rendering in Java.Improved error reporting, including source snippets. No longer does the compiler simply quit after the first error.
A backend for generating Python code.Architectural changes that allow partially-rendered templates on the server to be sent to the browser earlier, while the rest of the template is still being rendered. This includes lazy evaluation of sub-templates so that content is rendered in page order instead of call-tree order.
The other thing I'd like to mention is that we haven't done a very good job of evangelizing Closure Templates to the rest of the world. I'd be interested if anyone has any ideas or suggestions for letting people know about the work we're doing.
--
-- Talin
--
---
You received this message because you are subscribed to the Google Groups "Closure Templates Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-templates-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Aw, I like the same soy :). Much less cumbersome to say and type than "closure templates, not to be confused with clojure, actual closures, or any of the companion parts of the suite"
+1 on the utility of tutorials / examples for how to get started with the popular frameworks. Here are the main ones that I'm under the impression are popular:
Js: node.js, express
Java: play, dropwizard
Python: django
If you published benchmarks, you would crush the alternatives. In particular, for play 1.x, the built-in groovy templates are incredibly slow and I found it took 300ms(!!!!) To render a reasonably complicated page. Soy was 40x faster (no exaggeration). Oh, and groovy templates just do basic escaping (like soy v1)
Also, "data driven" templates have mind share, and soy is basically that, since it forces you to create view models rather than writing code in the template -- in my experience, this leads to wayyyy better code.
--
better error reporting (i'm sad every time i see a java stack trace
in my compilation error report)
I agree with you about Soy map types. Internally we have a type provider class that allows Soy to talk directly to protocol buffers without the need to convert data to the various SoyValue types, and we've been using that more and more lately. There's no reason we couldn't open-source the type provider, except that (a) we didn't want to create a library dependency from Soy to libproto, and (b) it assumes that on the browser you are using JSPB as your protocol buffer implementation, which most people don't use. Anyway, we didn't think that external users would be too interested in this.
On Thu, Sep 8, 2016 at 10:49 AM, Luke Sandberg <lukeis...@gmail.com> wrote:
> The jbcsrc backend is considered mature and is in use by several large
> services at google. The incremental dom backend is unfortunately not really
> ready yet and the main developer on the project left the team and has yet to
> be replaced, so the project is in stasis. The other major thing that
> happened is that we released our support for protocol buffers, so you can
> now pass protos to your templates as parameters.
If you want an example of how to provision the jbcsrc backend, see
https://github.com/mikesamuel/closure-maven-plugin/blob/master/module/src/main/java/com/google/closure/module/ClosureModule.java
which also wires up protobuf support.
That's part of a side project of mine, closure-maven-plugin, which
ties Soy + JSCompiler + CSSCompiler + protoc together on a maven
stack.
https://github.com/mikesamuel/closure-maven-plugin/blob/5a57dd003e548615e3604742e20ba5b152748139/plugin/src/it/demo/src/main/java/com/example/demo/Demo.java
shows the same template being used from both the jbcsrc & jssrc Soy
backends.
<shameless-plug>
I'll be talking about that demo app in the context of secure code
patterns at JavaOne.
https://oracle.rainfocus.com/scripts/catalog/oow16.jsp?event=javaone&search=samuel&search.event=javaone