Reading notes [asp.net+mvc4+web+ programming]

Source: Internet
Author: User

  1. Models: Data and business logic

  2. View: Show

  3. Controller: Receive view input data and return to the view after processing by the model layer business logic

  4. Separation of concerns (Model View Controller), customary precedence principle

  5. Browser-->routing-->controller<--view-->browser

  6. The controller tells the next step what to do instead of what to do, such as displaying the view and returning Actionresults.

  7. Locate the view: first find the corresponding folder, second find shared folder

  8. Razor: Code snippets, code blocks

  9. Partial views @Html. Partial (), Partialview () can be returned to Axaj

  10. Controller passes data to view: ViewData and viewbage (dynamic)

  11. View Model: Viewdata.model strongly typed attempt: @model type

  12. HtmlHelper: @Html Generate Html

  13. Urlhelper: @Url Generate URL

  14. Data model, domain model

  15. Web Form and Background Web Components (ASP)

  16. HTTP is stateless: ASP. NET is view state

  17. Basic differences

    ASP. MVC
    View logic combines /td> detach
    page URL based on file access   There is a routing URL lookup controller
    No automation view Management
    web form syntax razor syntax
    server control html Help method
    motherboard layout
    user control partial view

     

  18. can use routing, but MVC cannot do without, the web from is to optimize

  19. HTMLHelp can create his own method.

  20. Object Relational Mapping Framework ORM (Object Relational mapping)

  21. Entity Framework:code-first, Model-first, Database-first.

  22. Model data Validation System.ComponentModel.DataAnnotations ()

  23. [System.ComponentModel.DataAnnotations.Range (typeof (DateTime), "2010-01-01", "2015-02-02", errormessage= "missed")]

  24. Customizable validation methods

  25. Code-first:system.data.entity.dbcontext connection string key is the same as the base class name: ConnectionStrings

  26. Ajax:xmlhttprequest Object First open (set to Async and callback function) after send to Judge Status==200 and readystate==4

  27. MVC turns on client-side validation

  28. Controllers: Block user input, reconcile models and views, and their communications

  29. Models: Data attributes, data validation, business logic

  30. Views: Rendering UI, binding model

  31. Check input data before sending to another layer

  32. Single Responsibility principle (SRP), open closure principle (OCP open for expansion, modification off), Richter replacement principle (LSP), interface isolation principle (ISP), dependency inversion principle (DIP)

  33. control Inversion : Dependency Injection and service positioning http://www.cnblogs.com/tylerdonet/p/3297915.html

  34. Actionfilter

  35. Client templates: Mustache.js

  36. Operation Filter: Implement the processing before and after the request, marking method

  37. Model Binder

  38. Jsonp implementing cross-domain AJAX requests

  39. The Web API uses the Routetable.maphttproute ()

  40. Web API name Precedence GET PUT POST DELETE

  41. ODATA: Open Data Protocol CRUD

  42. Httpresponseexception in the Web API, you can use exception filters, global registrations or attribute annotations, overriding

  43. Media Formatter: Global registration after creation, can serialize MIME type in accept

  44. Rest Full style:

      1. Get/tickets # Get Ticket list

      2. GET/TICKETS/12 # View a specific ticket

      3. Post/tickets # Create a new ticket

      4. PUT/TICKETS/12 # Update Ticket 12.

      5. DELETE/TICKETS/12 #删除ticekt 12

  45. Poco plain old CLR object, representing business entity Class model, focus on business No database structure required

  46. Repository Mode: Resource library, warehousing database access mode, responsible for the persistent application business model, there are one, aggregate root, generics a-to-many

  47. Reference type: = = Reference equals value

  48. MVC Defense CSRF: Use @html.antiforgerytoken (), and then mark on the method.

  49. JQuery.Mobile.MVC nuget Development Mobile version, modify bundles

  50. Mobile version: in action.mobile.cshtml format

  51. _viewswitcher partial views can be switched between mobile and PC versions

  52. Viewport Setting the screen rotation width issue

  53. 51degrees to enhance the setting

  54. Asynccontroller Asynchronous Controller

  55. Routing order is important

  56. Asynchronous operations are primarily used for I/O binding operations (such as database access and remote service invocation), with 2 methods implemented asynchronously

      1. *async/*completed

      2. Public task<*> M () {return}

      3. AsyncManager.OutstandingOperations.Decrement ();
  57. WebSocket

  58. SignalR: Hubs and permanent connections

  59. Server-Side Caching (

      1. Cache Httpcontext.items in the request domain

      2. Session (can be stored externally)

      3. Application is managed by IIS at the application level and can span processes

      4. System.Web.Cache ( cache dependency policy )

        1. Http://www.cnblogs.com/kissdodog/archive/2013/05/07/3064895.html

  60. Client-Side Caching

  61. MVC markup Outputcacheattribute property implements HTML page caching

      1. Configurable cache time, location (browser or service side)

      2. The VaryByParam property is only valid if the parameter is

      3. Can be configured in Web. config using profiles

  62. This represents the extended String class public static int WordCount (this string str)

  63. Donut cache: WriteSubstitution can be partially not cached
      1. Mvcdonutcachingnuget Packages Enable advanced operations
  64. The Web farm is a physically separate server cluster, and the Web garden refers to the application pool that contains multiple worker processes
  65. AppFabric, Memcached, Redis
  66. HTML5 cache: Appcache,js Local storage
  67. Yslow Detecting Web Performance
  68. The shorter the URL, the better, the dashes instead of underscores, the use of lowercase letters
  69. The MVC route parameter is separated by a constant string {P1}-{P2}-{P3}, and the parameter defaults to string type
  70. Route wildcard {Controller}/{action}/{*queryvalues}, the string following the controller operation counts as the value of the last parameter
  71. Denies all aspx request parameter allaspx:routes. Ignoreroute ("{*allaspx}", new {[email protected] ". *\.aspx (/.*)?"});
  72. Routing constraints can be set through regular expressions
  73. Customizable route constraint methods 
  74. Observing routes using glimpse
  75. can implement attribute tag-based routing
  76. Razor Single File Generator
  77. Renderaction ()
  78. Controller operation exception handling, can be globally registered [HandleError (exceptiontype=typeof (System.Data.DataException), view= "Databaseerror")]
  79. Overriding the controller Onexception () method to implement exception handling
  80. Custom Error Filters
  81. Asp. NET health Monitoring
  82. Unit Test (class or method) "autonomous, repeatable, independent, fast"
  83. Integration testing (testing interactions between multiple components)
  84. Acceptance testing (to meet the requirements)
  85. Test-driven Development (TDD) red-green-refactor
  86. TestInitialize () initializing common test parameters
  87. Analog test frameworks such as the MOQ framework
  88. Automated Browser Test Watin
  89. Code coverage 100 lines tested for 70 rows
  90. Automating the generation of Microsoft MSBuild and TeamFoundation Server
  91. Martin Fowler's Books: 1. Analysis mode 2.UML Essence 3. Refactoring 4. Enterprise Application Architecture Model 5.Nosql Essence
  92. Windows Azure
  93. NuGet

      1. Https://npe.codeplex.com/releases/clickOnce/NuGetPackageExplorer.application
      2. http://kb.cnblogs.com/page/143191/
      3. Https://www.nuget.org/account/Packages

Reading notes [asp.net+mvc4+web+ programming]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.