solutions for sub-views

Hi all,

I have some performance problems.

I have created a concept called 'widgets', which is a cfc that has a
render method that returns a string that can be written in a view.

I have made this to deal with recurring things like a tree viewer, a
menu, etc.. basically to re-use pieces of views.

These widgets extend an AbstractWidget, which gets injected with
coldbox'es i18n functionality and buildlink etc... everything needed
by the view..

The render method the widget can take external data that needs to be
used by this widget..

This widget extends abstractwidget, and implements a widget
interface.. it uses coldbox cfc's that are inject. The problem with
this is that i found out in jrockit that all this extending/interfaces
and calling of other cfc's gets a lot of overhead...

Also.. i noticed a piece about viewlets in the coldbox documentation
and the renderview method. I like this renderview method because it
has caching. I dont like viewlets because they seem to need to call
handlers .. which basically means that the view is calling the
controller, which should not be done i think in the MVC pattern.

I would like to know what kind of solutions other coldbox users have
deal with sub-views... preferably ones that dont involve calling
controller from the view..

greets,
klaas

renderview() with the caching is the way that I do it. Viewlets are more powerful as they are self-contained, so it depends how you have built your application.