aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Urly Bird: in which tier(s) to use a custom book() method and use value objects? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Urly Bird: in which tier(s) to use a custom book() method and use value objects?" Watch "Urly Bird: in which tier(s) to use a custom book() method and use value objects?" New topic
Author

Urly Bird: in which tier(s) to use a custom book() method and use value objects?

Sigrid Kajdan
Ranch Hand

Joined: Jan 14, 2007
Posts: 72
Hi all,

I want to add a custom bookRoom() method (encapsulating lock-update-unlock) and also custom methods that operate on HotelRoom objects instead of String arrays.

However, I don't know in which layers these may be present, and in which layers I have to provide the String[] and raw update, delete etc... methods.

I am planning the following:

Database layer (Data.java):
provide all Sun-specified methods, have the bookRoom() and HotelRoom-taking methods as a complementary option

GUI layer:
provide only bookRoom() and HotelRoom-taking methods (I wonder if this is accepted?)

Network layer (sockets in my case):
Here I'm unsure - I would need the custom methods from the GUI of course, but do I need the raw Sun methods/objects?
If I need both, this will make the application protocol quite ugly...
Could you advise me, what do you think?


As an aside, I also am not sure about how many value objects to provide. A HotelRoom, Hotel, and a Customer object (of which we'd use the id only), is this already too much?

Thank you for any help,
Sigrid
Sigrid Kajdan
Ranch Hand

Joined: Jan 14, 2007
Posts: 72
Hi again,

having browsed and read some very good and helpful old threads about this subject and the general question 2- or 3-tiered architecture in the meantime, I would very much like to know the "current state" today, some 5 years later...

Does anyone know the "results" of the old discussions, and how do you - who are working on the assignment now are have finished recently - handle this - do you use lock() methods from the client, and do you include them in the network layer?

I'd be grateful for any answers
Alecsandru Cocarla
Ranch Hand

Joined: Feb 29, 2008
Posts: 158
Check this out: http://www.coderanch.com/t/141585/sr/certification/Passed-SCJD-Points


SCJP 1.4 100%
SCJD 99.5%
Sigrid Kajdan
Ranch Hand

Joined: Jan 14, 2007
Posts: 72
Hi Alecsandru,

thanks a lot! The link is really instructive

ciao
Sigrid
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urly Bird: in which tier(s) to use a custom book() method and use value objects?