Exforsys

Online Training

pattern to pass/translate search parameters

This is a discussion on pattern to pass/translate search parameters within the Software Patterns forums, part of the Testing category; I'm working on an application that requires some advanced search functionality and I'm looking for an extensible way ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2005, 11:44 PM
bkeepers@gmail.com
 
Posts: n/a
pattern to pass/translate search parameters

I'm working on an application that requires some advanced search
functionality and I'm looking for an extensible way to represent the
search parameters, pass them from the view to the model, and translate
them into something meaningful for the persistance layer.

For example, if I have a "title" constraint, I want to be able to
specify the value for title, pass it (along with an unlimited number of
other constraints) to my data access layer, and it knows that it needs
to append "where title = 'value'" to the search query. If I want a
"time" constraint, the user can specify a start date and an end date,
and I want to pass it, along with the "title" constraint, to the data
access layer, and it knows to append "where title = 'value' and date >
'2005-03-01' and date < '2005-04-20'".

Originally I thought that the interpretor pattern might be a good way
to solve this, even though that's not exactly what it is intended for,
but the more I think about it, the less comfortable I am with that.
Some suggested to me to try the command pattern, but I just don't see
how that would work.

Does anyone have any ideas for how to solve this?

Thanks,
Brandon

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-10-2005, 12:41 PM
paperless
 
Posts: n/a
Re: pattern to pass/translate search parameters

mediate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:04 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.