• 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 1.3.2 : find method ambiguos

 
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I have a bit problem with find method in URLyBird. the interface written like this :



but in the User Interface criteria is written like this:




See the differents? in the interface, the word "Fred" matches with the word "Freddy", but in the User Interface section wants me to search where the name and/or location fields EXACTLY match values. It means "Fred" match "Fred" but not match "Freddy"

what should I do? Do I have create an private adapter method ? Or do I have to choose only one? Or what? Thanks for the answer.


Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2)
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well..
i implemented following searches...
1.by name only
2.by location only...
3.by name and location(match both)
4.by name or location(match either of them)

i interpreted 'exactly' as a case-sensitive search....
meaning Fred would match Fred,Freddy but not fred or fRed....

you explain this in choices.txt...
hope i have been helpful
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeffry,

I see no problem with those specifications, as they are for 2 completely separate parts of the deliverable.
  • Data access deliverable


  • Completely data agnostic. Designed to be as flexible as possible for potential reuse.

    You happen to be planning on using your Data class with data that matches Hotel reservations. But as long as the schema matches, there is no reason why the same Data class could not be used for Client data, or Contractor information, etc.

    For this reason, it makes sense for the methods in the Data class to be as flexible as possible. The read method returns an array of Strings, not an URLyBird data access object. The update method will allow you to update any field, not just the customer number field. And the find method searches in any field for the widest possible matches, which allows desired restrictions to be implemented where they make sense: in the business methods.

  • End user application


  • Once you are working within the client GUI, it makes sense to deal in terms of known data. So at this point you know that you are dealing with Hotel reservation data, not Clients, Contractors, or any other type of data.

    So your client GUI is going to be very specific in what it allows. You do not allow updates on any field - only on the field that stores the customer number. You do not allow creates or deletes of records. And the find method used by the client GUI (which is not the find method on the server (although it uses it)) restricts to an exact match.
    Did that make sense?

    Personally I suspect the reason this keeps coming up is because the entire specification has been delivered in a single document for a single developer to work on. In an ideal business environment this is less likely to happen: you might only be given the Data class to work on, while another person is working on the server, and yet another person is working on the GUI. Or you might still work on all the parts, but they would be handed to you piece by piece - so this month you develop the Data class, next month you are given the specifications for the server, the following month the specifications for the GUI.

    Hmmm. Perhaps this should go in the JavaRanch SCJD FAQ

    Regards, Andrew
     
    Jeffry Kristianto Yanuar
    Ranch Hand
    Posts: 759
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Andrew, I think I'll use similar solution with Rohan's solution.


    well..
    i implemented following searches...
    1.by name only
    2.by location only...
    3.by name and location(match both)
    4.by name or location(match either of them)

    i interpreted 'exactly' as a case-sensitive search....
    meaning Fred would match Fred,Freddy but not fred or fRed....



    But there is another problem, assuming I already implemented find method, that method only return an array of int, but the user expects to see the list of matching records.

    I think the result of find method which is an array of int will be used by the server to return a List of Hotel object based on the each record number from that array of int. right?

    Jeffry Kristianto Yanuar
    SCJP 5.0
    SCJA
    SCJD (Working on UrlyBird 1.3.2)
     
    Greenhorn
    Posts: 4
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I just downloaded my assignment today, but it's URLyBird 1.3.1. What's the difference between 1.3.1 and 1.3.2?

    Thanks.
     
    Jeffry Kristianto Yanuar
    Ranch Hand
    Posts: 759
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    maybe the interface and the requirements is a bit different
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic