Sunteți pe pagina 1din 43

Heart

of .Net strategy .NET Framework is a platform for building, deploying and running Web Services and applications.

A new development platform to build integrated, service-oriented applications regardless of platforms and languages

VB

C++

C#

Perl Python

User Interface Web Services ASP.NET ADO.NET: Data and XML Base Framework Common Language Runtime
MSMQ (Message Queuing) COM+ (Transactions, Partitions, Object Pooling) IIS ADO

.NET

Framework consists

Common Language Run time


A language-neutral development & execution environment that provide services to help manage application execution.

Framework class library ( FCL )


A consistent , object- oriented library or prepackaged functionality.

C# source C# code

VB source VB Code

JScript source Jscript code

C# compiler
Managed module

VB compiler
Managed module

JScript compiler
Managed module

Common Language Runtime (CLR)

.NET Framework Class Library Support Thread Support Type Checker Security Engine MSIL to Native Compilers Code Manager Class Loader COM Marshaler Exception Manager Debugger Garbage Collection

Code

management ( loading and execution ) Application memory isolation Verification type safety Conversion of IL to native code Access to metadata Managing memory for managed objects Enforcement of code access security Exception handling Interoperation between managed code, COM objects.

CTS

defines the underlying object model:


Field: data variable Method: operation of an object Property: special get/set method Event: notification mechanism

IL

code takes full advantage of all CTS features CTS does not support all known OOfeatures (e.g., multiple inheritance) Framework Class Library is based on the CTS

Provides built-in data types Provides mechanism to define, manage and use new types Provide common type representation across all languages Cross language inheritance, exceptions, etc

C++ C# CLS

CLR/ CTS/IL

Visual Basic

All .NET source code is compiled to IL This IL is then converted to machine code at run time by Just in Time ( JIT ) Base Class compiler
Library Class Loader

Source Code

Compiler

IL Code & Meta Data

EXE or DLL

Verifier JIT Compiler Native Code

Linker

Managed

code runs inside the environment of CLR. All C#, VB.NET and Jscript .NET code is managed by default. VB, VC++ code is unmanaged.

An assembly is the primary building block of a .NET Framework application. It is a collection of functionality that is built, versioned and deployed as single implementation unit ( as one or more files )

Assembly.dll
Manifest

Type Metadata

MSIL Code

Resource

Assembly.dll Manifest

AssemblyRes.dll

Resources

Type Metadata

MSIL Code

Resource

Namespace Namespace

is logically group of class. can span multiple

assembly. For example :


System.Web.UI System.Data

Feature
Primary Aim

ADO
Client/server coupled

ADO.NET
Disconnected collection of data from data server Uses DATASET object (contains one or more DATATABLE objects) Uses DATASETCOMMAND object with OLEDB

Form of data in memory

Uses RECORDSET object (contains one table)

Disconnected access

Uses CONNECTION object and RECORDSET object with OLEDB Uses COM to marshal RECORDSET

Disconnected access across multi-tiers

Transfers DATASET object via XML. No data conversions required

Feature
XML capabilities XML aware

ADO

ADO.NET
XML is the native transfer medium for the objects

Firewalls

Firewalls block system-level COM marshalling

XML flows through the firewall via HTTP

Code

Coupled to the language used, various implementation

Managed code library Uses Common Language Runtime, therefore, language agnostic

Connection-oriented

Keeps the connection to the data base alive

Intended for applications with:


short running transactions only a few parallel accesses up-to-date data

Connectionless

No permanent connection to the data source Data cached in main memory

Changes in main memory changes in data

source Intended for applications with:


many parallel and long lasting accesses (e.g.: web applications)

Assembly: System.Data.dll Namespaces: System.Data general data types System.Data.Common classes for implementing providers System.Data.OleDb OLE DB provider System.Data.SqlClient Microsoft SQL Server provider System.Data.SqlTypes data types for SQL Server System.Data.Odbc ODBC provider (>.NET 1.1) System.Data.OracleClient Oracle provider (>.NET 1.1)

DataSet

DataView Tables
DataTable DataViewManager
DataRow(s)

Relations
DataRelation

DataColumn Constraint(s)

DataViewSettings
DataViewSetting DataViewSetting

DataRelation
DataTable

DataTable

Dataset DataTable

DataRow DataColumn etc.

Data Relation ForeignKeyConstraint

System.Data.Common Namespace
DataAdapter DataTableMapping etc. DbDataRecord

