[stringtemplate-interest] How to write a helper template/macro for common stuff in a template (i.e. model and controller independent)
Zenaan Harkness
zen at freedbms.net
Fri Jul 17 19:35:49 PDT 2009
On Sat, Jul 18, 2009 at 10:51:55AM +0930, Barrie Treloar wrote:
> I cant use a Java class because these are model and controller independent.
> i.e. they are view helper templates to make writing the view easier.
>
> Its one of the reason I am hoping someone else has a similar use case.
> Hoping a different view will increase my understanding.
(BTW, preferably bottom-post if you will.)
Yes, to separate model, view and controller is a good approach.
I consider my "driver" as independant from "controller", where
controller is more about my model's logic to connect with view.
Whereas, my program or driver is my 'driver', that hooks up the bits for
the model, the bits for the controller, _and_ the bits for the view;
and then, hooks these three together.
I consider my view independant of anything else. My view has its own
hierarchy of templates, and combinations of templates and code, to
create flexible, powerful views.
And logically (and in terms of classes), my view is entirely separate
from my model.
Just because a particular view has one or more java classes directly
associated with the view, does not mean my view is not entirely separate
from my model (assuming I code it with a nice clean separation).
Regards
Zen
--
Homepage: www.SoulSound.net -- Free Australia: www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.
More information about the stringtemplate-interest
mailing list