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的简单方法,如 ...
随机推荐
- Data Binding和INotifyPropertyChanged是如何协调工作的?
前言 WPF的一大基础就是Data Binding.在基于MVVM架构的基础上,只有通过实现INotifyPropertyChanged接口的ViewModel才能够用于Data Binding. 要 ...
- CodeBlocks配置文件位置
CodeBlock配置混乱,决定重装时,删除程序后,需将配置文件删除. 配置文件位置:C:\Users\Administrator\AppData\Roaming\CodeBlocks
- require.js源码分析
写的寥寥草草,博客园的布局怎么弄还没有研究,再保存一份草稿,日后在完善,深度研究 require.js 加载顺序 1:加载html主页,require.js文件 2:脚本执行到html中的script ...
- PyAutoGUI-python版的autoit/AHK
简单介绍各个图形界面自动操作的python库,类似按键精灵\autoit\ahk(autohotkey)等等这些自动化工具.这类python库不是只是用来实现自动游戏之类的程序,业界也用这些库来做GU ...
- class can not be find with platformType:1 step 1
使用第三方库的时候 (配合cocopods)混合使用一定要注意 为什么会出现这样的问题... 苦苦难为我半天时间 都有想打人的冲动 前天一切正常今天出来个这 原因很简单当使用cocopods的时候默认 ...
- Hdu 1004
ps:很简单的一个字符串处理问题.. 代码: #include "stdio.h" #include "string.h" int find(int flag[ ...
- 关于Python中的文件操作(转)
总是记不住API.昨晚写的时候用到了这些,但是没记住,于是就索性整理一下吧: python中对文件.文件夹(文件操作函数)的操作需要涉及到os模块和shutil模块. 得到当前工作目录,即当前Pyth ...
- Easyui简单布局
1.创建布局 创建布局只需要添加 'easyui-layout' class 到 <div> 标记或者 在整个页面创建布局,即<body class="easyui-lay ...
- java异步式Socket响应数据获取方案
项目中存在 云中央控制器需要使用多个Socket连接多个云终端控制器的需求. 由于终端数量大,就对整个中央控制器提出了并发的要求,然而获取Socket响应的过程是一个持续阻塞的过程,存在性能风险.而常 ...
- Linux 防火墙开放特定端口 (iptables)
iptables是linux下的防火墙,同时也是服务名称. service iptables status 查看防火墙状态 service iptables start ...