I've implemented a generic factory as described here
I need to register elements to the factory hard-code like this:
this factory will have to be correlated with a simple domain data type table [id,Display], in this case id 1 is related to MyClass.
I was thinking to add a column to that table with the qualified type, so I can simply retrieve the id to types. table will be [id,Display, typeName]
and I will use the factory like this:
I tried it and it's working ok.
is this a good design?
are there any security flaws?
is there a better way to do things?