Back to list
Views:   5.2K
Replies:  1

I need some Design Pattern advice

Hi All,

I'm in the process of modifying an application. I'm writing a set of classes for different storage systems (database etc).
In order to interact with the different systems each class will require particular pieces of information to connect to the store.

What I'm looking at doing is having each provider implement a method that returns a Question<t> class.  So lets assume that I want to ask the user for a database username this would resolve to Question<string>. What I'm then looking at is having a factory to create/return each type of closed generic class I need.

One question follows on from the above architecture: Should I have each concrete class implement it's own processing logic (i.e to ask the user via a command line) using the command pattern or is there a better way of doing this?

Any help much appreciated.
Sean Farrow, Jun 18, 2013
Reply 1
I am not sure I understand the question.
Why would you query the provider?  Why not store this information globally in a simple cache or file?
It seems to me that you are making things more complicated than they have to be. 


Jacob Tanner, Jul 11, 2013
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.