Re: .Net Architecture best practices
A good post on the subject.
I think there is not a "one size fits all" solution.
Also you are coming up against the relational - object mismatch that occurs when you try to bolt on a pure OO middle layer to a highly normalised relational back end.
For web apps it makes more sense to forget pure OO layers and make it much more procedural, stateless and scalable.
Personally I am a very good T-SQL programmer and concentrate all the business logic in complex SP's with error handling.
The BO layer is then nothing more than a transport mechanism between the presentation layer (usually ASP.NET databinding and custom controls)
This makes the .NET code thin and performance very good with well written SQL (I NEVER use cursors!) and correctly indexed tables (and views).
As for business rules (e.g. validation) if you put in the front end GUI you get responsive apps (don't need a round trip to validate data) but a maintenance problem. If you bury it ALL in the middle/back end, then every validation reqiures a round trip. You choose.
Just my tuppence worth,
DP.
A good post on the subject.
I think there is not a "one size fits all" solution.
Also you are coming up against the relational - object mismatch that occurs when you try to bolt on a pure OO middle layer to a highly normalised relational back end.
For web apps it makes more sense to forget pure OO layers and make it much more procedural, stateless and scalable.
Personally I am a very good T-SQL programmer and concentrate all the business logic in complex SP's with error handling.
The BO layer is then nothing more than a transport mechanism between the presentation layer (usually ASP.NET databinding and custom controls)
This makes the .NET code thin and performance very good with well written SQL (I NEVER use cursors!) and correctly indexed tables (and views).
As for business rules (e.g. validation) if you put in the front end GUI you get responsive apps (don't need a round trip to validate data) but a maintenance problem. If you bury it ALL in the middle/back end, then every validation reqiures a round trip. You choose.
Just my tuppence worth,
DP.
Comment