tags:

views:

49

answers:

1

I have introduced tag system for convenient and quick search in my hobby project.
The question is whether this system must interact and search through business-logic objects or data-logic ones? I think the first option will be much more flexible, so I can change data-logic independent from changes in tag system.

A: 

As you noted there are at least two approaches here. I will adwocate one that does not use business logic.

I prefer designs with separation of modification logic and retrieve logic. This means that operations like save tag should go to the business logic(domain module). But serach by tags should go to its own module(report module). Because of such separation you are not limited to your busness logic's retrieval functions. You can use data access layer, or even direct sql(may be because of performance).

Mike Chaliy