Chapter 1: Design the application architecture
1.1 Plan the application layers
提到了repository pattern,SoC(Separation of Concern),
进而提及MVC,Action/Action results,Route/Routing (IHttpHandler, MvcHandler, IControllerFactory),Asynchronous Controllers,Views (Strongly-typed views, View-specific model, partial view, Master page),Razor/WebForms view Engine
1.2 Design a distributed application
REST service vs ASP.NET Web Services (ASMX) vs WCF Web API
通过HttpService调用REST API,(为什么不是HttpClient?)
Hybrid application - Azure server + local app server/local db server via Azure AppFabric
3种Session管理模式:InProc(default)/OutProc(StateServer or SQLServer)
1.3 Deign and implement the Windows Azure role life cycle
startup tasks management by AppCmd
1.4 Configure state management
asp.net使用ViewState来管理state信息。
asp.net mvc使用以下方式保存state信息:
- Cache - memory pool on server, shared across users
- Session - stored on server, unique for each user
- Cookie - stored on client, passed with each HTTP request to the server
- QueryString - passed as part of the URL string
- Context.Items - part of HttpContext and lasts only the lifetime of that request
- Profile - stored in db and maintains information across sessions
cookie
- 4k限制
- support feature such as Remember Me.
Html5 Web Storage
- browser compatible
1.5 Design a cache strategy
使用OutputCache属性来控制cache的范围,Location的值:Any(default)/Client/Downstream/Server/ServerAndClient/None。
Donut caching support via Substitution api of asp.net
Donut hole caching:
- 在一个返回action的方法(ChildAction)上使用OutputCache属性
- 在父View中使用@Html.Action("ChildAction")
如果在Controller上使用OutputCache属性,那么所有支持GET request的方法都具有这个属性,其他的方法不受影响。
分布式Caching要用到AppFabric,(.net版的redis应该也支持吧!)
使用System.Runtime.Caching.dll的默认实现ObjectCache/MemoryCache,来实现data caching。
Html5支持Application Cache API(AppCache),
- 生成cache manifest,
- 在Layout.cshtml中reference manifest, 如<html manifest="site.manifest">
- 设置正确的MIME-type,Response.ContentType="text/cache-manifest"。
Http caching。
1.6 Design and implement a WebSocket strategy
通过hand shake建立WebSocket连接,server端通过HttpContext.Current.AcceptWebSocketRequests(Func<AspNetWebSocketContext, Task>)完成GET到WebSocket的upgrade。
由于WebSocket不含http头信息,因此可能无法穿过firewall。
1.7 Design HTTP modules and handlers
http module和http handler的区别
熟悉asp.net mvc的default modules和handlers。
Chapter 1: Design the application architecture的更多相关文章
- JavaScript Application Architecture On The Road To 2015
JavaScript Application Architecture On The Road To 2015 I once told someone I was an architect. It’s ...
- What is Web Application Architecture? How It Works, Trends, Best Practices and More
At Stackify, we understand the amount of effort that goes into creating great applications. That’s w ...
- Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications 云设计模式:云应用的规范架构指导
1.Cache-aside Pattern 缓存模式 Load data on demand into a cache from a data store. This pattern can impr ...
- Catalog of Patterns of Enterprise Application Architecture
Catalog of Patterns of Enterprise Application Architecture Last Significant Update: January 2003 A s ...
- Application Architecture Determines Application Performance
 Application Architecture Determines Application Performance Randy Stafford AppliCATion ARCHiTECTuR ...
- Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications
January 2014 Containing twenty-four design patterns and ten related guidance topics, this guide arti ...
- Understanding Spring Web Application Architecture: The Classic Way--转载
原文地址:http://www.petrikainulainen.net/software-development/design/understanding-spring-web-applicatio ...
- Chapter 5: Design and implement security
Configure authentication Authenticating users IIS authentication Anonymous ASP.net impersonation Bas ...
- Chapter 2: Design the user experience
Apply the user interface design for a web application 介绍了Css的常用属性和html5的新element,以及Htmlhelper的简单方法,如 ...
随机推荐
- 【转】输入/输出流 - 全面掌握IO
File类: 程序中操作文件和目录都可以使用File类来完成即不管是文件还是目录都是使用File类来操作的,File能新建,删除,重命名文件和目录,但File不能访问文件内容本身,如果需要访问文件本身 ...
- 兼容性测试-如何使用IE11做低版本IE的兼容性测试
操作步骤: 切换模式方法-按F12->展开显示->仿真菜单>在文档模式下拉框中选择IE版本
- PyAutoGUI-python版的autoit/AHK
简单介绍各个图形界面自动操作的python库,类似按键精灵\autoit\ahk(autohotkey)等等这些自动化工具.这类python库不是只是用来实现自动游戏之类的程序,业界也用这些库来做GU ...
- how a 程序猿 doubled his salary?
One thing i can say, no matter what position i was in or what was my salary, i never stopped studyin ...
- xlwt写入中文操作不成功,提示UnicodeDecodeError: ascii codec can't decode byte ...
打开xlwt包里的Workbook.py文件,修改Workbook类的__init__方法 将 def __init__(self, encoding='ascii', style_compressi ...
- article和section
article和section都是指页面中的块,但是article更加强调独立性,而section常被用来分块. section使用禁忌: 1.不要把section当作定义样式的容器,因为那是div的 ...
- savedInstanceState的作用
在activity的生命周期中,只要离开了可见阶段,或者说失去了焦点,activity就很可能被进程终止了!,被KILL掉了,,这时候,就需要有种机制,能保存当时的状态,这就是savedInstanc ...
- 【LeetCode OJ】Symmetric Tree
Problem Link: https://oj.leetcode.com/problems/symmetric-tree/ To solve the problem, we can traverse ...
- BigDecimal
BigDecimal需要创建对象进行计算(用不同的方式做运算) BigDecimal num1 = new BigDecimal("5"): BigDecimal num2 = n ...
- How can i use iptables save on centos 7?
I installed CentOS 7 with minimal configuration (os + dev tools). I am trying to open 80 port for ht ...