I'm happy to announce that I was approved in URLyBird
My score was:
General Considerations: 100
Documentation: 70
O-O Design: 30
GUI: 27
Locking: 44
Data store: 40
Network server: 30
Total: 341
I would like to thank all the forum for help !
A special thanks to
ROEL DE NIJS,
ROBERT PERILLO and
JULIO CESAR MARQUES for all attention and help ! Thank you guys !! you are amazing !!
Here my choices overview:
DESIGN
Architecture
* 3-layer GUI->BUSSINES->PESISTENCE->FILE.db.
Designer Patterns
* Singleton, Adapter, Transfer Object, Factory and Template Method.
Exception Handling
* Object exceptions approach instead of return error codes.
Error Messages
* I decided to separate all the error messages in a specific class. Each layer has yours.
SERVER
* RMI
* I chose :
- not to let the user choose or change the database file when connected remotely.
- Implement shutdown hook.
PERSISTENCE LAYER
File Acess
* Database handler with just 2 classes:
- One class implements mandatory interface and manages access to the file.
- Another utility class that encapsulates all details about the database schema.
* Hard-Code Database Schema.
* No Cache.
* I decided throw a RuntimeException instead of encapsulate the errors occurred in the exceptions defined by the mandatory .
* I decided to validate the magic cookie(hard code) preventing the user enter an invalid database file.
* I decided to use the file position as primary key.
* I decided not to reuse the deleted primary.
* DuplicateKeyException will not be thrown resulting from the choice not to reuse the deleted primary keys.
* Search engines was: 2 'for' statement and String.startsWith().
Lock
* Synchronized methods, Object.notifyAll() and singleton patter approach instead java.util.concurrent api.
* Cookie approach to identify the lock owner.
* System.nanoTime() to generate lock .
BUSSINES LAYER
Bussines Exceptions
* I created a base exception class that represents all the errors occurred within the layer instead of creating several different classes.
Bussines Methods
* I decided not to provide methods to insert, update, delete and unbook.
* I decided to make two separate search methods instead of one.
* I decided to implement the AND criteria logic within the business layer instead of the view layer
* I decided to implement the OR and AND criteria logic with just one method, using an criteria object instead of two separated methods.
Book Method
* I decided to implement a validation that checks the availability of the room.
48 Hours Rule
* I decided not to implement anything about the "48 Hours Rule".
VIEW LAYER
GUI Texts and Error Messages
* I decided to separate all the error messages in a specific class.
* I decided to separate all the GUI texts - titles, labels, mnemonics and tool tips in a specific class.
* No MVC Patter
* No Background Threads
* I decided only used default java 6 look and feel
* I decided to use the following layout managers:
1)Default BorderLayout.
2)FlowLayout.
3)GridBagLayout.
* I decided not to use any input mask, leaving the user type everything and implementing validation in each layer.
* I decided not to load all the rooms in the presentation of the main GUI.
* I decided not to provide insert, update, delete and unbook GUI functions.
GENERAL
* I decided not to implement anything that would solve the following situations:
1)Lost locks.
2)Dead Lock.
3)General lock on the database during the shutdown.
4)Client crashes.
5)Sorting columns.
6)Paging data.
7)Notify view layer about nonrepeatable read.
* No Log
* No Code Comments
I'm sorry but...I'll not be here cause I'm going to to SCDJWS and finally
SCEA.
I'll be happy to answer any questions.
See you around