Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

findByCriteria in URLyBird 1.2.1

 
Rob van Oostveen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I was wondering if anybody is also implementing the URLyBird 1.2.1 findByCriteria method with these functions:

* find hotels where Data available is between start and end date?

* find hotels where price per night is between min and max price?

If not, what implications will this have on the grading? The specifications do nog explicitly mention these requirements, except for the following: "..They sell accomodations for business and pleasure travellers at short notice, helping hotels to fill rooms that would otherwise be left empty. They take bookings only within 48 hours of the start of room occupancy."

If anyone knows, please let me know.

Thanks,
Rob
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob

You must stick the documentation because as far as I know the search is one of the must statements. I think (but I'am not shore about it) that I see some people which fall because a wrong (or undocumented) search. But you can still make a trick, implements the search criteria how is required and provides a easy way to extend it.

Regards M
 
Rob van Oostveen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Mihai. I know I have to stick to the assignment. I was just wondering if searching for a specific date is enough. I have finished the findByCriteria and it works very well, but its kinda static in my point a view.

If I was a user I would love to make selection based on date periods. The assignment doesnt say anything about that though. Only thing it says about searching is: "The new application, using the existing data file format, must allow the CSRs to generate a list of accomodations that match a customer's criteria." This is very generic. So the static implementation should be fine then?

Regards,
Rob
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob

I am not shore what you mean by "static implementation", you can implement a flexible search feature by using the strategy pattern. In this way you can provide the needed (must) search criteria and still be free to add any other search criteria (if you consider this necessary).

Regards M.
 
Rob van Oostveen
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mihai,

Thanks for your reply. With "static implementation" I ment sticking with the interface supplied by Sun.

I understand what you're saying and my question about this is just like you are suggesting. Use the strategy pattern. I wonder if this is really necessary or nice to have. In other words, does the grading has any effect on implementing a more flexible search method or not?

Regards,
Rob
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob

Well, is hard to say, except the must statement nothing is really necessary, but - and this is my private opinion - you can lose some points here.
If you use strategy instead of method call is a "sing of good manners" - this is also my private opinion.
And don't forget ague your decisions !

Regards M
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic