Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reflective factory (Design patterns related ?)

Status
Not open for further replies.

princeshri

IS-IT--Management
Jun 22, 2001
48
GB
Hi,

I was looking through a very interesting article on gamedev.net about reflective factories and have been hunting with google for more information on it.

Anybody know websites with more information on Reflective Factories or what they are a part of - I think they may be related to design patterns but not sure - any ideas ?

Thanks,



Shri
 
I've just looked at it. Yes it is related to design patterns. It is a variant on the factory pattern. Looks like a simpler implementation.
 
thanks. That was exactly what I was looking for. How good are the design patterns books ?
 
It does vary. The original Gang Of Four (GoF) is vary pricy and, on initial reading, I kept on going 'huh'. Very often I had to read the patterns a few times to work things out.

Design Patterns Explained (ISBN 0201715945) takes a lot of the 'huh' out of it and is a lot cheaper than GoF. Also has examples in Java, UML and C++.

I haven't read many others. The rest of the patterns, I've picked up are from the net. Java has some patterns built into its standard library. Visitor pattern is in Java but I had to get the description off the Internet.

About the reflective factory pattern: I'm still analysing it. It is basically trying to use C++ RTTI in the factory. Seems a bit long winded. I'm still trying to figure out what some bits of the reflective factory do. Whenever I've written a factory pattern, it has never been this long, even with RTTI. I'm also not keen on isA and all the statics.
 
The problem with GoF and GoV is that the laugage takes a bit of getting used to. Patterns are just simple problem solution pairs that are taken in a given context, and abstracted so that they work in any given language... It does take a bit of thought to impliement the pattern in a given language, but the princible behind the ideas should be sound.

reflective factory... hmmm... well a factory is a pattern where the constructor of an object is not publicly accessable and called by a nested class that has access to the constructor.
reflective? means it knows what objects of said class are using a singleton array of pointers? *guessing*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top