48 Hour Rule - Make it optional in the server gui?

I was thinking of making the rule optional on the server side business logic layer.. and putting an option in the GUI

Checkbox * Display only hotel records available within a range of hoursTextField * No of hours

What do you think?

Steve Baranski

Greenhorn

Posts: 16

posted 10 years ago

I think your idea deviates from the spec somewhat. I admire your initiative, but I think you're inviting more scrutiny than you might want.

There's validation of the hours (>=0, numeric), and how do you intend to address the question of time. Are you using server time as local, or GMT? There is a topic before about world timezones, where someone (Andrew, if I recall) provided an example you can take some flights here on Earth and actually arrive local time BEFORE you departed. Plus, what does this threshold time actually define? What time of day on the date available? Most hotels have varying check-in times (e.g., 3:00 local, etc.). Do you know what time zone the Castle Hotel in Paravel is in?

If you pursue this route, I would advise you to address some of the issues present. Otherwise, I would err on the side of simplicity. Besides, 48 hours rounds pretty well to a number of calendar days, right?

Steve Baranski<br />SCJP, SCWCD, SCJD

Alan Mc Kernan

Ranch Hand

Posts: 59

posted 10 years ago

I was hoping to have a BizService layer.. each client will get a BizServiceImpl (remote objects.. run on a server) and thus they would use the server time.

So it would be return results System.getTime() <= availableDate <= System.getTime() + 48 Hours. And state in the choices.txt there is only one time-zone - the server timezone.. all dates are relevent to the server timezone.

Ideally I'd ignore this rule - but could face an auto-failure.. And in reality I dont want to use the rule cos it makes testing more difficult. So make it optional and thus hopefully win both battles.