Skip to main content
grammar, English, removed 'thanks'
Source Link
Dan Pichelman
  • 13.8k
  • 8
  • 44
  • 73

** Mods, if for any reason this question is inappropriate, please leave a comment rather than putting it on hold and I will make the change according to your suggestion. Thank you.

Hi all

I have been reading a lot about repository implementation. I am confused about which way to implement it for a project I am sure would change its data layer methods because of db migration from MS Sql Server to NoSQL one in a couple of years.

Imp #1

  • Implement Rep layer as a completely separate layer. This will have its own interface and conversion methods here. This rep layer has a dependency on DAL and in turn BLL will have a dependency on this layer

Imp#2

  • Implement Repository not as a separate layer but have its interfaces in Business Logic Layer and the methods in DAL.

I am gearingleaning more towards imp #1 since it looks cleaner. However some explanations of experts I have read use the imp#2. I think there must be a clear reason to use one over another according to the situation. I would ideally want our switch to a different database be as painless as possible basically. Thank you all :)

** Mods, if for any reason this question is inappropriate, please leave a comment rather than putting it on hold and I will make the change according to your suggestion. Thank you.

Hi all

I have been reading a lot about repository implementation. I am confused about which way to implement it for a project I am sure would change its data layer methods because of db migration from MS Sql Server to NoSQL one in couple of years

Imp #1

  • Implement Rep layer as a completely separate layer. This will have its own interface and conversion methods here. This rep layer has a dependency on DAL and in turn BLL will have a dependency on this layer

Imp#2

  • Implement Repository not as a separate layer but have its interfaces in Business Logic Layer and the methods in DAL.

I am gearing more towards imp #1 since it looks cleaner. However some explanations of experts I have read use the imp#2. I think there must be a clear reason to use one over another according to the situation. I would ideally want our switch to a different database as painless as possible basically. Thank you all :)

I have been reading a lot about repository implementation. I am confused about which way to implement it for a project I am sure would change its data layer methods because of db migration from MS Sql Server to NoSQL in a couple of years.

Imp #1

  • Implement Rep layer as a completely separate layer. This will have its own interface and conversion methods here. This rep layer has a dependency on DAL and in turn BLL will have a dependency on this layer

Imp#2

  • Implement Repository not as a separate layer but have its interfaces in Business Logic Layer and the methods in DAL.

I am leaning more towards imp #1 since it looks cleaner. However some explanations of experts I have read use imp#2. I think there must be a clear reason to use one over another according to the situation. I would ideally want our switch to a different database be as painless as possible.

Source Link
Emma
  • 655
  • 1
  • 6
  • 9

How to implement the repository pattern for an app that will change its database from sql to nosql on in couple of years?

** Mods, if for any reason this question is inappropriate, please leave a comment rather than putting it on hold and I will make the change according to your suggestion. Thank you.

Hi all

I have been reading a lot about repository implementation. I am confused about which way to implement it for a project I am sure would change its data layer methods because of db migration from MS Sql Server to NoSQL one in couple of years

Imp #1

  • Implement Rep layer as a completely separate layer. This will have its own interface and conversion methods here. This rep layer has a dependency on DAL and in turn BLL will have a dependency on this layer

Imp#2

  • Implement Repository not as a separate layer but have its interfaces in Business Logic Layer and the methods in DAL.

I am gearing more towards imp #1 since it looks cleaner. However some explanations of experts I have read use the imp#2. I think there must be a clear reason to use one over another according to the situation. I would ideally want our switch to a different database as painless as possible basically. Thank you all :)