Вы находитесь на странице: 1из 4

Introduction to .

NET
A new platform for building Internet applications and Web services

Introduction to .NET
daniel.flemstrom@mdh.se

Contains runtime, messaging, services, data access, interoperability, HTTP services, ASP+, and more Supports multi-language development Has a rich set of internet-supporting technologies A common class library with a standard set of classes which all inherits from a base class called Object The .Net Frameworks Object Model is called VOS Virtual Object System

Page 1, November 11, 2003

Page 2, November 11, 2003

What Does .NET Give You?


Data access Functionality of the Win 32 API that is accessible through a simple object model The VB language has been upgraded C# Memory management ASP.NET Programming languages have been moved closer together Assembly

The .NET framework


VB C++ C# JScript

Common Language Specification Visual Studio.NET Visual Studio.NET ASP.NET Windows Forms

ADO.NET and XML Base Class Library Common Language Runtime Windows COM+ Services

Page 3, November 11, 2003

Page 4, November 11, 2003

Common Type System and CLS


CLS(Common Language Specification) Compliant Attribute A subset of Common Type System Assembly can be tagged with [assembly: System.CLSCompliant(true)] Compiler issues a warning if non compliant types are used. Solves the cross language access problem in COM (e.g C++ has types that is not supported by VB) (Private) types, methods may still be marked with [CLSCompliant(false)]
Common Type System(CTS)
C+ +

The .NET framework


VB C++ C# JScript

Common Language Specification Visual Studio.NET Visual Studio.NET ASP.NET Windows Forms

ADO.NET and XML Base Class Library Common Language Runtime

CLS

VB

Windows
Page 6, November 11, 2003

COM+ Services

Page 5, November 11, 2003

Languages Supported by .NET


C# C++ VB JScript Standard ML SmallTalk Scheme Python ... APL Cobol Component Pascal Eiffel Haskell Mercury Oberon Perl ...
Note that the languages typically have to be extended to handle managed code, attributes etc which makes them .NET Specific
Page 7, November 11, 2003

The .NET framework


VB C++ C# JScript

Common Language Specification Visual Studio.NET Visual Studio.NET ASP.NET Windows Forms

ADO.NET and XML Base Class Library Common Language Runtime Windows
Page 8, November 11, 2003

COM+ Services

Common Language Runtime


Base Class Library Support Thread Support Type Checker Security Engine IL to Native Compilers Code Manager Class Loader COM Marshaler Exception Manager Debug Engine Garbage Collector

Common Language Runtime(simplified)


.NET PE File

Class Loader

Verifier

JIT Compilers CLRs Virtual Execution Engine

Page 9, November 11, 2003

Page 10, November 11, 2003

The .NET framework


VB C++ C# JScript

Base Class Library Namespaces


System Collections Configuration Diagnostics Globalization IO Net Reflection Resources
Page 12, November 11, 2003

Common Language Specification Visual Studio.NET ASP.NET Windows Forms

Security ServiceProcess Text Threading Runtime InteropServices Remoting Serialization

ADO.NET and XML Base Class Library Common Language Runtime Windows
Page 11, November 11, 2003

COM+ Services

JIT

Managed Native Code

The .NET framework


VB C++ C# JScript

Database Support in .NET


Create your database Use Visual Studio to create Datalink and typed dataset out of your database.

Common Language Specification Visual Studio.NET ASP.NET Windows Forms

[Customers]
CustomerSet ADO.NET

open OleDbConnection OleDbDataAdapter for SQL command Use the adapter to fill out your custom dataset with the requested information Modify your dataset Create update command with the OleDbCommandBuilder Update the database with the adapter (given your dataset)
Page 14, November 11, 2003

ADO.NET and XML Base Class Library Common Language Runtime Windows
Page 13, November 11, 2003

CustomerInfo DB

COM+ Services

XML Support
XML Is used everywhere Store / Retrieve Datasets in XML XMLTextReader, XMLTextWriter XMLDataDocument W3C Document Object Model (DOM) XMLNode XPath, XslTransform XMLSerialization ...

The .NET framework


VB C++ C# JScript

Common Language Specification Visual Studio.NET Visual Studio.NET ASP.NET Windows Forms

ADO.NET and XML Base Class Library Common Language Runtime Windows COM+ Services

Page 15, November 11, 2003

Page 16, November 11, 2003

ASP.NET and Web Forms


Web Browser IIS Web Server

Windows Forms
Components needed to create windows applications WIN32 at last hidden with real OOP! Visual Inheritance Same controls used from all languages
ASP.NET Page

HTML Page

Genreated HTML

Postback

Consistent naming of properties, methods and behaviour!!!! Forms + Listboxes, Buttons etc
Component

HTML

WIN32 specific Builds pretty much on intrinsic WIN32 functionality Makes it difficult to support.

Program
SOAP

Component Component WebService DB Component

Page 17, November 11, 2003

Page 18, November 11, 2003

The .NET framework


VB C++ C# JScript

Evolution of COM

Common Language Specification Visual Studio.NET ASP.NET Windows Forms

COM COM

COM+ COM+

ADO.NET and XML Base Class Library Common Language Runtime Windows
Page 19, November 11, 2003

MTS MTS

COM+ Services
Page 20, November 11, 2003

Вам также может понравиться