1.1 Plan the application layers
Referred to repository Pattern,soc (separation of Concern),
Further mentions 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
Call the rest API via Httpservice (why not httpclient?)
Hybrid application-azure Server + local app server/local DB server via Azure AppFabric
3 Session Management modes: InProc (default)/outproc (stateserver or SQL Server)
1.3 Deign and implement the Windows Azure role life cycle
Startup tasks Management by APPCMD
1.4 Configure State Management
ASP. NET uses ViewState to manage state information.
ASP. NET MVC uses the following methods to save state information:
- 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 this request
- Profile-stored in DB and maintains information across sessions
Cookies
- 4k limit
- Support feature such as Remember Me.
HTML5 Web Storage
1.5 Design a cache strategy
Use the OutputCache property to control the scope of the cache, the value of the location: any (default)/client/downstream/server/serverandclient/none.
Donut caching support via Substitution API of ASP.
Donut Hole Caching:
- Use the OutputCache property on a method that returns an action (Childaction)
- Use @html.action ("Childaction") in parent view
If you use the OutputCache property on a controller, all methods that support GET request have this property, and the other methods are not affected.
For the distributed caching to be used for AppFabric, the (. NET version of Redis should also support it!). )
Use System.Runtime.Caching.dll's default implementation Objectcache/memorycache to implement the data Caching.
HTML5 supports application Cache API (AppCache),
- Generate Cache manifest,
- Reference manifest in layout.cshtml, such as
- Set the correct mime-type,response.contenttype= "Text/cache-manifest".
Http caching.
1.6 Design and implement a WebSocket strategy
The WebSocket connection is established through the hand shake, and the server side passes HttpContext.Current.AcceptWebSocketRequests (Func<aspnetwebsocketcontext, task>) completes the Get to WebSocket upgrade.
Because WebSocket does not contain HTTP header information, it may not be able to pass through firewall.
1.7 Design HTTP modules and handlers
The difference between HTTP module and HTTP handler
Familiar with the default modules and handlers of ASP.
Chapter1:design the application Architecture