Solved

Implementing Search in object oriented design

Posted on 2014-12-11
1
142 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 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 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