From: Marc P. <ma...@an...> - 2003-06-16 10:49:33
|
On Mon, 16 Jun 2003 11:43:08 +0200 (CEST), Endre Stølsvik <web...@st...> wrote: > Throw away FastWriter. Throw away the very strange buffering of the > entire > page before output to the user. Throw away all those "performance hacks", > yes yes, and keep the -template engine-. > > I'd like to have a template engine. One that takes a Template, a Context > and then renders the combined information to a stream. Could WM provide > me > with that, without lots of stash, Threads, strange configs, weird search > paths, caching and shit I don't need or, more importantly, don't > understand? Then -I-could plug together my favourite things, e.g. a > servlet-based template provider, a template-cacher, a Logger, and the WM > engine. I have to say I agree with this sentiment. All the Broker and related baggage we carry is the only major criticism Velocity fanciers can still level at us. I don't think we should get rid of it all, at all. We should just make our "baggage" optional, and use defaults implementations where possible. I know we do this in most places. However, we simply -must-be able to do something like this: WebMacro wm = new WM(); Context ctx = wm.getContext(); Template t = new FileTemplate( myTemplate); ctx.put( "myVar", "myValue"); wm.evaluate(t, ctx, System.out); If we can't do something as simple as that, the WM barrier (to entry) is way too high. -- Marc Palmer Contract Java Consultant/Developer http://www.anyware.co.uk/marc/ http://www.wangjammers.org |