• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

UrlyBird - the effect of 48 hours? please do not ignore my question

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Could you please help me with that (English is my second foreign language)

It was mentionned in my assignement spec :
"They take bookings only within 48 hours of the start of room occupancy"

What is the effect of that in my booking procedure?
Can I ignore this statement?
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a business rule that must be implemented.
Basically it means if the availability date of the room is today, tomorrow, or the day after tomorrow, the user can book the room. Otherwise the system should not allow the room to be booked.
[ March 23, 2006: Message edited by: B Chen ]
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there are two ways you can handle this requirement.

1) Filter Records in the business layer (not in the DB layer), so that only rooms that are available within the next 48 hours are displayed in the GUI.

2) Display all records but if a user selects a room that is not available in the next 48 hours, display an error message.

I personally have gone for option 1 (filtered the list on date) as I don't believe it is user friendly to display a room which may be available in a months time.

Jason.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jason,

is the business layer between the gui and the data class?

if so, i should send my searchEvent code to this layer who will filter the results returned by the data layer before sending my gui the long[] of acceptable records?

- the uber newbie

i am getting pretty close to finishing.

but i want to tweak the design.

then download and learn 'junit' for final stress testing.
[ March 25, 2006: Message edited by: tom smith ]
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess it depends on your design... I decided to implemented a Business Layer as I think it's good practice to separate the business logic from the presentation layer (in our case a Swing GUI).

Imagine if the IT director came to you in a few months with a requirement to Web enable the application, if you have seperated out your logic it would be quite straightforward to create a Front Controller for the web application and then reuse all the existing logic.


if so, i should send my searchEvent code to this layer who will filter the results returned by the data layer before sending my gui the long[] of acceptable records?



Yes, your searchEvent method in the GUI controller class should call the business layer to retrieve matching records. I would recommend that your business layer doesn't just provide the long[] back to the GUI layer, but instead call the read method for each record and return this information back to the GUI.

The more you abstract the functionality from the different layers the more flexible your design will be.

Jason.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Originally posted by Jason Moors:
I think there are two ways you can handle this requirement.

1) Filter Records in the business layer (not in the DB layer), so that only rooms that are available within the next 48 hours are displayed in the GUI.

2) Display all records but if a user selects a room that is not available in the next 48 hours, display an error message.
Jason.



(the english is my second foreign language too)
I would prefer another option based on the first one.
I would display all records matching user's search criteria, but the unavailable ones could be marked for instance with red color. The tray to book these records should invoke an error message. (The "booking button can bee disabled as well)
The reason: User can bee confused with an empty search result especially when he knows that such a record exists.

SCJP 1.4
SCJD - URLyBird in progress
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I understand correctly, I think you are recommending filtering the rooms based upon the 48 hour availability rule, but then displaying the booked rooms?

I personally think this would be more confusing for a user, displaying a large number of records, when they can actually only book a few. If you compared this to the real world, if you tried to search for a room for on Expedia for the 28th March, you wouldn't expect it to display hunderds of booked rooms, only the ones that are available.

I guess you could argue that the system is for agents not end customers and therefore they may want to unbooked rooms etc, but I think this is outside of the requirements.

Jason
[ March 28, 2006: Message edited by: Jason Moors ]
 
Robert Vilhelm
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Originally posted by Jason Moors:

I guess you could argue that the system is for agents not end customers and therefore they may want to unbooked rooms etc, but I think this is outside of the requirements.

Jason

[ March 28, 2006: Message edited by: Jason Moors ]



Background says:
URLyBird wants to move into Internet-based marketing, and hopes to be able to accept bookings direct from customers over the web.

I thing this is the point,
thank you.
Robert
PS: I looked over this sentence (It is spoken about CSRs a few sentences above).
 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my design you will see all records according to search criteria. If you just filter records according to 48 hours and ignore search criteria you might loose points (correct me if I am wrong)

Now display all records according to search criteria but display error message (dialogue window) when user select record, which fall under 48 hours rule.
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ken,

I implemented the int[] find(String[] criteria) method in tha Data class to return all records that match the criteria. However in my business layer I filter on date and records that have booked.

I guess it depends on how you interpret the requirements.

They take bookings only within 48 hours of the start of room occupancy


The GUI does not support searching by date, so I have decided to filter based upon the 48 hour requirement as there could be records in the database for rooms that were available 3 months ago, and I don't think it makes sense to display these rooms.

I'm not saying my approach is right, but personally think having hundreds of records that are not available is not very user friendly, i.e date of availability in the past or in the future, or already booked.

I'm sure you approach is also valid, it's just that I think it will not be clear to the user which rooms are available or not.

As long as you can justify the reason for your decision I'm sure you will not lose marks.

Jason.

[ March 31, 2006: Message edited by: Jason Moors ]
[ March 31, 2006: Message edited by: Jason Moors ]
 
Jason Moors
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found this post which seems to imply that people have taken both approaches.

48 Hours Rule and Search
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic