Hello: We are encouraged to use design pattern in the SCJD exam. What are the most recommended design pattern to be used ? 1) GUI - MVC (certainly) 2) Remote Communcation ?? (Facade, Business delegate, Value Object ... ???) 3) Database access ??? (Data Access Object ???) Any suggestions ?
You will find that you will use MVC, Factory, Facade, Proxy, which is really just the RMI stuff, and maybe Builder. I had a Builder but you might not need this. You do not need to use Singleton, as Peter will have a field day on you if you do. Mark
Originally posted by Mark Spritzler: You do not need to use Singleton, as Peter will have a field day on you if you do.
Depends where and how it's being used, Mark, it just depends. But, yes, Singleton is the most abused pattern (and not only in this project). John, I would not really recommend that you start by thinking up the patterns you're going to use -- you are likely to end up over-engineering as a result. Do familiarise yourself with all the major patterns. Then do your design without trying to shoehorn a single pattern in there, let alone the entire GoF book as some seem to do. Start out with a blank page and think about your design. Often, you will be thinking about a problem and remember a specific pattern that fits the problem. At other times, as the design is taking shape you will suddenly recognise a pattern emerging, which will help you firm up the design and discuss it with others. This is not the Java Petstore which tries to illustrate as many patterns as humanly possible in one small application (and thank G-d it isn't; whoever inflicted the Petstore on the Java world has something to answer for). - Peter
posted 17 years ago
OK. I will not try to take design pattern too seriously. The importance is to get project working as directed in the assignment instruction.
Well, you should take it very seriously -- the point I'm trying to make is that your design needs should drive the patterns you use, not the other way around. Some developers who've just discovered patterns turn their design into pattern showcases. - Peter