Under review

Factory or Bridge ?

David Lewin il y a 3 ans mis à jour il y a 3 ans 2

The book is fascinating and clear, but I often see many patterns for my problems. 
There is one problem that I can't figure out which patterns should be implemented. I intend to develop a GUI that would manage parameters through a parameters "manager". This is for different kind of electronic modules in a system. I'll use a computer as a simple example. You can have different kind of modules in there : video card(s), sound card(s), hard drive(s) and so on... .
The purpose of the software is to have a GUI to manage settings for any of these modules that can exist in 0,1 or many times.
This Gui can read or write the settings for each identified module
I can deliver a final version but users may (and they do) require some changes
Besides, what if a user wants a special modified version of a settings ?

So knowing that I intend to use the Python framework Django for Web GUI purpose and Python for coding the parameter manager to access to parameters : does the Factory or the Bridge apply in this case ?
Under review

Hi David!

To be honest with you, if I programmed such a thing myself, I wouldn't have a decent idea about whether or not a pattern can be applied there until later in the project: when I have a better understanding of how the actual GUI would look like, how this all be handled between requests, etc. I would probably implement the first version in a very straight-forward (e.g. fast and crappy) way to discover all hidden implications of the thing I'm building. Later, I would think about whether it makes sense to apply some of the patterns and refactor my existing code to that pattern.


Thanks for the answer Alexander. I was about using the quite same approach myself before reading. 

PS : I've read the French translation of the book. I'd recommend keeping all the class/method/etc things related to development as English words. Translate them is not relevant and confusing if the drawings are still in English