I have a populate() method on my objects.  It handles trimming and stripping
js/html from fields.  Very rarely do I ever allow html or js in a field, so
everything defaults to getting stripped.  In the init() (or
pseudo-constructor) I set any exceptions to that.

I have been doing this for several years now, and have found that it is just
dead simple and efficient.  And it lets the BO be in charge of how its data
is handled, which is honestly where I think that type of decision should be
made.  Of course, there is "no one true way".  :-)

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to