>But that way, unless I've misunderstood, you don't get the full OO 
>view of the database: e.g. you can't say
>       myEmployee.department().director().secretary().phoneNumber()
>or whatever.  I don't see any way of doing that other than 
>generating java code.
>
>Oh, actually,
>myEmployee.get("department").get("director").get("secretary").get("ph 
>o neNumber")could work, and that could be done completely in memory. 
>Hmmm.  OK, I really should look at the Peer/Map model before 
>speculating further.

The big, big disadvantage of your second example is that you do not 
have ANY compile-time safety with your statements. If you, for 
example, forget your DB naming conventions for a short moment and 
wrote get("phone") instead of get("phoneNumber"), you'd have to wait 
until your system was tested before you found the error.  In your 
first example, you would simply get an error while trying to compile. 
The more compile-time checking is done, the less runtime bug-fixing 
is required.  That's one of the big benefits of Java.

Just my $0.02CDN

Avi



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to