Hi, basically, there are two kinds of resources in wicket. One is application-scope resources, that don't need the context of a page (javascriptps, css...) and the other is component resources, which kind of belong to a component - so they have access to component, page, etc (chart generation).
ResourceReferences are needed for the global kind of resources. They know how to register with application and how to initially create the global resources. We should probably cleanup this a bit in future wicket release (to late to do that for 1.3), so that it's much more explicit what's the purpose of resource reference is, also the resources should easily support the "push" mode (which is kinda tricky right now because the onresourcerequested method is final, so you have to provide the IResourceStream, which can be rather cumbersome for some kind of resources). -Matej On 8/5/07, Kent Tong <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having some doubts about why the concept of resource reference is > needed; it seems resource already suffices. As I understand the purpose > of resource reference is to reduce the memory used and the need to > replicate changes in a cluster. However, a resource can also generate > or load the data on demand. In fact, most important resource classes > in Wicket are already doing that (PackageResource, DynamicWebResource > and etc). So a resource typically only takes just as little memory as > a resource reference. > > It's true that a resource has some extra features like > onResourceRequested() that are not needed by users of resource > reference. However, I really doubt that this is the real reason for > creating the concept of resource references. > > Thanks for any info! > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