System.Data.SqlClient Namespace SqlConnection SqlCommand SqlDataReader etc.

System.Data.OleDb Namespace OleDbConnection OleDbCommand OleDbDataReader etc.

Your Provider

YourConnection YourCommand YourDataReader etc.

ASP.NET is a powerful and flexible server-side technology for creating dynamic Web Pages

ASP
Scripting language not compiled Blend of HTML and script on one page Developer needs to code all server-side actions Debugging difficult

ASP.NET
Compiled code full language support Code behind page separate VB file Server-side controls handle most boiler-plate coding Debugging runs in the IDE ASP and ASP.NET can coexist on the same IIS Server

Presentation Tier UI Pages (.htm) Business Logic Tier

ASP Page
(.asp)

Graphic Files

ADO

COM Objects

COM+ Services

Data Tier

Data Source

Presentation Tier

UI Pages (.htm)

Web Form
(.aspx)
Code-Behind File (.aspx.vb or .aspx.cs) Graphic Files

User Controls (.ascx)


Business Logic Tier Proxy XML Web Services (.asmx) Data Tier

ADO.NET .NET Objects Data Source

RCW COM COM+ Objects Services

Pages

Services

HttpHandlers
Caching Auth Sessions
Session State
ASPNET_STATE

HttpModules
ASPNET_WP

ASPNET_ISAPI
INETINFO

Request

IIS (aspnet_isapi.dll)
Response Response

asmx handler

aspx handler

ASP 1.1

ASP 2.0

HTML Server Controls


You prefer an HTML-like object model You are working with existing HTML pages and want to quickly add ASP.NET Web page functionality The control will interact with client and server script

Web Server Controls


You prefer a Visual Basiclike programming model You are writing a page that might be used by a variety of browsers You need specific functionality such as a calendar or ad rotator

Bandwidth is limited

Bandwidth is not a problem

HTML Server Description Control HtmlAnchor Navigation link. HtmlButton Customizable input button. HtmlTable Programmatically built table. HtmlInputFile Handles uploading of files from client to server. HtmlImage Renders images. HtmlForm User-input form. HTML server controls.

Web Server Control AdRotator DataGrid

Description

Presents ad images and ad banners. Displays tabular data and supports selecting, sorting and editing data. TextBox Enables user to enter text. HyperLink Creates a link to another document. DropDownList Provides a single-select drop-down list. Calendar Displays a month calendar from which users can select dates. Web server controls.

Web Service is application logic accessible to programs via standard web protocols in a platform independent way. .asmx file
Virtual path of ASP.NET Web application Stand-alone or part of an existing solution
Web Services infrastructure Discovery, description, and wire format Service Oriented Architecture Service invoked , published, discovered

Request .vsdisco

Discovery
Return disco (XML) Request WSDL

Web Service Client

Description Return WSDL (XML) Request .asmx Protocol Return response (XML)

Web Service

Discover Services What services do exist? Where are they? (URL) E.g.: UDDI, DISCO client(s) Service Description (in WSDL) What message does the service know and how are those called? Service Calls Using services via SOAP, HTTP, XML-RPC, ...

Web Service + container

Enables

distributed computing by allowing one machine to call methods on other machines Defining the Web Service
Remote machine
Store Web service Web-service methods Remote Procedure Call (RPC)

Business-to-business (B2B) transactions


Viewing

the Web Service

Service Description
Web Service Description Language (WSDL)

Middleware

for distributed applications For remote procedure calls und data exchange Open standard based on XML For loosely coupled software services Independent of programming languages and operating systems Utilizing existing Internet protocols and server architectures

SOAP

is a lightweight protocol for exchange of information in a decentralized, distributed environment. SOAP uses XML namespace A SOAP message consists of an envelop.

envelope (<Envelope>) as container letter head (<Header>) with meta information (Message Headers) letter (<Body>)

<Envelope> <Header> Message Header Message Header

<Body> Data

<Fault> Fault Descriptions

with arbitrary XML data


fault descriptions

WSDL defines an XML grammer for describing network services as collections of communication endpoints capable of exchanging message. WSDL document describe protocol supported by SOAP, HTTP-GET, HTTP-POST ) WSDL document specifies the address of web service

UDDI is a cross industry initiative to create a global registry of web services. A central registry of web services Specification of structure of the registry

Thank You

S-ar putea să vă placă și