I'm working on a web project that is quite decent in size. At the same time this project is about to expand to multiple platforms like Android, iOS etc. My intention is to centralize code that can be accessed across multiple platforms.
However, I'm little confused about organizing layers (BL, DL, UI) as I'm very new to this design thing.
My intention is to keep all the code related to specific module in a single class library. That is why I have kept DAL and BL inside each module.
Approach 1
- (UI) Web Project
- Module1 (Class Library)
- Module1.DAL
- Module1.BL
- Module2 (Class Library)
- Module2.DAL
- Module2.BL
- Module3 (Class Library)
- Module3.DAL
- Module3.BL
Approach 2
- (UI) Web Project
- DAL (Class Library)
- Module1.DAL(folder)
- Module2.DAL(folder)
- BL (Class Library)
- Module1.BL(folder)
- Module2.BL(folder)
As per my understanding most of the people goes with second approatch. However, can I achived same decoupled architecture using first approatch?