当前位置: 首页 > news >正文

Asp.net Design Pattern study notes -- PART 2

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 make different 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.     With presenter , 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 makes maintainable and easy to be extended.

 

相关文章:

  • 利用Excel巧制抽奖器
  • XnView调整图片不失真
  • 物尽其才 用PotPlayer免费转录高清电影
  • 一句话技巧
  • How to use Interface
  • 无需第三方软件 用ScreenToaster在线进行视频录制
  • 将你的收藏共享给QQ好友
  • 你不在线,文件我照样传
  • 轻松发送语音邮件
  • linux下C编程详解
  • 资金头寸是什么?
  • Meizu M8 SDK开发初体验
  • Asp.net interview question
  • 有“备”才能无患——数据备份层层渗入 07
  • jTemplate Sample
  • __proto__ 和 prototype的关系
  • 【css3】浏览器内核及其兼容性
  • 2017年终总结、随想
  • canvas 高仿 Apple Watch 表盘
  • httpie使用详解
  • in typeof instanceof ===这些运算符有什么作用
  • JavaScript 是如何工作的:WebRTC 和对等网络的机制!
  • MySQL的数据类型
  • React-生命周期杂记
  • Webpack4 学习笔记 - 01:webpack的安装和简单配置
  • 从@property说起(二)当我们写下@property (nonatomic, weak) id obj时,我们究竟写了什么...
  • 搭建gitbook 和 访问权限认证
  • 今年的LC3大会没了?
  • 如何解决微信端直接跳WAP端
  • 延迟脚本的方式
  • 一加3T解锁OEM、刷入TWRP、第三方ROM以及ROOT
  • ​虚拟化系列介绍(十)
  • # C++之functional库用法整理
  • #git 撤消对文件的更改
  • #ifdef 的技巧用法
  • #pragma pack(1)
  • %check_box% in rails :coditions={:has_many , :through}
  • (vue)页面文件上传获取:action地址
  • (翻译)Entity Framework技巧系列之七 - Tip 26 – 28
  • (附源码)spring boot北京冬奥会志愿者报名系统 毕业设计 150947
  • (附源码)springboot码头作业管理系统 毕业设计 341654
  • (更新)A股上市公司华证ESG评级得分稳健性校验ESG得分年均值中位数(2009-2023年.12)
  • (亲测成功)在centos7.5上安装kvm,通过VNC远程连接并创建多台ubuntu虚拟机(ubuntu server版本)...
  • (十一)手动添加用户和文件的特殊权限
  • (未解决)jmeter报错之“请在微信客户端打开链接”
  • (一)Linux+Windows下安装ffmpeg
  • (转)linux自定义开机启动服务和chkconfig使用方法
  • (转)Scala的“=”符号简介
  • (轉貼) 資訊相關科系畢業的學生,未來會是什麼樣子?(Misc)
  • ***通过什么方式***网吧
  • .NET 5种线程安全集合
  • .NET WebClient 类下载部分文件会错误?可能是解压缩的锅
  • .NET上SQLite的连接
  • .NET中的Event与Delegates,从Publisher到Subscriber的衔接!
  • /etc/shadow字段详解