Re: [Stripes-users] Typed Text Templates with Stripes
I don't know razor, but it doesn't seem to have the signature as first class citizen, like TTT does.
new MyTemplate( myFoo, myBar ).render( out );
It's a huge difference. With TTT, if you change the signature of a template, then the ActionBean(s) using it will not compile. Compare this to using a jsp:forward, which ain't typesafe at all...
As for JSP/Scriptlets, I'm trying to stick to JSP subset just because this way I can reuse JSP IDE tooling.
It's really cool to see the completion, error reporting etc at work without actually coding anything, just associating .ttt files to JSP editor in IDEA...
So I've managed to use only parts of the JSP syntax for my own needs. For example, I use the "JSP declaration" (first code-like block in template, the between <%! and %>) in order to declare the template's signature. So this template :
has 1 arg 'foo' of type String. It compiles to an immutable class with one constructor that accepts all defined arguments, and has a render() method :