Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Design Pattern to be used

 
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 ?
 
ranger
Posts: 17346
11
Mac IntelliJ IDE 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
 
author
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
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
 
    Bookmark Topic Watch Topic
  • New Topic