?
Solved

Implementing Search in object oriented design

Posted on 2014-12-11
1
Medium Priority
?
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 22

Accepted Solution

by:
ambience earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Many of the most common information processing tasks require sorting data sets.  For example, you may want to find the largest or smallest value in a collection.  Or you may want to order the data set in numeric or alphabetical order. …
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

770 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