From: Anthony E. <me...@an...> - 2002-01-24 14:12:22
|
Comments inline. > -----Original Message----- > From: for...@li... > [mailto:for...@li...] On > Behalf Of Nick Bauman > Sent: Wednesday, January 23, 2002 11:37 AM > To: for...@li... > Subject: [FormProc-developer] Object Population and > Validation (was: Validation by type) > > > I understand. That's great, I think it's a good idea. I was making an > assumption that these are 2 different goals that s/b > decoupled. It is, > however, not wrong to couple them. Good, glad we agree. :-) > > Thinking aloud: > > For myself, and maybe I need some religion on this one, but I > personally > don't like frameworks that make me change my objects to fit > them better, > or have to make discriptors of my objects that are external > to them which > make it possible for a framework to use them. The good news is that you don't have to change your objects to work with FormProc. The data population is not required. You do not have to specify write methods and if a setXXX() method is not found then that field will be skipped (validation will still occur though). > For me to > accept this, I'm > going to take a long hard look before leaping. This is why I > like the idea > of decoupling the data validation from the object population. > Maybe I want > to plug in my own object population strategy? Being able to plug in an object population strategy is not a bad idea. If you ever find that you do need to do this then let me know and I will work on making the population part of FormProc pluggable. One thing to note is that FormProc attempts to follow the JavaBeans standards when populating objects since it is the accepted standard for working with unknown components at runtime. > For this a peer > interface is > all that's needed. (If you've guessed that I dislike CORBA > for this reason > you're partially right, but only in particular when everyone > is speaking > Java, but that's another argument) > > Also, Anthony, the object population portion has taken root in your > design. Is that a good thing? Maybe it is, but it makes me think. I wouldn't say that it has taken root, rather it is the most common way that people think about forms (AFAICT). Even if FormProc was not designed to populate objects I would still maintain the one-to-one relationship between form widgets and FormElements in FormProc. -Anthony |