wood burning stoves 2.0*
The moose likes Certification Results and the fly likes Passed SCJD URLyBird 1.1.2 398/400 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Certification Results
Bookmark "Passed SCJD URLyBird 1.1.2 398/400" Watch "Passed SCJD URLyBird 1.1.2 398/400" New topic
Author

Passed SCJD URLyBird 1.1.2 398/400

Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
I just received my results today - 398/400.
Both points were lost on general considerations.

I'm really happy, and I just wanted to brag a little bit about it (although, it's true, I expected a full 400/400 )
I don't have the time right now to write details about my implementation, but I promise I'll come back with them in a day or two.

Many thanks to all those who wrote on this forum, now or in the past!


SCJP 1.4 100%
SCJD 99.5%
Jari Timonen
Ranch Hand

Joined: Jan 16, 2004
Posts: 230
Alecsandru Cocarla wrote:I just received my results today - 398/400.
Both points were lost on general considerations.

I'm really happy, and I just wanted to brag a little bit about it (although, it's true, I expected a full 400/400 )
I don't have the time right now to write details about my implementation, but I promise I'll come back with them in a day or two.

Many thanks to all those who wrote on this forum, now or in the past!




SCJP 5.0, SCJD URLyBird 1.3.3, OCMJEA 5 (SCEA) Factory Homes
Anne Crace
Ranch Hand

Joined: Aug 29, 2005
Posts: 223
You should brag... a lot! That is quite an accomplishment.


SCJP, SCJD
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
As promised, some details about my implementation:

