From: Anthony E. <me...@an...> - 2001-11-20 12:10:00
|
The reason I like passing an Element in is because 1.) it allows the class to configure itself and 2.) the configuration information can take advantage of the nice structures which XML provides. As for loading goodies at runtime, I totally agree. What do you propose as an adapter API? Something else I think would be good is to be able to use a custom class loader to load validators which are not in the classpath at startup. This would allow you to package your validators in a JAR, drop them in a directory and off you go - no need to set up the classpath. I am doing this in a couple other projects and it is very nice. Sincerely, Anthony Eden > -----Original Message----- > From: Nick Bauman [mailto:ni...@co...] > Sent: Tuesday, November 20, 2001 12:31 AM > To: me...@an... > Cc: for...@li... > Subject: RE: [FormProc-developer] New rules written > > > Anthony, > > Sorry I reasked the question in another thread before seeing this in my > inbox. > > >> Anthony, > >> > >> I've written a bunch of rules, but they are for my own framework. My > >> desire > >> is to see if we can write some kind of bridge that will allow my rules > >> to be > >> plugged into your framework without me having to develop in the > >> FormProc tree. Can we agree this is a worthy goal? If not, you could > >> always cut and paste, and I would be fine with that, but that means we > >> miss out on long term cohesiveness and maintainability. > > > > As long as your rules implement the org.formproc.validation.Rule > > interface then you should be able to use them in FormProc. You could > > also create a wrapper Rule which just executes your rules through some > > interface you design. Two things make this possible: 1.) Rule > > implementations are specified in the XML file and 2.) you can pass any > > XML configuration data to you rule through the configure(Element > > element) method of the Rule interface. > > Ah, these 2 things is where we don't see "eye to eye". I think it's a bad > thing to expose a DOM API call / class into any validation engine. That > should be totally decoupled. You should either be calling > specific methods > (a la SAX, which emphasizes decoupling and is higher performance than DOM > anyway) or you should be using Collections. Or am I missing something? > > I also think we should be able to load each other's goodies at runtime > using cp and an adapter, otherwise I think what we will end up doing is > adding an "XML stalagtite" into each other's xml configs for each other's > framework. > > So what I'm saying is "Adopt an adapter into each framework and > nobody gets > hurt!" (LOL) > > > If this is not sufficient then tell me what you have in mind. > > > > Sincerely, > > Anthony Eden > > I hope I didn't come off too assuming. FormProc is great! > > > > > _______________________________________________ > > FormProc-developer mailing list > > For...@li... > > https://lists.sourceforge.net/lists/listinfo/formproc-developer > > > -- > Nick Bauman > Cortexity Development > Intellectual Process is more important than > Intellectual Property -- you'll see. > http://www.cortexity.com/ > > > |