Introduction to .NET Introduction to .NET What Does .NET Give You

advertisement
Page 1
Introduction to .NET
‰ A new platform for building Internet applications and Web
services
Introduction to .NET
‰ Contains runtime, messaging, services, data access,
interoperability, HTTP services, ASP+, and more
‰ Supports multi-language development
‰ Has a rich set of internet-supporting technologies
[email protected]
‰ 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 9, 2004
Page 2, November 9, 2004
What Does .NET Give You?
The .NET framework
VB
‰ Data access
‰ Functionality of the Win 32 API that is accessible through a
simple object model
C++
C#
JScript
…
Common Language Specification
ASP.NET
‰ C#
‰ Memory management
Windows Forms
ADO.NET and XML
‰ ASP.NET
Base Class Library
‰ Programming languages have been moved closer together
‰ Assembly
Common Language Runtime
Windows
Page 3, November 9, 2004
COM+ Services
Page 4, November 9, 2004
Common Type System and CLS
The .NET framework
VB
C++
C#
JScript
…
Common Language Specification
ASP.NET
Windows Forms
ADO.NET and XML
Base Class Library
Common Type
System(CTS)
Common Language Runtime
C+
+
CLS
Visual Studio.NET
‰ CLS(Common Language Specification) Compliant Attribute
z A subset of Common Type System
z Assembly can be tagged with
[assembly: System.CLSCompliant(true)]
Compiler issues a warning if non compliant types are used.
z Solves the cross language access problem in COM
(e.g C++ has types that is not supported by VB)
z (Private) types, methods may still be marked with
[CLSCompliant(false)]
Page 5, November 9, 2004
Visual Studio.NET
‰ The VB language has been upgraded
VB
Windows
COM+ Services
Page 6, November 9, 2004
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority
is strictly forbidden. © 1999 ABB Automation Products AB
Page 2
Languages Supported by .NET
The .NET framework
VB
‰ C#
‰ APL
‰ C++
‰ Cobol
‰ VB
‰ Component Pascal
‰ JScript
‰ Eiffel
‰ Standard ML
‰ Haskell
‰ SmallTalk
‰ Mercury
‰ Scheme
‰ Oberon
‰ Python
‰ Perl
‰ ...
‰ ...
C++
C#
JScript
…
Common Language Specification
Windows Forms
ADO.NET and XML
Base Class Library
Common Language Runtime
Note that the languages typically have to be extended
to handle managed code, attributes etc
which makes them .NET Specific
Page 7, November 9, 2004
Windows
Visual Studio.NET
ASP.NET
COM+ Services
Page 8, November 9, 2004
Common Language Runtime
Common Language Runtime(simplified)
Base Class Library Support
Type Checker
Exception Manager
Security Engine
Debug Engine
IL to Native
Compilers
Code
Manager
.NET PE
File
Class
Loader
JIT
COM Marshaler
Verifier
Thread Support
Managed
Native Code
Garbage
Collector
JIT Compilers
Class Loader
CLR’s Virtual Execution Engine
Page 9, November 9, 2004
Page 10, November 9, 2004
The .NET framework
VB
C++
C#
JScript
Base Class Library Namespaces
System
…
Common Language Specification
Windows Forms
ADO.NET and XML
Base Class Library
Common Language Runtime
Windows
Page 11, November 9, 2004
COM+ Services
Visual Studio.NET
ASP.NET
Collections
Security
Configuration
ServiceProcess
Diagnostics
Text
Globalization
Threading
IO
Runtime
InteropServices
Net
Reflection
Remoting
Resources
Serialization
Page 12, November 9, 2004
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority
is strictly forbidden. © 1999 ABB Automation Products AB
Page 3
The .NET framework
VB
C++
C#
Database Support in .NET
JScript
‰ Create your database
…
‰ Use Visual Studio to create
Datalink and typed dataset out
of your database.
Common Language Specification
Windows Forms
ADO.NET and XML
Base Class Library
Common Language Runtime
Windows
Visual Studio.NET
ASP.NET
‰ open OleDbConnection
CustomerSet
‰ OleDbDataAdapter for
SQL command
ADO.NET
‰ Use the adapter to fill out
your custom dataset with
the requested information
CustomerInfo
DB
‰ Modify your dataset
‰ Create update command
with the OleDbCommandBuilder
‰ Update the database with the adapter
(given your dataset)
COM+ Services
Page 13, November 9, 2004
Page 14, November 9, 2004
XML Support
The .NET framework
VB
‰ XML Is used everywhere
C++
C#
JScript
…
Common Language Specification
‰ Store / Retrieve Datasets in XML
ASP.NET
‰ XMLDataDocument
W3C Document Object Model (DOM)
Windows Forms
ADO.NET and XML
‰ XMLNode
Base Class Library
‰ XPath, XslTransform
‰ XMLSerialization
Common Language Runtime
‰...
Windows
Page 15, November 9, 2004
Visual Studio.NET
‰ XMLTextReader, XMLTextWriter
z
[Customers]
COM+ Services
Page 16, November 9, 2004
ASP.NET and Web Forms
Windows Forms
Web Browser
IIS – Web Server
HTML
Page
Genreated HTML
Postback
ASP.NET Page
HTML
Program
Component
Component
Component
SOAP
WebService
‰
Components needed to create windows applications
‰
WIN32 at last hidden with real OOP!
‰
Visual Inheritance
‰
Same controls used from all languages
‰
Consistent naming of properties, methods and behaviour!!!!
‰
Forms + Listboxes, Buttons etc
‰
WIN32 specific
z
Builds pretty much on intrinsic WIN32 functionality
z
Makes it difficult to support.
DB
Component
Page 17, November 9, 2004
Page 18, November 9, 2004
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority
is strictly forbidden. © 1999 ABB Automation Products AB
Page 4
The .NET framework
VB
C++
C#
JScript
Evolution of COM
…
Common Language Specification
Windows Forms
ADO.NET and XML
Base Class Library
Common Language Runtime
Windows
Page 19, November 9, 2004
Visual Studio.NET
ASP.NET
COM
COM
COM+
COM+
MTS
MTS
COM+ Services
Page 20, November 9, 2004
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority
is strictly forbidden. © 1999 ABB Automation Products AB
Download