• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search Results

 
Jonathan Wright
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making some design decisions about my TableModel and would appreciate some feedback regarding whether or not results should be ordered. Is it overkill to give the client the option to specify the ordering of their search results prior to a search and also after results have been displayed.

In a real world application I would implement this kind of functionality but for this exam its hard to know!
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tend to believe that that would be overkill. One of the problems I had while doing this assignment is thinking too much on how a real-world application would work, which resulted in me spending way more time on the assignment than necessary. My thinking is that if it's not a requirement, then it's out of scope, and therefore I'm not going to do it unless my application fails to work without it. Remember, there are no extra brownie points.
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I provide the option to sort after the records had been returned, so as not to add on to the server's processing load.

Regards,
Clivant
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I sort the results, merely for my own comfort, after I have read the search results (also client-side). I did this by implementing the Comparable interface on my Contractor class and storing the search results in a TreeSet.

I have considered allowing the user to sort the results on any field, but I have rejected this, because I think it goes beyond the scope of the assignment.

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