• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Regarding the search

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ranchers,

Regarding

It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.



I did that in the GUI (on the client side) . That is, I extended the RowFilter, and filtered the records directly in the view according to the rules above.
Is this ok? Or should I have done it in the business layer or on the server...?

Best regards,
Stefan
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Stefan!

Well... I'd say it is better to implement these rules in the business layer. If so, you can get the same .jar file tomorrow and use the classes in a web application without any problem. The thing is, this way, you have more reusability!
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Roberto Perillo wrote:Well... I'd say it is better to implement these rules in the business layer. If so, you can get the same .jar file tomorrow and use the classes in a web application without any problem. The thing is, this way, you have more reusability!

Exactly!

So, would be good you wrap your search parameters inside of one object like pattern "Value Object", and transfer it between the layers. This way, It will help validate all parameters in any layer, any time.
 
Don't listen to Steve. Just read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic