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


> Model
> View
> Controller
> 
> Where in View do you see "Cache"?


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.

> 
> 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.
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.

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.
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.

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.


Gabe


> 
> Bah. #cache isn't in there because it is a bad idea.
> 
> -jon
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> .
> 
> 


-- 
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


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

Reply via email to