Forum Post: RE: The Filter service parameter

  • Thread starter Thread starter brianpreece
  • Start date Start date
Status
Not open for further replies.
B

brianpreece

Guest
My view is that the filter should NOT be used to pass a WHERE clause to the BE. This would require the UI to have detailed knowledge of the database at the back end. The whole point of this architecture is to separate business logic from UI. So the filter should be used to pass a message in UI terms of what it requires to be delivered and it is the responsibility of the back end logic to translate this into queries specific to the database used. This means that the same UI can be used with different back ends. Of course, this means you have to define a protocol that is used by the UI to specify its requirements that is interpreted by the back end but that would be necessary anyway. For example, in a product search, "E:999999999999" might mean "find product with EAN code 9999999999", whereas "D:xxxxxxx" might mean "return all products with xxxxxxx in the description". It is then up to the BE to create appropriate queries and to reject filters that don't conform to the published protocol.

Continue reading...
 
Status
Not open for further replies.
Back
Top