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的简单方法,如 ...
随机推荐
- asp.net文件下载文件另存为
这是一个困惑已久的问题…… 首先,用<a>标签的href打开浏览器能解读的文件(如txt,jpg,pdf等),会自动打开,无法做到弹出另存为的效果. 其次,网上搜索了各种JS解决办法,包括 ...
- git学习【转载】
最近参与别人的github项目时,学习了Git的使用,首先需要在https://github.com/网站上注册账号和邮箱,然后fork一个开源项目,然后下载目前Windows下最新版本的git,下载 ...
- python中转义用法 r''
代码中需要转多个字符,,可以使用 r'' 例子: print(r"'''\\sfd/;fe'lsdfl")
- js限制文本框只能输入数字方法小结(转)
这篇文章主要分享下js代码限制文本框中只能输入数字的多个实例,学习下js控制文本框中输入数字的方法,需要的朋友可以参考下 有时需要限制文本框输入内容的类型,本节分享下正则表达式限制文本框只能输入数 ...
- C++中explicit关键字的使用
看书看到了explicit关键字,就来做个笔记,讲得比较明白,比较浅. 在C++中,我们有时可以将构造函数用作自动类型转换函数.但这种自动特性并非总是合乎要求的,有时会导致意外的类型转换,因此,C++ ...
- 【C编译器】MinGw安装与使用(调试问题待续)
不想装vs2005之类的,想要一个轻量级的C语言编译器,希望将焦点放在如何写好代码上: 本人信奉:代码质量是靠设计和检视保证的,不是靠调试: 1.安装MinGW http://www.mingw.or ...
- Excel 改变列表头显示方式, Excel显示列数字
'显示数字列号 Sub showCellNumber() Application.ReferenceStyle = xlR1C1 End Sub '显示字母列号 Sub showCellZimu() ...
- navicat在ubuntu下中文乱码的真正解决方法ZT
乱码解决方法(自己解决我自己这种情况之后打猜测): 打开start_navicat文件,会看到 export LANG="en_US.UTF-8" 将这句话改为 export LA ...
- EasyUI中Grid标题居中方法(jquery实现方法)
$(".panel-title").css("text-align", "center"); 一句话搞定,就是这么随意
- Adobe Audition音频制作
Adobe Audition 同义词 AU(软件(Adobe Audition))一般指Adobe Audition Adobe Audition是一个专业音频编辑和混合环境,原名为Cool Edit ...