Skip to main content
added 1 characters in body
Source Link
chills42
  • 14.6k
  • 4
  • 45
  • 78

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has theretheir own presentation layer.
Each app has theretheir own service layer.
Each app has theretheir own data access layer.
Each app shares another service layer.

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - I don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer I suppose

Would anyone help or comment weather this is good practise.. What I didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has there own presentation layer.
Each app has there own service layer
Each app has there own data access layer
Each app shares another service layer

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - I don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer I suppose

Would anyone help or comment weather this is good practise.. What I didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has their own presentation layer.
Each app has their own service layer.
Each app has their own data access layer.
Each app shares another service layer.

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - I don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer I suppose

Would anyone help or comment weather this is good practise.. What I didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

added 8 characters in body
Source Link
Richard Szalay
  • 85.1k
  • 19
  • 186
  • 242

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has there own presentation layer. 
Each app has there own service layer 
eachEach app has there own data access layer 
eachEach app shares another service layer

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - iI don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer iI suppose

Would anyone help or comment weather this is good practise.. What iI didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

thanks mark

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has there own presentation layer. Each app has there own service layer each app has there own data access layer each app shares another service layer

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - i don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer i suppose

Would anyone help or comment weather this is good practise.. What i didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

thanks mark

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has there own presentation layer. 
Each app has there own service layer 
Each app has there own data access layer 
Each app shares another service layer

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - I don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer I suppose

Would anyone help or comment weather this is good practise.. What I didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

Source Link
mark smith
  • 21k
  • 47
  • 137
  • 190

Repository Pattern with 2 services & 2 dataccess layers - C# DDD?

Can anyone help, I have 2 applications and they are nearly identical. they have a completely different presentation layer (web) and the business logic and database are nearly identical. Basically one app has some things that the other doesn't.

so i was wondering if i can do the following without breaking any rules etc

Each app has there own presentation layer. Each app has there own service layer each app has there own data access layer each app shares another service layer

Hence the shared service layer both apps can access as the business logic is identical, but they both have another service layer which has 5 or 6 methods in there which are specific to that actual app

The data access layer - i don't see anyway of sharing this as there are 2 different db's with entity framework hence its got the EDM in there so its not dynamic - and the tables differ slightly.

I could use IOC on the shared data access layer i suppose

Would anyone help or comment weather this is good practise.. What i didn't want to do is have only a separate service layer when a lot of it is shared..

Is this a good idea? Maybe i have got it wrong, is there a better way?

thanks mark