Chapter1: 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:

  1. 在一个返回action的方法(ChildAction)上使用OutputCache属性
  2. 在父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),

  1. 生成cache manifest,
  2. 在Layout.cshtml中reference manifest, 如<html manifest="site.manifest">
  3. 设置正确的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。

时间: 2024-10-17 06:58:55

Chapter1: 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 true in a way since I now have to design an intricate web of lies to back it up. On a serious note, I thought it might be salutary to look at the sta

Application Architecture Determines Application Performance

? Application Architecture Determines Application Performance Randy Stafford AppliCATion ARCHiTECTuRE dETERMinES application performance. That might seem rather obvious, but real-world experience shows that it's not. For example, software architects

Design Patterns: Solidify Your C# Application Architecture with Design Patterns中文版(中篇)

众所周知,数据科学是这几年才火起来的概念,而应运而生的数据科学家(data scientist)明显缺乏清晰的录取标准和工作内容.此次课程以<星际争霸II>回放文件分析为例,集中在IBM Cloud相关数据分析服务的应用.面对星际游戏爱好者希望提升技能的要求,我们使用IBM Data Science Experience中的jJupyter Notebooks来实现数据的可视化以及对数据进行深度分析,并最终存储到IBM Cloudant中.这是个介绍+动手实践的教程,参会者不仅将和讲师一起在线

Understanding Spring Web Application Architecture: The Classic Way--转载

原文地址:http://www.petrikainulainen.net/software-development/design/understanding-spring-web-application-architecture-the-classic-way/ Every developer must understand two things: Architecture design is necessary. Fancy architecture diagrams don’t descri

Template design pattern application in android

The template method allow separate the generic method from a detail context(class) via inheritance Another advantage: 1.Inheritance implementation means that you will know the actual method implementation class before compilation,it is very big advan

Architecture Design Process

Architecture Design Process The architecture design process focuses on the decomposition of a system into different components and their interactions to satisfy functional and nonfunctional requirements. The key inputs to software architecture design

Azure Cloud Application Design and Implementation Guidance performance-optimization

https://github.com/mspnp/azure-guidance https://github.com/mspnp/performance-optimization https://github.com/mspnp/data-pipeline Cloud Design Patterns: Prescriptive Architecture Guidance for Cloud Applications https://msdn.microsoft.com/en-us/library

Web application the big change is coming...

Probably never got chance to touch Big Data architecture in my works, but to think of it, still interesting... We had many ideas about computing at 60s, and they wasn't really go in production because the limitation of hardware and software facilitie

Domain Driven Design and Development In Practice--转载

原文地址:http://www.infoq.com/articles/ddd-in-practice Background Domain Driven Design (DDD) is about mapping business domain concepts into software artifacts. Most of the writings and articles on this topic have been based on Eric Evans' book "Domain Dr