SlideShare a Scribd company logo
.NET
Overview Overview of the Microsoft .NET Framework Overview of ASP.Net Overview of WebServices Overview of ADO. Net
Overview of Framework
Overview of the Microsoft .NET Framework The .NET Framework Common Language Runtime The .NET Framework Class Library ADO.NET: Data and XML What is an XML Web Service? Web Forms and Services Garbage Collection
The .NET Framework Win32 Common Language Runtime .NET Framework Class Library ADO.NET: Data and XML Web Services User Interface VB C++ C# ASP.NET Perl Python … Message Queuing COM+ (Transactions, Partitions,  Object Pooling) IIS WMI
Common Language Runtime .NET Framework Class Library Support Class Loader Thread Support COM Marshaler Type Checker Exception Manager MSIL to Native Compilers Code Manager Garbage Collection Security Engine Debugger
The .NET Framework Class Library Spans All Programming Languages Enables cross-language inheritance and debugging Integrates well with tools Is Object-Oriented and Consistent Enhances developer productivity by reducing the number of APIs to learn Has a Built-In Common Type System Is Extensible Makes it easy to add or modify framework features Is Secure Allows creation of secure applications
Benefits of Using the .NET Framework Based on Web standards and practices Functionality of .NET classes is universally available Code is organized into hierarchical namespaces and classes Language independent Windows  API ASP .NET  Framework 1980’s 1990’s 2000’s Visual Basic MFC/ATL
ADO.NET: Data and XML ADO.NET: Data and XML OleDb SqlClient Common SQLTypes System.Data XSL Serialization XPath System.Xml
ASP.NET Web Forms and Services System.Web Configuration SessionState Caching Security Services Description Discovery Protocols UI HtmlControls WebControls
The Process of Managed Execution Class Loader JIT Compiler with optional verification Execution Security Checks EXE/DLL (MSIL and  metadata) Class Libraries (MSIL and  metadata) Trusted, pre-JITed code only Call to an uncompiled method Runtime Engine Managed Native  Code Compiler Source Code
Just-In-Time Compilation Process for Code Execution MSIL converted to native code as needed Resulting native code stored for subsequent calls JIT compiler supplies the CPU-specific conversion
Assemblies Assembly Manifest Multiple Managed  Modules and Resource Files Are Compiled to  Produce an Assembly Managed Module (MSIL and Metadata) Managed Module (MSIL and Metadata) Resource Files .html .gif
Creating a Simple .NET Framework Component Using Namespaces and Declaring the Class Creating the Class Implementation Implementing Structured Exception Handling Creating a Property Compiling the Component
Using Namespaces and Declaring the Class Create a New Namespace Declare the Class using System; namespace CompCS {...} public class StringComponent {...}
Creating the Class Implementation Declare a Private Field of Type Array of String Elements Create a Public Default Constructor Assign the stringSet Field to an Array of Strings stringSet = new string[] { "C# String 0", "C# String 1", ... }; private string[] stringSet; public StringComponent() {...}
Implementing Structured Exception Handling Implement the GetString Method Create and Throw a New Object of Type IndexOutOfRangeException Exceptions Caught by the Caller Using a try/catch/finally Statement Structured Exception Handling Replaces HRESULT-Based Error Handling in COM public string GetString(int index) {...} if((index < 0) || (index >= stringSet.Length)) { throw new IndexOutOfRangeException(); } return stringSet[index];
Creating a Property Create a Read-Only Count Property to Get the Number of String Elements in the stringSet Array public int Count { get { return stringSet.Length; } }
Compiling the Component Use the /target:library Switch to Create a DLL Otherwise, an executable with a .dll file extension is created instead of a DLL library csc /out:CompCS.dll /target:library CompCS.cs
Creating a Simple Console Client Using the Libraries Instantiating the Component Calling the Component Building the Client
Using the Libraries Reference Types Without Having to Fully Qualify the Type Name If Multiple Namespaces Contain the Same Type Name, Create a Namespace Alias to Remove Ambiguity   using CompCS; using CompVB; using CSStringComp = CompCS.StringComponent; using VBStringComp = CompVB.StringComponent;
Instantiating the Component Declare a Local Variable of Type StringComponent Create a New Instance of the StringComponent Class //… using CSStringComp = CompCS.StringComponent; //… CSStringComp myCSStringComp = new CSStringComp();
Calling the Component Iterate over All the Members of StringComponent and Output the Strings to the Console for (int index = 0;    index < myCSStringComp.Count; index++) { Console.WriteLine   (myCSStringComp.GetString(index)); }
Building the Client Use the /reference Switch to Reference the Assemblies That Contain the StringComponent Class csc /reference:CompCS.dll,CompVB.dll    /out:ClientCS.exe ClientCS.cs
 
Memory Management Basics Developer Backgrounds Manual vs. Automatic Memory Management Memory Management of .NET Framework Types Simple Garbage Collection
Manual vs. Automatic Memory Management Manual Memory Management Programmer manages memory Common Problems Failure to release memory Invalid references to freed memory .NET Runtime Provides Automatic Memory Management Eases programming task Eliminates a potential source of bugs
Memory Management of .NET Framework Types Instances of Value Types Use Stack Memory Allocation and deallocation are automatic and safe Managed Objects Are Reference Types and Use Heap Memory Created by calls to the new operator Freed by garbage collection
Simple Garbage Collection Simple Garbage Collection Algorithm Wait until managed code threads are in a safe state Build a graph of all reachable objects Move reachable objects to compact heap - Unreachable objects’ memory is reclaimed Update references to all moved objects Reference Cycles Are Handled Automatically
Multimedia: Simple Garbage Collection
Non-Memory Resource Management Implicit Resource Management Explicit Resource Management
Implicit Resource Management Finalization Garbage Collection with Finalization  Finalization Guidelines Controlling Garbage Collection
Finalization Finalize Code Called by Garbage Collection In C#, the Finalize Code Is Provided by a Destructor  Use C# Destructor to Implicitly Close a FileStream class Foo { private System.IO.FileStream fs; //... public Foo() {  fs = new System.IO.FileStream(   &quot; bar &quot; , FileMode.CreateNew); } ~Foo() { fs.Close(); } }
Garbage Collection with Finalization Runtime Maintains a List of Objects That Require Finalization Finalization queue Garbage Collection Process Invoked Unreachable Objects Requiring Finalization References added to freachable queue Objects are now reachable and not garbage Move Reachable Objects to Compact the Heap Unreachable objects' memory is reclaimed Update References to All Moved Objects
Garbage Collection with Finalization ( continued ) Finalize Thread Runs Executes freachable objects'  Finalize  methods References removed from freachable queue Unless resurrected, objects are now garbage May be reclaimed next time garbage collection occurs
Multimedia: Garbage Collection
Controlling Garbage Collection To Force Garbage Collection To Suspend Calling Thread Until Thread’s Queue of Finalizers is Empty  To Allow a Finalized Resurrected Object to Have Its Finalizer Called Again To Request the System Not to Call the Finalizer Method void System.GC.Collect();   void System.GC.WaitForPendingFinalizers();  void System.GC.ReRegisterForFinalize(object obj);  void System.GC.SuppressFinalize(object obj);
The IDisposable Interface and the Dispose Method Inherit from the IDisposable Interface Implement the Dispose Method Follow the .NET Framework SDK’s Design Pattern class ResourceWrapper : IDisposable { // see code example for details }
Overview of ASP.NET
Overview of ASP.NET What is ASP.NET? ASP.NET Web Application Multimedia: ASP.NET Execution Model
What is ASP.NET? Evolutionary, more flexible successor to Active Server Pages Dynamic Web pages that can access server resources Server-side processing of Web Forms XML Web services let you create distributed Web applications Browser-independent Language-independent
ASP.NET Web Application XML Data Database Internet Page1. aspx Page2. aspx Web Services Components Web Forms Code-behind pages global. asax Web. config machine. config ASP.NET Web Server Output Cache Clients
Multimedia: ASP.NET Execution Model
Creating Web Forms What is a Web Form?  Creating a Web Form with Visual Studio .NET
What Is a Web Form? <%@ Page Language=&quot;vb&quot; Codebehind=&quot;WebForm1.aspx.vb&quot; SmartNavigation=&quot;true&quot;%> <html> <body ms_positioning=&quot;GridLayout&quot;>   <form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;>   </form> </body> </html> .aspx extension Page attributes @ Page  directive  Body attributes Form attributes
Using Server Controls What is a Server Control? Types of Server Controls HTML Server Controls  Web Server Controls  Selecting the Appropriate Control
What is a Server Control? Runat=&quot;server&quot; Events happen on the server View state saved Have built-in functionality Common object model All have  Id  and  Text  attributes Create browser-specific HTML <asp:Button id=&quot;Button1&quot; runat=&quot;server&quot;  Text=&quot;Submit&quot;/>
Types of Server Controls HTML server controls Web server controls Intrinsic controls Validation controls Rich controls List-bound controls Internet Explorer Web controls
HTML Server Controls Based on HTML elements Exist within the System.Web.UI.HtmlControls namespace <input type= &quot; text &quot;  id= &quot; txtName &quot;   runat= &quot; server &quot;  / >
Web Server Controls Exist within the   System.Web.UI.WebControls namespace Control syntax HTML that is generated by the control <asp:TextBox id= &quot; TextBox1 &quot; runat= &quot; server &quot;> Text_to_Display </asp:TextBox> <input name= &quot; TextBox1&quot;  type=&quot;text&quot;  value=&quot; Text_to_Display &quot; Id=&quot;TextBox1&quot;/>
Selecting the Appropriate Control You need specific functionality such as a calendar or ad rotator The control will interact with client and server script You are writing a page that might be used by a variety of browsers You are working with existing HTML pages and want to quickly add ASP.NET Web page functionality You prefer a Visual Basic-like programming model You prefer an HTML-like object model Use  Web  Server Controls if: Use HTML Server Controls if: Bandwidth is not a problem Bandwidth is limited
 
Overview of ADO .NET
Overview of ADO.NET Connected Applications Disconnected Applications
Evolution of ADO to ADO.NET Connection ADO ADO.NET Command Recordset XxxConnection XxxCommand DataSet XxxTransaction XxxDataReader XxxDataAdapter
Object Model for Connected Applications Data Source XxxCommand Classes in a Connected Application XxxConnection XxxParameter XxxDataReader XxxParameter XxxParameter XmlReader
Disconnected Architecture Employees Orders Customers Products Categories Categories Products SqlDataAdapter OleDbDataAdapter SQL Server 2000 Customers Orders SQL Server 6.5 DataSet XML Web service XmlDataDocument XML File
What Is a DataAdapter? Data source DataAdapter DataTable DataTable DataSet DataAdapter Fill Update Fill Update
The XxxDataAdapter Object Model sp_SELECT XxxCommand SelectCommand UpdateCommand InsertCommand DeleteCommand XxxDataAdapter XxxCommand XxxCommand XxxCommand XxxConnection sp_UPDATE sp_INSERT sp_DELETE XxxDataReader
 
Overview of Web Services
Overview Service-Oriented Architecture Web Service Architectures and Service-Oriented Architecture Roles in a Web Service Architecture The Web Service Programming Model
What Is an XML Web Service? A programmable application component  accessible via standard Web protocols SOAP XML Web services consumers can send and receive messages using XML  WSDL Web Services  Description Language XML Web services are defined in terms of the formats and ordering of messages Built using open Internet protocols  XML & HTTP UDDI Universal Description,  Discovery, and Integration Provide a Directory of Services on the Internet Open   Internet   Protocols XML Web service
Service-Oriented Architecture Service Broker Service Consumer Service Provider Bind Publish Find
Web Service Architectures and Service-Oriented Architecture Overview of Web Service Architectures Web Services as a Service-Oriented Architecture Implementation  Demonstration: An Electronic Funds Transfer Web Service Solution
Overview of Web Service Architectures Service Broker Publish Find Service Consumer Service Provider Bind Internet Web Service Provider Web Service Consumer UDDI (Web Service Broker)
Web Services as a Service-Oriented Architecture Implementation UDDI Any Client SOAP SOAP .NET  Web Service SOAP IIS
Roles in a Web Service Architecture The Web Service Provider The Web Service Consumer The Web Service Broker
The Web Service Provider Web Servers The .NET Common Language Runtime
The Web Service Consumer Minimum Functionality Service Location Proxies Synchronous vs. Asynchronous Calls
The Web Service Broker Interactions Between Broker and Provider Interactions Between Broker and Consumer UDDI Registries
 
Questões ??????? [email_address]

More Related Content

PPTX
C# advanced topics and future - C#5
PPT
Introduction to .Net
PPTX
.NET and C# Introduction
PDF
Remote Method Invocation, Advanced programming
PPT
ASP.NET 01 - Introduction
PPTX
.Net programming with C#
PPTX
Namespaces in C#
C# advanced topics and future - C#5
Introduction to .Net
.NET and C# Introduction
Remote Method Invocation, Advanced programming
ASP.NET 01 - Introduction
.Net programming with C#
Namespaces in C#

What's hot (20)

PPTX
Flex and PHP For the Flash Folks
PDF
.NET Core, ASP.NET Core Course, Session 3
PPT
Working in Visual Studio.Net
PPTX
Dependency injection presentation
PPTX
Introduction to .NET with C# @ university of wayamba
PPT
Visual Studio.NET
PPTX
JavaScript, VBScript, AJAX, CGI
PPTX
Introduction to .NET Programming
PDF
PPT
Presentation On Com Dcom
PPT
Nakov - .NET Framework Overview - English
PDF
.NET Core, ASP.NET Core Course, Session 17
PPTX
Unmanged code InterOperability
PPT
A Short Java RMI Tutorial
PPTX
Introduction to vb.net
PPSX
Introduction to .net framework
PPT
PPT
.net framework
PPT
9781305078444 ppt ch04
PPTX
dot net technology
Flex and PHP For the Flash Folks
.NET Core, ASP.NET Core Course, Session 3
Working in Visual Studio.Net
Dependency injection presentation
Introduction to .NET with C# @ university of wayamba
Visual Studio.NET
JavaScript, VBScript, AJAX, CGI
Introduction to .NET Programming
Presentation On Com Dcom
Nakov - .NET Framework Overview - English
.NET Core, ASP.NET Core Course, Session 17
Unmanged code InterOperability
A Short Java RMI Tutorial
Introduction to vb.net
Introduction to .net framework
.net framework
9781305078444 ppt ch04
dot net technology
Ad

Similar to Dot Net Framework (20)

PPT
Introduction to Visual Studio.NET
PPT
2310 b 03
PPTX
.Net Framework Introduction
PPT
Developing an ASP.NET Web Application
PPT
How to develop asp web applications
PPS
Asp Architecture
PPT
Dot netsupport in alpha five v11 coming soon
PPT
Visual studio.net
PPT
CFInterop
PPT
Whidbey old
PPTX
PPT
Asp.net
PPT
Introduction To Dotnet
PPTX
WinRT Holy COw
PPTX
Node.js Workshop - Sela SDP 2015
PPT
EnScript Workshop
PPT
Asp dot net long
PPT
Visual studio.net
PPT
As Pdotnet
PPT
Asp.net architecture
Introduction to Visual Studio.NET
2310 b 03
.Net Framework Introduction
Developing an ASP.NET Web Application
How to develop asp web applications
Asp Architecture
Dot netsupport in alpha five v11 coming soon
Visual studio.net
CFInterop
Whidbey old
Asp.net
Introduction To Dotnet
WinRT Holy COw
Node.js Workshop - Sela SDP 2015
EnScript Workshop
Asp dot net long
Visual studio.net
As Pdotnet
Asp.net architecture
Ad

Recently uploaded (20)

PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Machine Learning_overview_presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Machine Learning_overview_presentation.pptx
NewMind AI Weekly Chronicles - August'25-Week II
The Rise and Fall of 3GPP – Time for a Sabbatical?
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A comparative analysis of optical character recognition models for extracting...
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Assigned Numbers - 2025 - Bluetooth® Document
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf

Dot Net Framework

  • 2. Overview Overview of the Microsoft .NET Framework Overview of ASP.Net Overview of WebServices Overview of ADO. Net
  • 4. Overview of the Microsoft .NET Framework The .NET Framework Common Language Runtime The .NET Framework Class Library ADO.NET: Data and XML What is an XML Web Service? Web Forms and Services Garbage Collection
  • 5. The .NET Framework Win32 Common Language Runtime .NET Framework Class Library ADO.NET: Data and XML Web Services User Interface VB C++ C# ASP.NET Perl Python … Message Queuing COM+ (Transactions, Partitions, Object Pooling) IIS WMI
  • 6. Common Language Runtime .NET Framework Class Library Support Class Loader Thread Support COM Marshaler Type Checker Exception Manager MSIL to Native Compilers Code Manager Garbage Collection Security Engine Debugger
  • 7. The .NET Framework Class Library Spans All Programming Languages Enables cross-language inheritance and debugging Integrates well with tools Is Object-Oriented and Consistent Enhances developer productivity by reducing the number of APIs to learn Has a Built-In Common Type System Is Extensible Makes it easy to add or modify framework features Is Secure Allows creation of secure applications
  • 8. Benefits of Using the .NET Framework Based on Web standards and practices Functionality of .NET classes is universally available Code is organized into hierarchical namespaces and classes Language independent Windows API ASP .NET Framework 1980’s 1990’s 2000’s Visual Basic MFC/ATL
  • 9. ADO.NET: Data and XML ADO.NET: Data and XML OleDb SqlClient Common SQLTypes System.Data XSL Serialization XPath System.Xml
  • 10. ASP.NET Web Forms and Services System.Web Configuration SessionState Caching Security Services Description Discovery Protocols UI HtmlControls WebControls
  • 11. The Process of Managed Execution Class Loader JIT Compiler with optional verification Execution Security Checks EXE/DLL (MSIL and metadata) Class Libraries (MSIL and metadata) Trusted, pre-JITed code only Call to an uncompiled method Runtime Engine Managed Native Code Compiler Source Code
  • 12. Just-In-Time Compilation Process for Code Execution MSIL converted to native code as needed Resulting native code stored for subsequent calls JIT compiler supplies the CPU-specific conversion
  • 13. Assemblies Assembly Manifest Multiple Managed Modules and Resource Files Are Compiled to Produce an Assembly Managed Module (MSIL and Metadata) Managed Module (MSIL and Metadata) Resource Files .html .gif
  • 14. Creating a Simple .NET Framework Component Using Namespaces and Declaring the Class Creating the Class Implementation Implementing Structured Exception Handling Creating a Property Compiling the Component
  • 15. Using Namespaces and Declaring the Class Create a New Namespace Declare the Class using System; namespace CompCS {...} public class StringComponent {...}
  • 16. Creating the Class Implementation Declare a Private Field of Type Array of String Elements Create a Public Default Constructor Assign the stringSet Field to an Array of Strings stringSet = new string[] { &quot;C# String 0&quot;, &quot;C# String 1&quot;, ... }; private string[] stringSet; public StringComponent() {...}
  • 17. Implementing Structured Exception Handling Implement the GetString Method Create and Throw a New Object of Type IndexOutOfRangeException Exceptions Caught by the Caller Using a try/catch/finally Statement Structured Exception Handling Replaces HRESULT-Based Error Handling in COM public string GetString(int index) {...} if((index < 0) || (index >= stringSet.Length)) { throw new IndexOutOfRangeException(); } return stringSet[index];
  • 18. Creating a Property Create a Read-Only Count Property to Get the Number of String Elements in the stringSet Array public int Count { get { return stringSet.Length; } }
  • 19. Compiling the Component Use the /target:library Switch to Create a DLL Otherwise, an executable with a .dll file extension is created instead of a DLL library csc /out:CompCS.dll /target:library CompCS.cs
  • 20. Creating a Simple Console Client Using the Libraries Instantiating the Component Calling the Component Building the Client
  • 21. Using the Libraries Reference Types Without Having to Fully Qualify the Type Name If Multiple Namespaces Contain the Same Type Name, Create a Namespace Alias to Remove Ambiguity using CompCS; using CompVB; using CSStringComp = CompCS.StringComponent; using VBStringComp = CompVB.StringComponent;
  • 22. Instantiating the Component Declare a Local Variable of Type StringComponent Create a New Instance of the StringComponent Class //… using CSStringComp = CompCS.StringComponent; //… CSStringComp myCSStringComp = new CSStringComp();
  • 23. Calling the Component Iterate over All the Members of StringComponent and Output the Strings to the Console for (int index = 0; index < myCSStringComp.Count; index++) { Console.WriteLine (myCSStringComp.GetString(index)); }
  • 24. Building the Client Use the /reference Switch to Reference the Assemblies That Contain the StringComponent Class csc /reference:CompCS.dll,CompVB.dll  /out:ClientCS.exe ClientCS.cs
  • 25.  
  • 26. Memory Management Basics Developer Backgrounds Manual vs. Automatic Memory Management Memory Management of .NET Framework Types Simple Garbage Collection
  • 27. Manual vs. Automatic Memory Management Manual Memory Management Programmer manages memory Common Problems Failure to release memory Invalid references to freed memory .NET Runtime Provides Automatic Memory Management Eases programming task Eliminates a potential source of bugs
  • 28. Memory Management of .NET Framework Types Instances of Value Types Use Stack Memory Allocation and deallocation are automatic and safe Managed Objects Are Reference Types and Use Heap Memory Created by calls to the new operator Freed by garbage collection
  • 29. Simple Garbage Collection Simple Garbage Collection Algorithm Wait until managed code threads are in a safe state Build a graph of all reachable objects Move reachable objects to compact heap - Unreachable objects’ memory is reclaimed Update references to all moved objects Reference Cycles Are Handled Automatically
  • 31. Non-Memory Resource Management Implicit Resource Management Explicit Resource Management
  • 32. Implicit Resource Management Finalization Garbage Collection with Finalization Finalization Guidelines Controlling Garbage Collection
  • 33. Finalization Finalize Code Called by Garbage Collection In C#, the Finalize Code Is Provided by a Destructor Use C# Destructor to Implicitly Close a FileStream class Foo { private System.IO.FileStream fs; //... public Foo() { fs = new System.IO.FileStream( &quot; bar &quot; , FileMode.CreateNew); } ~Foo() { fs.Close(); } }
  • 34. Garbage Collection with Finalization Runtime Maintains a List of Objects That Require Finalization Finalization queue Garbage Collection Process Invoked Unreachable Objects Requiring Finalization References added to freachable queue Objects are now reachable and not garbage Move Reachable Objects to Compact the Heap Unreachable objects' memory is reclaimed Update References to All Moved Objects
  • 35. Garbage Collection with Finalization ( continued ) Finalize Thread Runs Executes freachable objects' Finalize methods References removed from freachable queue Unless resurrected, objects are now garbage May be reclaimed next time garbage collection occurs
  • 37. Controlling Garbage Collection To Force Garbage Collection To Suspend Calling Thread Until Thread’s Queue of Finalizers is Empty To Allow a Finalized Resurrected Object to Have Its Finalizer Called Again To Request the System Not to Call the Finalizer Method void System.GC.Collect(); void System.GC.WaitForPendingFinalizers(); void System.GC.ReRegisterForFinalize(object obj); void System.GC.SuppressFinalize(object obj);
  • 38. The IDisposable Interface and the Dispose Method Inherit from the IDisposable Interface Implement the Dispose Method Follow the .NET Framework SDK’s Design Pattern class ResourceWrapper : IDisposable { // see code example for details }
  • 40. Overview of ASP.NET What is ASP.NET? ASP.NET Web Application Multimedia: ASP.NET Execution Model
  • 41. What is ASP.NET? Evolutionary, more flexible successor to Active Server Pages Dynamic Web pages that can access server resources Server-side processing of Web Forms XML Web services let you create distributed Web applications Browser-independent Language-independent
  • 42. ASP.NET Web Application XML Data Database Internet Page1. aspx Page2. aspx Web Services Components Web Forms Code-behind pages global. asax Web. config machine. config ASP.NET Web Server Output Cache Clients
  • 44. Creating Web Forms What is a Web Form? Creating a Web Form with Visual Studio .NET
  • 45. What Is a Web Form? <%@ Page Language=&quot;vb&quot; Codebehind=&quot;WebForm1.aspx.vb&quot; SmartNavigation=&quot;true&quot;%> <html> <body ms_positioning=&quot;GridLayout&quot;> <form id=&quot;Form1&quot; method=&quot;post&quot; runat=&quot;server&quot;> </form> </body> </html> .aspx extension Page attributes @ Page directive Body attributes Form attributes
  • 46. Using Server Controls What is a Server Control? Types of Server Controls HTML Server Controls Web Server Controls Selecting the Appropriate Control
  • 47. What is a Server Control? Runat=&quot;server&quot; Events happen on the server View state saved Have built-in functionality Common object model All have Id and Text attributes Create browser-specific HTML <asp:Button id=&quot;Button1&quot; runat=&quot;server&quot; Text=&quot;Submit&quot;/>
  • 48. Types of Server Controls HTML server controls Web server controls Intrinsic controls Validation controls Rich controls List-bound controls Internet Explorer Web controls
  • 49. HTML Server Controls Based on HTML elements Exist within the System.Web.UI.HtmlControls namespace <input type= &quot; text &quot; id= &quot; txtName &quot; runat= &quot; server &quot; / >
  • 50. Web Server Controls Exist within the System.Web.UI.WebControls namespace Control syntax HTML that is generated by the control <asp:TextBox id= &quot; TextBox1 &quot; runat= &quot; server &quot;> Text_to_Display </asp:TextBox> <input name= &quot; TextBox1&quot; type=&quot;text&quot; value=&quot; Text_to_Display &quot; Id=&quot;TextBox1&quot;/>
  • 51. Selecting the Appropriate Control You need specific functionality such as a calendar or ad rotator The control will interact with client and server script You are writing a page that might be used by a variety of browsers You are working with existing HTML pages and want to quickly add ASP.NET Web page functionality You prefer a Visual Basic-like programming model You prefer an HTML-like object model Use Web Server Controls if: Use HTML Server Controls if: Bandwidth is not a problem Bandwidth is limited
  • 52.  
  • 54. Overview of ADO.NET Connected Applications Disconnected Applications
  • 55. Evolution of ADO to ADO.NET Connection ADO ADO.NET Command Recordset XxxConnection XxxCommand DataSet XxxTransaction XxxDataReader XxxDataAdapter
  • 56. Object Model for Connected Applications Data Source XxxCommand Classes in a Connected Application XxxConnection XxxParameter XxxDataReader XxxParameter XxxParameter XmlReader
  • 57. Disconnected Architecture Employees Orders Customers Products Categories Categories Products SqlDataAdapter OleDbDataAdapter SQL Server 2000 Customers Orders SQL Server 6.5 DataSet XML Web service XmlDataDocument XML File
  • 58. What Is a DataAdapter? Data source DataAdapter DataTable DataTable DataSet DataAdapter Fill Update Fill Update
  • 59. The XxxDataAdapter Object Model sp_SELECT XxxCommand SelectCommand UpdateCommand InsertCommand DeleteCommand XxxDataAdapter XxxCommand XxxCommand XxxCommand XxxConnection sp_UPDATE sp_INSERT sp_DELETE XxxDataReader
  • 60.  
  • 61. Overview of Web Services
  • 62. Overview Service-Oriented Architecture Web Service Architectures and Service-Oriented Architecture Roles in a Web Service Architecture The Web Service Programming Model
  • 63. What Is an XML Web Service? A programmable application component accessible via standard Web protocols SOAP XML Web services consumers can send and receive messages using XML WSDL Web Services Description Language XML Web services are defined in terms of the formats and ordering of messages Built using open Internet protocols XML & HTTP UDDI Universal Description, Discovery, and Integration Provide a Directory of Services on the Internet Open Internet Protocols XML Web service
  • 64. Service-Oriented Architecture Service Broker Service Consumer Service Provider Bind Publish Find
  • 65. Web Service Architectures and Service-Oriented Architecture Overview of Web Service Architectures Web Services as a Service-Oriented Architecture Implementation Demonstration: An Electronic Funds Transfer Web Service Solution
  • 66. Overview of Web Service Architectures Service Broker Publish Find Service Consumer Service Provider Bind Internet Web Service Provider Web Service Consumer UDDI (Web Service Broker)
  • 67. Web Services as a Service-Oriented Architecture Implementation UDDI Any Client SOAP SOAP .NET Web Service SOAP IIS
  • 68. Roles in a Web Service Architecture The Web Service Provider The Web Service Consumer The Web Service Broker
  • 69. The Web Service Provider Web Servers The .NET Common Language Runtime
  • 70. The Web Service Consumer Minimum Functionality Service Location Proxies Synchronous vs. Asynchronous Calls
  • 71. The Web Service Broker Interactions Between Broker and Provider Interactions Between Broker and Consumer UDDI Registries
  • 72.