Asp.net Design Pattern study notes -- PART 2
来源:互联网 发布:c语言函数库 chm 编辑:程序博客网 时间:2024/06/10 15:44
Smart UI Architecture
Example:
What’s problem ?
1. store procedure is too heavy
2. Data access ,Business layer , service seems didnothing
3. UI is too heavy !
4. Hard to test !
As these weaknesses , these codes are very hard to maintain andextension .
Any solution ? maybe we can consider to refactor the architecture ! we need to makedifferent layer do proper things !
Let’s see new architecture!
Now Let’s Apply this Architecture into the sample!
Let’s go through a Very sample feature , there is 2 drop down list control in aspx page, then I need to display the products by customer type :
1. Member (can have discountprice)
2. Non member (originalprice)
To implement this feature ,let’s see the new architecture :
Nowwhat’s changed ?
1. Withpresenter , UI not “fat” any more
2. Each layercan be tested
3. With EntityFramework , store procedure cannot be too “fat”
4. Service layer,Business layer, Data Access layer all have been assigned proper responsibilities,which makesmaintainable and easy to be extended.
- Asp.net Design Pattern study notes -- PART 2
- Asp.net Design Pattern study notes -- PART 3
- Provider Design Pattern, Part 2
- Design pattern FAQ Part 2
- Design mode study notes
- ASP.NET 与 Design Pattern
- ASP.NET 与 Design Pattern
- design pattern study
- Design Pattern Interview Questions - Part 2
- Asp.Net Design Pattern Studynotes -- Part1
- design pattern notes [3] - factory
- design pattern notes [6] - Observer
- Design Pattern Study 1 - Factory Pattern
- design pattern notes [2] - decorator, facade, Singleton, Flyweight, and Adapter
- lucene study notes (2)
- flex study notes (2)
- Maven Study Notes 2
- design pattern notes [1] - Bridge and composite
- ios摇一摇的实现
- MFC中消息传递
- 黑客是怎样入侵你的网站的
- linux双机互传文件
- hadoop metrics 各参数解释
- Asp.net Design Pattern study notes -- PART 2
- 我做错什么了
- ubuntu .deb .tar.gz .tar.bz2 .rmp 和命令方式安装软件的方法
- Java中时间和空间的互换
- oracle forall
- ubuntu创建用户
- java构造方法
- Android开发 SharedPreferences
- ubuntu下搭建网页工具 PHP+MYSQL+Apache