[stringtemplate-interest] re String manipulations

Zenaan Harkness zen at freedbms.net
Mon Sep 18 20:11:11 PDT 2006


Can anyone provide a brief set of steps required to be taken, in
order to add a caps|allCaps|initialCaps function to ST, in order
to capitalize strings suitable for Java getter and setter method
names?

I don't want to go into my model and produce wrappers, because it
is simply a jyaml (http://jyaml.sourceforge.net/index.html) file
(or set of files) which I load and very simply plug into my ST
template.

This current setup results in an extremely simple and robust
controller, very simple model, and very clean separation of
concerns. I really don't want to have to have custom model logic
in my controller peeking inside a particular model instance
(a loaded yaml file), sucking out attributes, wrapping them, and
plugging them back in to the "model" (simply a set of Maps and
Lists). This is clearly an entanglement of the model and the
controller.

And of course, to have to put multiple instances of the same data
fields in the model, breaks the Duplication principle in the model
and looks bad to boot - redundancy is an even worse solution!

Because my model is encapsulated as pure data in a yaml file, I
really don't want to have to unnecessarily break this separation
of concerns inside the controller. It's really clean at the moment.

Any help appreciated.

Thanks in advance
Zen

-- 
Free Australia - www.UPMART.org
Please respect the confidentiality of this email as sensibly warranted.


More information about the stringtemplate-interest mailing list