- Three layers architecture.
- Used RoomVacancy DTO instead of plain String[].
- Data class is a Facade, it's not a Singleton. However, it delegates to the two singletons of my application: RecordLockManager and DataFileAccessManager
- I added runtime exceptions to the DB interface, whenever I felt like I should - for example I added DatabaseAccessException. No error codes, no wrapping of IOException in RecordNotFoundException.
- No record cache. All calls execute directly on the database.
- One RandomAccessFile, all calls which read or update the file are synchronized on this instance.
- The record number is the primary key
- Deadlocks avoided by specification included in the DB's interface javadoc (the lock() method). My services always lock one record at a time.
- I had a RecordFormat class containing constants about the field lengths. The database schema is not read or updated dynamically.
- One lock per record, without hand-over-hand (see http://www.coderanch.com/t/418337/Developer-Certification-SCJD/certification/locking-Hand-over-hand-remove for details)
- Only System.nanoTime() used for cookie (no random stuff)
- Filtering: by name, by location, or by (name AND location). No filtering by (name OR location) provided.
- Filtering only bookable rooms was provided - bookable = not booked, in the future and obeying the 48 hours rule. This rule was implemented in the business layer.
- RoomVacancyFilter object used instead of separate filtering parameters or String[].
- User is not able to book non-bookable rooms (but can see them all).
- In order to avoid RemoteException in my local services implementation, I chose the following design: Services interface, declaring RemoteExceptions. The LocalServices interface extends Services, but without the RemoteException. The LocalServicesImpl impements LocalServices. The RemoteServices extends both Services and java.rmi.Remote.
- Networking with RMI
- MVC inspired by HMVC, but seriously changed and modified for my project's needs. http://www.javaworld.com/javaworld/jw-07-2000/jw-0721-hmvc.html - I recommend this reading!
- M, V and C clearly separated. Almost all Swing code is in Views. The Model does not contain Swing code at all (no table models, no Documents).
- Used Actions instead of ActionListeners wherever possible.
- No background threads, everything happens in the dispatcher thread.
- Hardcoded labels and messages.
- Implemented a PositiveIntegerDocument, which only allows positive integer input from zero up to a configurable maximum value. This is quite different from the one in the book, in that it does not allow any errors like the ones described in http://www.coderanch.com/t/418338/Developer-Certification-SCJD/certification/Errors-SCJD-Exam-with-JSE - point 6.
- Tooltips and mnemonics for everything.
- Status bar and menu bar.
- Table was not sortable.
- A lot of care for testing what happens with the GUI when various errors happen. You can make your code throw exceptions in various places and see if your GUI can handle it.
- Used the default Java 6 look and feel
- Programming to interfaces - almost everything has an interface. My project has more than 60 java files, and probably around 1/3 are interfaces.
- Documentation - no method or class without complete javadoc (method, parameters, return values, exceptions). Javadoc generated for protected level.
- Logged everything, with configurable loggers.
- Unit tests for almost everything except GUI. Here are some of them: http://www.coderanch.com/t/418342/Developer-Certification-SCJD/certification/Data-class-multithreaded-load-test
- Application was tested on Windows and Linux, Linux makes it easier to test what happens when you don't have writing rights for the current directory.
- User guide (html) was quite a complete description/specification of the application: from prerequisites, running, general workings of the application (like what's a mnemonic, what TAB key does, how to access the menu bar using keyboard etc) to the various screens functionality, with screenshots.

If you have any questions, feel free to ask.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5222
    
  12

Congratulations Alecsandru

could you give a little example of how you declared a method in each interface, because i'm getting a bit confused of your explanation

In order to avoid RemoteException in my local services implementation, I chose the following design: Services interface, declaring RemoteExceptions. The LocalServices interface extends Services, but without the RemoteException. The LocalServicesImpl impements LocalServices. The RemoteServices extends both Services and java.rmi.Remote.



SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
Just an example:

Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5222
    
  12

Alecsandru,

Thanks for the example. I just had to think a little bit harder myself and i would have discovered the overridden method myself

But why not just use Services for both the local and the remote interface. because an exception in the method declaration indicates that the method could throw that exception but is not a must

Hoping to score a little bit, better than you: i would say 2 points, or maybe 3 points to make it even more unbelievable

Kind regards,
Roel
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
Roel De Nijs wrote:Alecsandru,
But why not just use Services for both the local and the remote interface. because an exception in the method declaration indicates that the method could throw that exception but is not a must

Because I did not want my local services implementation to depend on RemoteException at all. At any moment, I can throw away the Services interface, and just use LocalService as my main interface, if needed.

Anyway, it's just a matter of taste, I guess...

Thanks for the congratulations! (not only you, but to all those who wrote here )
mohamed sulibi
Ranch Hand

Joined: Sep 04, 2005
Posts: 169
Congratulations

best regards
Mohamed Sulibi (from 1/8/2007 till now)
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5222
    
  12

Alecsandru Cocarla wrote:
I can throw away the Services interface


I guess that you have somewhere in your code
Services services = (appMode="standalone"?getLocalClient():getRemoteClient());

or something a bit more readible then throwing the Services-interface would be a little bit stupid? or did you work with LocalServices and RemoteServices in your client?

And another question: did you expose locking methods to the client? or did you just used a bookRoom and findRooms method?
Alain Dickson
Ranch Hand

Joined: Dec 08, 2008
Posts: 53
Congrats Alecsandru

I have a quick question: Did allow user to search for any name and any location i.e (load all records into JTable)?

Alain
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
congrats -

off to the results forum


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

congrats!!


Krishna Srinivasan
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
Roel De Nijs wrote:
I guess that you have somewhere in your code
Services services = (appMode="standalone"?getLocalClient():getRemoteClient());

or something a bit more readible then throwing the Services-interface would be a little bit stupid? or did you work with LocalServices and RemoteServices in your client?

Of course, my client code depends on RemoteException. Throwing away the Services interface cannot easily be achieved within the current application, since I'm using RMI anyway. But, at any time, I could use LocalServices for something else, which does not work with RMI.

Anyway, my main concern was to have an interface for my local implementation which does not depend on RemoteException, just because I felt like this is how it should be...
Roel De Nijs wrote:
And another question: did you expose locking methods to the client? or did you just used a bookRoom and findRooms method?

Of course not. Why would I have a three layer architecture then?

Alain Dickson wrote:I have a quick question: Did allow user to search for any name and any location i.e (load all records into JTable)?

Yes. As I said - the user can see any records, just can't book all of them.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5222
    
  12

Alecsandru Cocarla wrote:
Of course not. Why would I have a three layer architecture then?


It was just a question regarding some remarks Andrew Monkhouse made because i was planning to create a business layer with a bookRoom and findRooms method.

you don't really have a 3 tier system - you have a 2 tier system where you have logically put the business logic in the same tier as the database. You may have separated the business logic into it's own packages (which would be a good thing), but that in itself doesn't make it a 3 tier system. You could similarly have the business logic in it's own package in a thick client system (which would allow for reuse).


And also regarding this thread.
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
Yes, I think I've read that thread some time ago... But I decided to stick to a 3 layer architecture. And lock methods are not provided in my Services interface. I had something like find(), book(), isBookable() and getRoomVacancy(id) in this interface.
thuy nguyen
Greenhorn

Joined: Aug 02, 2008
Posts: 15
Congratulations!

When did you submit your project? I did mine, took essay 6 weeks ago but still not heard back from them.
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
I had my essay in January, and got the results back in exactly 4 weeks.
What I did is sent them an email right after the essay exam, requesting to know if everything went all right (upload), and informing about my taking the essay exam. I don't know if sending this email helped in a faster grading...
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
Amazing!!!

What was your strategy to change the jpanels? Did you use CardLayout?
Naveen Narayanan
Ranch Hand

Joined: Sep 11, 2007
Posts: 114

Congratz


SCJP 5.0, SCJD, SCWCD
Juee Doo
Ranch Hand

Joined: Sep 26, 2008
Posts: 232
congratulations
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Congrats on the passing. URLyBird is tough!

-Cameron McKenzie
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
Thank you all!!

Leandro Coutinho wrote:Amazing!!!

What was your strategy to change the jpanels? Did you use CardLayout?

No, because from the program's parameters you already know what the layout will be, so there's no need to switch some panels at runtime.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5222
    
  12

Alecsandru Cocarla wrote:
What I did is sent them an email right after the essay exam, requesting to know if everything went all right (upload), and informing about my taking the essay exam. I don't know if sending this email helped in a faster grading...

I also sent a similar email and I got my grade also in exactly 4 weeks
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

Congratulations!

-Cameron McKenzie
mayuresh chaubal
Greenhorn

Joined: Dec 15, 2005
Posts: 12
congrats..
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
Congrats and keep up the good work


Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passed SCJD URLyBird 1.1.2 398/400