on 7/8/02 5:31 PM, "Gabriel Sidler" <[EMAIL PROTECTED]> wrote:

> Jon,
> I'd like to understand your thinking better. To me, caching
> would be a very valuable add-on.
> 
> Jon Scott Stevens wrote:
> 
>> Why do you need to cache content like that?
> 
> 
> Performance. The difference can be huge.
> 
> What do you need to cache?
> 
> - header
> - footer
> - navigation elements
> - complex view snippets

They are already cached.

> I my understanding "caching" is a technique that is really orthogonal to the
> MVC concept. It is applicable to any of the three tiers of MVC.

IMHO, not really true.

>> Why would you want to give the power of caching to your designers?
> 
> Because many aspects of the view are of no concern to the software
> engineers that build the model and controller of the application.

And caching is of no concern to Designers.

> Only the view designers should be concerned with page headers, footers,
> navigation elements, view snippet A, view snippet B, etc. and therefore
> only they are in the position to identify cachable view snippets.

If they understood what caching was...

> Of course, it would be wrong to cache parts of the model in the view.
> That would be really bad practice.
> 
> Now, I am sure that none of my arguments are new to you. I'd like
> know how you propose to cache view snippets or why it is a bad idea
> in general.
> 
> 
> Additionally, one thing that is not addressed by Rick's idea
> and that would be a cool feature is the caching of entire pages.

Do that in the controller...not the view.

> The usefulness of such a page caching scheme would depend very much
> on the control the view designer has over specifiying the life time of
> cached pages. For example, the life time of a cached page could be
> tied to
> - time (the obvious)
> - the life time of a session
> - the value of an application-scope variable
> - the value of a velocity context variable
> - the value of a HTTP request parameter
> etc.

Controller.

> Where would such page caching support go? I am not quite sure.
> One approach would be to implement it as a layer on top
> of Velocity, for example inside VelocityViewServlet.

Bingo.

-jon


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to