Solved

Implementing Search in object oriented design

Posted on 2014-12-11
1
127 Views
Last Modified: 2014-12-17
Hi experts

Could you provide me with some best pratice examples of how to implement a site search for a website. I am interested in how to design my objects and classes in regards to the search.

Is it better to create a search object, which handels all searches or add a search interface to all searchable objects?

Many thanks
0
Comment
Question by:riffrack
1 Comment
 
LVL 22

Accepted Solution

by:
ambience earned 500 total points
ID: 40496503
Search is closely related to the data and access patterns. One pattern that comes to mind that allows for flexible searches is the Specification pattern. As a start check out http://www.codeproject.com/Articles/670115/Specification-pattern-in-Csharp

If you are using the repository pattern then adding a new method for new kind of searches. This makes sense if for example you dont require a great deal of flexibility in search types.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article explores the difference between two entities: List and Category.   In part one,  we'll look at the basic concepts, and set some groundwork.  In part two, we'll get to some conclusions. I know that these two things are different, but…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now