Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design Pattern to be used

 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
John Chien
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. I will not try to take design pattern too seriously. The importance is to get project working as directed in the assignment instruction.
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic