Last post Aug 02, 2011 04:21 PM by abhisheks
Aug 01, 2011 05:54 PM|tarung|LINK
We have a initiative (under-way) to re-architecture the external facing web site / portal. I want to get some opinions on the approach and direction we are headed to. We cannot re-write the site from scratch as modules within the site are complex.
I have laid out below the current architecture and also the proposed future architecture and would appreciate some feed-back.
Current Architecture has 4 logical layers (listed below). Presentation Layer is physically separated than other layers and communicates with Business Layer thru WCF Services. This architecture was established about 8 years ago. At that time...PL
used to communicate with BL over remoting which eventually got changed to WCF in last few years.
1. Presentation Layer (asp.net web site communicates with business layer thru WCF services)
2. Business Layer (some of the services are consumed by other clients besides the Presentation Layer,communicates directly with DAL thru assembly references)
3. DAL (factory pattern which abstracts database, ERP systems, CRM systems etc.)
Currently it is a piece meal concept. Whole site is never deployed. If an enhancement / project needs to be rolled out which has some ui and business layer components, only those assemblies (ui and services) are rolled out.
Current pain points:
1. Debugging is difficult. If developer has to troubleshoot an issue it not as easy to step in code thru different layers. some of the web applications are complex which call several different services and there is a need to step in all the way to DAL and
com back to UI to troubleshoot.
2. We have lot of new developers which come to help out for a specific project. Setup and ramp up time to understand the architecture is long.
Future Approach still has 4 logical layers (listed below). All the layers are physicaly running on the same box.
1. Presentation Layer (asp.net web application communicates with business layer directly thru assembly references)
2. Business Layer (communicates directly with DAL thru assembly references)
5. Services (this is new layer .. only exposes the services which are consumed by clients other than PL, communicates with business layer directly thru assembly references)
For any project / enhancement to be rolled out..whole site will be deployed vs only the assemblies.
This approach solves the current pain points as it is very easy to get the whole site , compile it and start stepping in the code thru all the layers
1. debugging / troubleshooting
2. Developer setup and ramp up time
Aug 02, 2011 01:25 AM|princeG|LINK
In you case, you can follow Service layer Architecture is best suited in your existing condition:
Aug 02, 2011 04:21 PM|abhisheks|LINK
I think having a service layer is good approach, but also feel that just adding a service layer is not going to resolve your problem fully.
I feel it would not be a bad idea, if you develop a mechanim for testing your code too. Writing, managing and automating tests really helps to increase code quality as well as saves time to debug through code. It's going to be a challenge to write test cases
for apps as old as yours, but it's worth a time to spend some time looking into it.