[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: dynamic template loading (was: Voice of dissent)
From:       Erik Hatcher <erik () ehatchersolutions ! com>
Date:       2004-01-29 22:00:05
Message-ID: 7EC0BF4E-52A6-11D8-A00B-000393A564E6 () ehatchersolutions ! com
[Download RAW message or body]

On Jan 29, 2004, at 12:17 PM, Bryan Lewis wrote:
> Thank you!  I remember your posting in early December about the
> ISpecificationResolverDelegate. I had it on my to-do list to figure it
> out, but this saves me a lot of time.  Long live open-source!  (Or
> should we start imitating the "secret Java handshake"?  :-)

The difference with a resolve delegate is that the delegate kicks in 
when the template cannot be found in its normal search (i.e. it is not 
in the WAR at all).  So it is the opposite situation than what my 
solution solves.  The delegate is a far easier extension to make - you 
code it and register it in .application as an extension and no need to 
write a custom engine.

>> I'm sure there is room for improvement, but this works quite well for
>> us at the moment, and perhaps could even be used in production to
> allow
>> a client to override a template and change something if desired.
>
> (*shudder*)  I'll be using it in development only. Often when we tried
> this feature in production in our WebObjects apps, it caused a 
> headache.
> WO would load the html and bindings files dynamically, but not the 
> newly
> compiled code (if there was any), causing a surprise run-time error.  
> Of
> course, if one is _careful_ about making changes to production and
> refrains from doing this when there are associated code changes, then
> one is safe... but you know how it is to rely on someone being careful
> when they're in a hurry a year or two from now.

Same situation here.... you cannot live update the Java code with my 
solution, just templates (and specifications).  And you can see weird 
effects if you add things to a specification that requires enhancing 
the class file that is cached.  The reset service comes in handy to 
flush everything on a running system (see the docs on how to enable 
this) - it's amazing what you can learn by reading the source code :))

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic