1 / 33

Web Platform Introduction With a focus on “free” 

Web Platform Introduction With a focus on “free” . Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com http://www.mtaulty.com. The humble web request. Internet Information Services V5 (2000), V6 (2003), V7* (2008) can develop without IIS

feoras
Télécharger la présentation

Web Platform Introduction With a focus on “free” 

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Web Platform IntroductionWith a focus on “free”  Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com http://www.mtaulty.com

  2. The humble web request • Internet Information Services • V5 (2000), V6 (2003), V7* (2008) • can develop without IIS • ASP.NET adds .NET to HTTP handling GET /default.html HTTP/1.1 200 OK ...

  3. The humble web request • Internet Information Services • V5 (2000), V6 (2003), V7* (2008) • can develop without IIS • ASP.NET adds .NET to HTTP handling GET /default.html HTTP/1.1 200 OK ... IIS Run compiled .NET code Authenticate (optional) Execute Handler ASP.NET Send Response (log, etc)

  4. Rest of the talk What’s .NET? Common aspects of ASP.NET Specific ASP.NET request handlers Web Pages (.ASPX) Web Services (.ASMX) Custom (.ASHX)

  5. Many languages, one framework .NET Framework void Foo() { MessageBox.Show("Hello World"); } Languages Web UI Windows UI C# VB C++/CLI ... Workflow Comms Core Services Threading Network Resources Data XML I/O Config Diagnostics .NET Framework (The “class libraries”) Collections Security ...

  6. .NET Assembly Metadata Code (CIL) Many languages, one exe format void Foo() { MessageBox.Show("Hello World"); } Sub Foo() MessageBox.Show("Hello World") End Sub void Foo(){ MessageBox::Show(L”Hello World”);} compile C# compile VB compile C++

  7. Base Class Library Support Native Code 0101010101 0101010101 0101010101 0100101011 Thread Support COM Marshaler .NET Assembly Type Checker Exception Manager Metadata Verified? Security Engine Debug Engine Just In Time Code (CIL) IL to Native Compilers Code Manager Garbage Collector Class Loader Many languages, one runtime (CLR) run Common Language Runtime (CLR)

  8. Versions of .NET Framework & Tools • .NET Framework is a free download • Visual Studio comes in various editions • Express, Standard, Professional, Team • SQL Server also has an Expressedition VS .NET Fx 1.0 VS .NET 2003 Fx 1.1 VS 2005 Fx 2.0 Vista Fx 3.0 VS 2008 Fx 3.5 2002 2003 2005 2006 2007

  9. Next... What’s .NET? Common aspects of ASP.NET Specific ASP.NET request handlers Web Pages (.ASPX) Web Services (.ASMX) Custom (.ASHX)

  10. Operation of built-inASP.NET handlers associated with* user code gen’d code GET /somefile.ext somefile.ext produces* compiled into .NET Class HTTP/1.1 200 OK ... instantiate & call to produce response Instance

  11. Operation of built-inASP.NET handlers GET /somefile.ext somefile.ext .NET Class HTTP/1.1 200 OK ... instantiate & call to produce response Instance

  12. ASP.NET Configuration web.config web.config /webSites/ machine.config web.config • All settings stored in XML files • Applied hierarchically • Library support • Easy access to settings • Easy extension to include custom settings site1

  13. Next... What’s .NET? Common aspects of ASP.NET Specific ASP.NET request handlers Web Pages (.ASPX) Web Services (.ASMX) Custom (.ASHX)

  14. ASP.NET Web Pages • Control-based framework for productive means of generating HTML • Author a .ASPX file • Use designer/text-editor to add controls, HTML and set properties • Write Page class in code-behind

  15. From text file to compiled code

  16. From .ASPX file to compiled code System.Web.UI.Control controls collection GET test.aspx System.Web.UI.Page ProcessRequest() test_aspx test.aspx void FrameworkInitialize() { controls.Add( new LiteralControl( “<html><body>.......”));} generates & compiles

  17. A page is a tree of controls render (HtmlWriter) Page Render() Control Control Control Render() Render() Render() <html> <body> <ul> Control Control <li> <li> Render() Render() </ul> <input/> <a/> </body> </html>

  18. A page contains a form

  19. Pages (generally) post to “themselves” GET /default.aspx Page Page HTTP/1.1 200 OK ... Control Control Control Control Control Control IsPostback = True POST /default.aspx Control Control Control Control Post Data HTTP/1.1 200 OK ...

  20. At post-back, controls fire events

  21. Controls “appear” to maintain state GET /default.aspx POST /default.aspx Post Data POST /default.aspx Post Data (incl VIEWSTATE) Apply VIEWSTATE

  22. Pages go through a life-cycle

  23. Init Lifecycle of a Page (simplified) CreateChildControls, ViewState loaded (for post-backs) Unload Load CreateChildControls (for non-post-backs) ViewState saved Render Pre-Render Server-Side events fired (for post-backs)

  24. Page “Feature Areas”

  25. Databinding

  26. Next... What’s .NET? Common aspects of ASP.NET Specific ASP.NET request handlers Web Pages (.ASPX) Web Services (.ASMX) Custom (.ASHX)

  27. ASP.NET Web Services • Providing SOAP request/response framework • “Automatic” construction of XML, SOAP and WSDL description • Author a .ASMX file • Write service class in code behind • Attribute service class with WebService and WebMethod

  28. ASP.NET Web Services

  29. Next... What’s .NET? Common aspects of ASP.NET Specific ASP.NET request handlers Web Pages (.ASPX) Web Services (.ASMX) Custom (.ASHX)

  30. ASP.NET Custom Handlers • Lower level mechanism for producing any response to an HTTP request • Author a .ASHX file • Write handler class in code behind • Use provided HttpContext object • Requestproperty • Responseproperty

  31. ASP.NET Custom Handlers

  32. Summary • ASP.NET released since 2002 • Plus in to all shipping IIS versions • Best affinity with IIS7 in Windows Server 2008 • Executes .NET code to process requests • Specific framework for Pages with many high-level controls for building a site • Specific framework for Services

More Related