Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sigrid Kajdan
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 158
 
Sigrid Kajdan
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Alecsandru,

thanks a lot! The link is really instructive

ciao
Sigrid
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic