• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding the search

 
Stefan Taranu
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
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • 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!
 
Johnny Barbosa
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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic