Forums Register Login

OCMJD Passed

+Pie Number of slices to send: Send
Hey ranchers,
Just thought I'd let you all know I passed - yay!
I'd like to thank the great people who contribute to this board, probably wouldn't have made it without the valuable amount of information contained here
In particular I'd like to thank first and foremost both Roel De Nijs and Roberto Perillo for their dedication and commitment to answering questions on this board - it must get so repetitive hearing the same things all the time but it helps!
I'd also like to thank others on this board, like Michael Grossenbacher, Alecsandru Cocarla and Pedro Kowalski for their contributions.

So a few details about my project:
General
- I had URLybird (not sure which version).
- Started around 12/06/2010, submitted on 09/11/2010. It actually took me while to get into the swing of things, initially, but I eventually found motivation
- 58 Java Classes total
- Used a modified version of Roel's ant script to compile, run pre-build tests, assemble and run post-build tests
- Used TestNG for unit tests
- Used Windowlicker for Swing GUI tests.
- Used Mockito for mocking and stubbing of Objects.
- 3000+ Unit tests (most of them were parallel tests on the Data class).
- Used a three-tier architecture.
- Only produced plain-text documentation (no HTML) for user guide.
- Avoided statics and singletons where possible - relied on dependency injection for testable code - see here.

Data layer
- Used a record cache (so much easier than an IO based solution)
- Used Immutable Room objects to model the data.
- Statically defined the database schema
- Implemented logging in this layer.
- Did NOT synchronize all methods of the Data class - used Thread safe data structures in java.util.concurrent.
- Created my own Thread-safe LockableRecord class which stores lock cookie, lock state and acts as a monitor.

Service layer
- Used RMI
- Only defined two methods - bookRoom and findByCriteria
- Used Factory pattern to control how Services are constructed for the Presentation layer
- Did NOT use any singletons

GUI
- Kept it really simple and minimalistic
- Validated input where possible - e.g. no letters allowed for the port number field, or customer id dialog.
- Tooltips and Mnemonics everywhere.
- No icons.
- No contextual help.
- No GUI when running in Server mode.
- Encapsulated long running tasks within a modal, task running dialog - so as to not block the GUI.

And that's about all I can really think of. I'll post up my Data layer tests if people are interested - let me know by posting comments if you'd like to see them or not ;)

Cheers,
Jason
+Pie Number of slices to send: Send
Congratulations Jason

Thanks for the kind words

3000+ unit tests, that's really impressive.
+Pie Number of slices to send: Send
Howdy, Jason!

Great news, champion! Congrats for the achievement!!! We're happy for you!!!

it must get so repetitive hearing the same things all the time but it helps!



Well, after sometime, we have already answered the same (or almost same) questions... so we can point people to other threads that address the candidate's problem, so we can save some time too


- Did NOT synchronize all methods of the Data class - used Thread safe data structures in java.util.concurrent.
- Created my own Thread-safe LockableRecord class which stores lock cookie, lock state and acts as a monitor.



You know what, today I think that it is a better approach, even though performance is not a requirement in this certification. As you mentioned, I'd avoid using singletons too. I am tech member of a brazilian Java magazine called MundoJ (it used to be MundoJava, but it is currently addressing subjects other than Java too), and recently we had an interview with the GoF. One of the patterns they said that they would drop from the catalog is the Singleton pattern if there was a second edition of the book. They also said that they would include DI and Type Object.

I also think it is fancier to use the java.util.concurrent API
+Pie Number of slices to send: Send
+Pie Number of slices to send: Send
Congratulations mate! :-) Well done!

+Pie Number of slices to send: Send
Congratulations
+Pie Number of slices to send: Send
congrats
Then YOU must do the pig's work! Read this tiny ad. READ IT!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1470 times.
Similar Threads
How to cope with situations that should never occur?
Question from Andrew's book
Data class multithreaded load test (UB1.1.2)
Is Mockito like Junit?
Unit testing Singletons and/or "static" classes and possible alternatives
How to Design For Testability
JUnit Testing
Last Minute Checks before submission!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:49:29.