惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
K
Kaspersky official blog
G
Google Developers Blog
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Recorded Future
Recorded Future
Blog — PlanetScale
Blog — PlanetScale
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cisco Talos Blog
Cisco Talos Blog
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
S
Schneier on Security
P
Palo Alto Networks Blog
H
Hacker News: Front Page
N
News and Events Feed by Topic
N
Netflix TechBlog - Medium
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
SecWiki News
SecWiki News
Cloudbric
Cloudbric
TaoSecurity Blog
TaoSecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Hacker News
The Hacker News
C
Check Point Blog
L
LangChain Blog
腾讯CDC
小众软件
小众软件
T
Tenable Blog
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
About on SuperTechFans
Google Online Security Blog
Google Online Security Blog
C
Cisco Blogs
Recent Announcements
Recent Announcements
Hacker News: Ask HN
Hacker News: Ask HN
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
雷峰网
雷峰网
美团技术团队
D
DataBreaches.Net
Martin Fowler
Martin Fowler
Help Net Security
Help Net Security
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
博客园_首页

博客园 - KiddLee

数据库存储图像及使用Image控件显示 Spring.Core IoC(一) Spring.Net 模块组成 Generating user instances in Sql Server is disabled. Use sp_configure 'user instances enabled' to generate user instances 面向对象分析设计学习与探索(六):好的设计=软件的灵活程度(good design=flexible software)继续 面向对象分析设计学习与探索(六):面向对象的灾难(OO Catastrophe) 面向对象分析设计学习与探索(六):好的设计=软件的灵活程度(good design=flexible software) 面向对象分析设计学习与探索(五):分析(Analysis) 面向对象分析设计学习与探索(四):需求变化(Requirements Change) 面向对象分析设计学习与探索(三):收集需求(Gathering Requirement) 面向对象分析设计学习与探索(二):好的应用程序设计(Well-designed apps rock) 面向对象分析设计学习与探索(一):开篇 类型构造器 装箱拆箱续 Session Cookie and Persistent Cookie 第一次执行方法 我犯错了 装箱拆箱 接口函数还可以声明为private
三层体系结构总结(六)
KiddLee · 2008-06-04 · via 博客园 - KiddLee

Model类型:
加入两个构造函数 付值和缺省
去掉ModelList类型,使用List<Model>代替,可以在相应的Model中加入得到List的方法
对于有关系的列表,还是使用DataSet比较方便
DAL
对于读取数据,不必加入Try{}Catch{}
对于操作数据库时出现的问题可以使用自定义的异常处理方式
使用Partial将带有业务逻辑的方法和普通的添查删改方法分开
BLL
加入缺省构造函数和对应DAL实例
使用Partial将带有业务逻辑的方法和普通的添查删改方法分开
UI
按模块划分,设置文件夹
最外层只留下公共页面,如Login, ErrorPage
添加和编辑可以使用同一页面,对于添加时的主键可以设置为0,在BLL层中判断具体调用DAL中的什么方法
对于传递的参数,最好使用对称加密方式,提高安全性

自定义异常处理
在这点时间的项目中,发现有些异常被抛出后,不能正常抛到报错页面进行处理,实际上可以在Catch的时候进行处理,记录错误
在这次项目中发现如果是post back时发生异常,应用程序是不能重新转向报错页面的,所以使用自定义的异常处理

权限控制
对于操作权限和浏览现在还是分成两套页面,不过现在有一种想法是对于操作按钮在初始化界面时进行权限判断,以减小页面数量