OO and Configuration files
From: linusj (linusjoseph_at_gmail.com)
Date: 10/29/04
- Next message: Wolfgang Keller: "Re: Questions regarding MDA"
- Previous message: Wolfgang Keller: "Re: pattern languages"
- Next in thread: Robert Klemme: "Re: OO and Configuration files"
- Reply: Robert Klemme: "Re: OO and Configuration files"
- Reply: H. S. Lahman: "Re: OO and Configuration files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Oct 2004 13:47:10 -0700
Configuration files are sometimes (mis?)used to drive application
logic. I am trying to understand if this is a good practice. Let me
explain with an example.
Let us say I have used the Factory pattern. So I have, say, a
PaymentProcessorFactory that would create a CreditCardProcessor or
CheckProcessor. Is it a good design to keep the class names in config
file and use reflection to load the Objects? (ie. CreditCardProcessor
or CheckProcessor). I have seen a similar pratice in some
implementations to load Mapper classes based on which Domain object is
requesting load or save Data Mapper Pattern.
Taking this issue further, are there any
caveats in using configuration files to support good OO practices?.
Doesnt excess use of config files move application logic out of
classes into the config file, thus violating encapsulation??
Thanks a lot
Linus
- Next message: Wolfgang Keller: "Re: Questions regarding MDA"
- Previous message: Wolfgang Keller: "Re: pattern languages"
- Next in thread: Robert Klemme: "Re: OO and Configuration files"
- Reply: Robert Klemme: "Re: OO and Configuration files"
- Reply: H. S. Lahman: "Re: OO and Configuration files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|