Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Domain Searching Using Visitors
Subject:   Dynamic criterions
Date:   2005-06-06 23:08:31
From:   catalean
I was reading your article with great interest and i'm wondering how would you design the search criterions to be dynamicaly build by users and also the results of the search (included columns values in result) dynamicaly choosen by users.


Regards

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Dynamic criterions
    2005-06-07 12:03:03  Paul_Mukherjee [View]

    Selecting criteria dynamically is relatively straightforward; the standard pattern is by default to select a standard set of criteria and then use an advanced options dialog to specify any other set. Whatever the mode of selection, this is the means by which the search criteria objects described in the article are created. (As an aside you can use the GoF composite pattern to create complex families of criteria; using visitors this is easy!)

    Choosing the columns to display in the result is more interesting; a naive approach would simply fetch a standard superset of columns and discard those not needed. However discarding information fetched from the database without using it always offends my sensibilities so I would create a ResultSpecification class that represents the columns to be presented. This would then be used by the visitor to define which columns to fetch from the database.