This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Observer and Observable Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Observer and Observable Question" Watch "Observer and Observable Question" New topic
Author

Observer and Observable Question

Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
Hi,
I'm interested in implementing the observable and observer pattern for the server and client network application and standalone one.
Just wondering because it states "A clear design, such as will be readily understood by junior programmers, will be preferred to a complex one" in my specifications, could I automatically be failed for this as the design is slightly more complex?
Thanks.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5233
    
  12

Hi Mark,

If you don't break any must-requirement you won't fail automatically? You may lose some points because you may overcomplicate your solution and end up with a difficult one, but that's certainly no reason why you will fail automatically.

Not implementing the provided interface is one of the reasons for automatic failure

Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
Ya, was hoping to promote reusability across the 3 screens as well seeing there's similar. Is it possible just to ignore this fact and have 3 separate screens?

Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5233
    
  12

Hi Mark,

Don't see any similarity between the server window and the client window. But client window in standalone mode and networked mode are equal in my opinion (only configuration settings are different and that could be solved with showing a different dialog for example).

This thread has also several possibilities to handle similar GUIs (described also my approach).

So you could certainly have 2 (or 3) seperate screens which extend all from some parent class for example, Observer pattern is not a must requirement. I did it with 2 seperate screens (1 for server window and 1 for client window). So there is no difference in the client GUI between both modes, which looks very logical to me: no difference in functionality, only in configuration settings. So why creating 2 seperate screens...

Kind regards,
Roel
 
wood burning stoves
 
subject: Observer and Observable Question