• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two questions: properties file and booked room

 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all:

first question - properties file: I have a properties file(not suncertify.properties), include some default value for my program, such as column number, host name(the first run this program, after this, will read the data from suncertify.properties), port number(same as pre)...I don't support any GUI to edit it, because it needn't edit(if I hard code these value in some class, it work too). I don't know whether this break the assignment rule -
all properties must be set through a GUI
?

second question - To now, I'm not sure whether you can book a room has been booked. I lean to not, but I remember Ken has told us he allow that. He said our application should allow the CSRs to modify the book room if they take some mistakes or someone don't want to book the room any more. I think since the assignment don't tell us the booked room mustn't be booked again, so we can leave it alone and don't take care it. What do you think?

Please tell me your idea, thanx, thanx a lot.
 
Omar Kalaldeh
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leo,


first question - properties file: I have a properties file(not suncertify.properties), include some default value for my program, such as column number, host name(the first run this program, after this, will read the data from suncertify.properties), port number(same as pre)...I don't support any GUI to edit it, because it needn't edit(if I hard code these value in some class, it work too). I don't know whether this break the assignment rule

I think it is always better to be in the safe side, hard code your default data.


second question - To now, I'm not sure whether you can book a room has been booked. I lean to not, but I remember Ken has told us he allow that. He said our application should allow the CSRs to modify the book room if they take some mistakes or someone don't want to book the room any more. I think since the assignment don't tell us the booked room mustn't be booked again, so we can leave it alone and don't take care it. What do you think?

I don't think you should allow it, look with me in the following scenario:
There are two clients who made search in the database, the result was record 7 is not booked, now both clients sees record 7 as not booked record, lets say that both clients tried to book that room.

If you are allowing a rebooking operation, the first client will book the room, then the second will rebook it again, now both clients think he is the one who booked that room, while it is the second client who really booked it.
If you prevent the rebooking operation, you will return to the second client the room is already booked.

So I think allowing rebooking, is a bit risky as business logic
 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Omar:

Thank you for reply.

I think it is always better to be in the safe side, hard code your default data.


Yes, but hard code will meke the code ugly and reduce the application persistence, so I think this way.

So I think allowing rebooking, is a bit risky as business logic


I agree you here again. But these are a lot of thread talk about it, and someone don't support this and get a high score, like Ken. So I confuse here whether we should implements this limited. If yes, why we must implement it?

Thanx.
 
Omar Kalaldeh
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leo:
There is no right or wrong answer for such things; it is more of how you see things and how you will be able to justify your choice.

In your choices document if you showed you are understand the problem and understand the consequent of your choices that will be enough, what ever your choice was. What you choose depends in your personal view.

For example with our problem here, if you chouse to prevent re-booking, you must at first define the problem and the choices you have, then you must justify your choice, if I chouse to prevent blocking I will justify it by saying safety of the business logic is important for me, and as for correcting a user mistake, I can in the future adds functionality to update database records.
 
Leo Tien
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Omar:

At the second question, I will agree with you.

At the first question, I want get more advice here.

Thanx.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic