Microsoft .NET Framework Microsoft .NET Framework

quiverlickforkΛογισμικό & κατασκευή λογ/κού

2 Νοε 2013 (πριν από 3 χρόνια και 11 μήνες)

158 εμφανίσεις

Microsoft .NET Framework
Microsoft .NET Framework
7th Brazilian Symposium on Programming Languages
7th Brazilian Symposium on Programming Languages
Ouro Preto, MG, Brazil
Ouro Preto, MG, Brazil
-
-
May 28
May 28
-
-
30, 2003
30, 2003
Alisson Sol
Alisson Sol
Software Design Engineer Lead
Software Design Engineer Lead
Microsoft Corporation
Microsoft Corporation
Microsoft .NET Framework -2
Acknowledgements
Acknowledgements
Redmond teams
Redmond teams
Microsoft Business Solutions
Microsoft Business Solutions
Information Worker
Information Worker


New Markets
New Markets
Part I based on presentation by Brad Abrams
Part I based on presentation by Brad Abrams
Microsoft Brasil
Microsoft Brasil
University Relations
University Relations
Legal Warning
Legal Warning
Opinions in this presentation do not necessarily
Opinions in this presentation do not necessarily
represent those of Microsoft Corporation
represent those of Microsoft Corporation
Microsoft .NET Framework -3
Summary
Summary
Part I
Part I


.NET Framework Overview
.NET Framework Overview
Concepts
Concepts
Architecture
Architecture
Features
Features
Part II
Part II


Application Development
Application Development
Samples
Samples
Tools
Tools
Note
Note
Some concepts from C# language presented on
Some concepts from C# language presented on
another lecture
another lecture
Will not explain programming language details
Will not explain programming language details
.NET Framework Overview
.NET Framework Overview
Microsoft .NET Framework
Microsoft .NET Framework
-
-
Part I
Part I
Microsoft .NET Framework -5
Definition
Definition
Old
Old
.NET is the Microsoft platform for XML Web
.NET is the Microsoft platform for XML Web
services.
services.
New
New
.NET is the set of Microsoft technologies for
.NET is the set of Microsoft technologies for
connecting your world of information, people,
connecting your world of information, people,
systems, and devices.
systems, and devices.
.NET is infused into the Microsoft platform
.NET is infused into the Microsoft platform
providing the ability to build, host, deploy and
providing the ability to build, host, deploy and
consume XML Web service connected
consume XML Web service connected
solutions.
solutions.
Microsoft .NET Framework -6
Design Goals
Design Goals
Simplified development
Simplified development
Unified programming models
Unified programming models
Web standards and best practices
Web standards and best practices
Simple to deploy, run, & maintain
Simple to deploy, run, & maintain
Microsoft .NET Framework -7
Framework, Languages, And Tools
Framework, Languages, And Tools
Base Class Library
Common Language Specification
Common Language Runtime
Data and XML
VB
C++
C#
Visual Studio.NET
ASP.NET
JScript

Windows Forms
Microsoft .NET Framework -8
Framework, Languages, And Tools
Framework, Languages, And Tools
Base Class Library
Common Language Specification
Common Language Runtime
Data and XML
VB
C++
C#
Visual Studio.NET
JScript

ASP.NET
Windows Forms
Microsoft .NET Framework -9
CLR Design Goals
CLR Design Goals
Dramatically simplify
Dramatically simplify
application
application
development
development
Provide a robust and secure execution
Provide a robust and secure execution
environment
environment
Support multiple
Support multiple
programming
programming
languages
languages
Simplify deployment and
Simplify deployment and
management
management
Microsoft .NET Framework -10
The .NET Evolution
The .NET Evolution
Before COM, applications were
completely separate entities
with little or no integration
Application
Code and data
structures
Microsoft .NET Framework -11
The .NET Evolution
The .NET Evolution
COM provides a way for
components to integrate.
However, each
component must provide
the “plumbing” and
objects cannot directly
interact.
Microsoft .NET Framework -12
The .NET Evolution
The .NET Evolution
With the .NET Framework
common language runtime,
components are built on a
common substrate. No
“plumbing” is needed and
objects can directly interact
Microsoft .NET Framework -13
Simplify Development
Simplify Development
Completely eliminates COM plumbing
Completely eliminates COM plumbing
No more…
No more…
Registration
Registration
GUIDs
GUIDs
.IDL files
.IDL files
HRESULTs
HRESULTs
IUnknown
IUnknown
AddRef/release
AddRef/release
CoCreateInstance
CoCreateInstance
=>self described apps
=>self described apps
=>hierarchical namespaces
=>hierarchical namespaces
=>unified object model
=>unified object model
=>structured exceptions
=>structured exceptions
=>common root object
=>common root object
=>garbage collector
=>garbage collector
=>”new” operator
=>”new” operator
Microsoft .NET Framework -14
Simplify Development
Simplify Development
Common Type System
Common Type System
Common instance and type definition
Common instance and type definition
Enables clean OO programming
Enables clean OO programming
Classes and Interfaces
Classes and Interfaces
Constructors, Properties, Methods
Constructors, Properties, Methods
Cross language inheritance
Cross language inheritance
Microsoft .NET Framework -15
Inheritance
Inheritance
Animal
Mammal
Bird
C#
C#
Java
Java
VB
VB
Microsoft .NET Framework -16
Common Language Runtime
Common Language Runtime
Class Loader
IL to Native
Compilers
Code
Manager
Garbage
Collector
Security Engine
Debug Engine
Type Checker
Exception Manager
Thread Support
COM Marshaler
Base Class Library Support
Microsoft .NET Framework -17
MSIL
Compilation and Execution
Compilation and Execution
Source
Code
Language
Compiler
Compilation
Before installation or
the first time each
method is called
Execution
JIT
Compiler
Native
Code
Code
Metadata
Microsoft .NET Framework -18
Metadata
Metadata
Key to simpler programming model
Key to simpler programming model
Generated automatically
Generated automatically
Stored with code in executable file
Stored with code in executable file
(.dll or .exe)
(.dll or .exe)
Uses existing COFF format
Uses existing COFF format
Via existing extension mechanism
Via existing extension mechanism
Stored in binary format
Stored in binary format
Convertible to/from XML Schema
Convertible to/from XML Schema
Convertible to/from COM type libraries
Convertible to/from COM type libraries
Microsoft .NET Framework -19
Metadata: Creation And Use
Metadata: Creation And Use
Metadata
Metadata
(and code)
(and code)
Debugger
Debugger
Schema
Schema
Generator
Generator
Profiler
Profiler
Other
Other
Compiler
Compiler
Proxy Generator
Proxy Generator
Type Browser
Type Browser
Compiler
Compiler
Source
Source
Code
Code
XML encoding
XML encoding
(WSDL)
(WSDL)
Serialization
Serialization
(e.g. SOAP)
(e.g. SOAP)
Designers
Designers
Reflection
Reflection
Microsoft .NET Framework -20
Robust And Secure
Robust And Secure
Automatic lifetime management
Automatic lifetime management
All .NET objects are garbage collected
All .NET objects are garbage collected
No stray pointers, no circular references
No stray pointers, no circular references
Multi
Multi
-
-
generational mark
generational mark
-
-
and
and
-
-
compact GC
compact GC
Self configuring, dynamically tuned
Self configuring, dynamically tuned
Exception handling
Exception handling
Error handling is a 1st class concept (not bool
Error handling is a 1st class concept (not bool
or HRESULTs)
or HRESULTs)
Dramatically improved error reporting
Dramatically improved error reporting
Integrated with windows SEH
Integrated with windows SEH
Microsoft .NET Framework -21
Robust And Secure
Robust And Secure
Native code compilation
Native code compilation
MSIL
MSIL
No interpreter
No interpreter
Install
Install
-
-
time or run
time or run
-
-
time IL to
time IL to
native compilation
native compilation
C++ managed extensions
C++ managed extensions
Code correctness and type
Code correctness and type
-
-
safety
safety
IL can be verified to guarantee type
IL can be verified to guarantee type
-
-
safety
safety
No unsafe casts, no uninitialized variables, no
No unsafe casts, no uninitialized variables, no
out
out
-
-
of
of
-
-
bounds array
bounds array
indexing
indexing
Evidence
Evidence
-
-
based security
based security
Policy grants permissions based on evidence (signatures, origin)
Policy grants permissions based on evidence (signatures, origin)
Extensible permissions and policy
Extensible permissions and policy
Microsoft .NET Framework -22
Multi
Multi
-
-
language Platform
language Platform
The freedom to choose language
The freedom to choose language
All features of .NET platform available to
All features of .NET platform available to
any .NET programming language
any .NET programming language
Application components can be written in
Application components can be written in
multiple languages
multiple languages
Highly leveraged tools
Highly leveraged tools
Debuggers, profilers, code coverage
Debuggers, profilers, code coverage
analyzers, etc. Work for all languages
analyzers, etc. Work for all languages
Microsoft .NET Framework -23
Deployment And Management
Deployment And Management
Assemblies
Assemblies
The unit of deployment, versioning,
The unit of deployment, versioning,
and
and
security
security
Like DLLs, but self
Like DLLs, but self
-
-
describing through
describing through
manifest
manifest
Zero
Zero
-
-
impact install
impact install
Applications and components can be shared or
Applications and components can be shared or
private
private
Side
Side
-
-
by
by
-
-
side execution
side execution
Multiple versions of the same component can
Multiple versions of the same component can
co
co
-
-
exist, even in the same process
exist, even in the same process
Microsoft .NET Framework -24
Assemblies
Assemblies
Unit of deployment
Unit of deployment
One or more files, independent of packaging
One or more files, independent of packaging
Self
Self
-
-
describing via manifest
describing via manifest
Versioning
Versioning
Provided by compiler use of attributes
Provided by compiler use of attributes
Policy per
Policy per
-
-
application as well as per
application as well as per
-
-
machine
machine
Security boundary
Security boundary
Assemblies are granted permissions
Assemblies are granted permissions
Methods can demand proof that a permission
Methods can demand proof that a permission
has been granted to entire call chain
has been granted to entire call chain
Types named relative to assembly
Types named relative to assembly
Microsoft .NET Framework -25
Seamless Integration
Seamless Integration
Any .NET class can be used as a COM
Any .NET class can be used as a COM
class with zero extra work
class with zero extra work
COM classes can be imported as
COM classes can be imported as
.NET
.NET
classes
classes
.NET classes utilize com+ services
.NET classes utilize com+ services
Transactions
Transactions
Object pooling
Object pooling
Etc…
Etc…
DLL entry points
DLL entry points
C++ managed extensions
C++ managed extensions
Microsoft .NET Framework -26
Framework, Languages, And Tools
Framework, Languages, And Tools
Base Class Library
Common Language Specification
Common Language Runtime
Data and XML
VB
C++
C#
Visual Studio.NET
JScript

ASP.NET
Windows Forms
Microsoft .NET Framework -27
Framework Design Goals
Framework Design Goals
Make it simple to use
Make it simple to use
Factored and extensible
Factored and extensible
Web standards and practices as the
Web standards and practices as the
foundation
foundation
Unify application models
Unify application models
Microsoft .NET Framework -28
Make It Simple To Use
Make It Simple To Use
Organization
Organization
Code organized in hierarchical namespaces
Code organized in hierarchical namespaces
and classes
and classes
Unified type system
Unified type system
Everything is an object, no variants, one string
Everything is an object, no variants, one string
type, all character data is Unicode
type, all character data is Unicode
Component Oriented
Component Oriented
Properties, methods, events, and attributes are
Properties, methods, events, and attributes are
first class constructs
first class constructs
Design
Design
-
-
time functionality
time functionality
Microsoft .NET Framework -29
How Much Simpler?
How Much Simpler?
HWND hwndMain = CreateWindowEx(
HWND hwndMain = CreateWindowEx(
0, "MainWClass", "Main Window",
0, "MainWClass", "Main Window",
WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,
WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
(HWND)NULL, (HMENU)NULL, hInstance, NULL);
(HWND)NULL, (HMENU)NULL, hInstance, NULL);
ShowWindow(hwndMain, SW_SHOWDEFAULT);
ShowWindow(hwndMain, SW_SHOWDEFAULT);
UpdateWindow(hwndMain);
UpdateWindow(hwndMain);
Form form = new Form();
Form form = new Form();
form.Text = "Main Window";
form.Text = "Main Window";
form.Show();
form.Show();
Windows API
.NET Framework
Microsoft .NET Framework -30
Factored And Extensible
Factored And Extensible
The Framework is not a “black box”
The Framework is not a “black box”
Any .NET class is available for you to
Any .NET class is available for you to
extend through inheritance
extend through inheritance
Unlike COM, you’re using and extending
Unlike COM, you’re using and extending
the class itself, not a “wrapper”
the class itself, not a “wrapper”
Plug
Plug
-
-
and
and
-
-
play components
play components
and
and
subsystems
subsystems
Cross
Cross
-
-
language inheritance!
language inheritance!
Microsoft .NET Framework -31
Web Standards/Practices
Web Standards/Practices
The .NET Framework supports
The .NET Framework supports
HTML, XML, SOAP, XSLT, XPath
HTML, XML, SOAP, XSLT, XPath
Web services enables internet scale distributed
Web services enables internet scale distributed
apps
apps
State
State
-
-
full connected model does not work
full connected model does not work
Loosely connected web services enables scalable apps
Loosely connected web services enables scalable apps
XML support is built in deeply
XML support is built in deeply
Data,
Data,
remoting
remoting
, serialization, documentation, config
, serialization, documentation, config
This affects everything
This affects everything
Base services, data access, UI,
Base services, data access, UI,
invocation/activation,
invocation/activation,
programming
programming
model, tools
model, tools
Microsoft .NET Framework -32
Unify Programming Models
Unify Programming Models
Windows API
.NET Framework
Consistent API availability regardless of
language and programming model
ASP
Stateless,
Code embedded
in HTML pages
MFC/ATL
Subclassing,
Power,
Expressiveness
VB Forms
RAD,
Composition,
Delegation
Microsoft .NET Framework -33
Base Class Library
Data
Xml
ASP.NET
Windows Forms
The .NET Framework
The .NET Framework
Microsoft .NET Framework -34
System
System.Data
System.Xml
System.Web
Globalization
Diagnostics
Configuration
Collections
Resources
Reflection
Net
IO
Threading
Text
ServiceProcess
Security
Design
ADO
SQLTypes
SQL
XPath
XSLT
Runtime
InteropServices
Remoting
Serialization
Serialization
Configuration
SessionState
Caching
Security
Services
Description
Discovery
Protocols
UI
HtmlControls
WebControls
System.Drawing
Imaging
Drawing2D
Text
Printing
System.Windows.Forms
Design
ComponentModel
The .NET Framework
The .NET Framework
Microsoft .NET Framework -35
Base Framework
Base Framework
System
Threading
Text
ServiceProcess
Security
Resources
Reflection
Net
IO
Globalization
Diagnostics
Configuration
Collections
Runtime
Serialization
Remoting
InteropServices
Microsoft .NET Framework -36
Data And XML
Data And XML
System.Data
System.Xml
SQLTypes
SQL
Design
ADO
Serialization
XPath
XSLT
Microsoft .NET Framework -37
ASP.NET
ASP.NET
System.Web
Caching
Configuration
Services
UI
SessionState
HtmlControls
WebControls
Description
Discovery
Security
Protocols
Microsoft .NET Framework -38
Windows Forms
Windows Forms
System.Drawing
Drawing2D
Imaging
Printing
Text
System.Windows.Forms
Design
ComponentModel
Microsoft .NET Framework -39
Framework, Languages, And Tools
Framework, Languages, And Tools
Base Class Library
Common Language Specification
Common Language Runtime
Data and XML
VB
C++
C#
Visual Studio.NET
JScript

ASP.NET
Windows.Forms
Microsoft .NET Framework -40
Languages
Languages
The .NET Platform is Language Neutral
The .NET Platform is Language Neutral
All .NET languages are first class players
All .NET languages are first class players
You can leverage your existing skills
You can leverage your existing skills
Common Language Specification
Common Language Specification
Consumer: Can use the .NET Framework
Consumer: Can use the .NET Framework
Extender: Can extend the .NET Framework
Extender: Can extend the .NET Framework
We are providing
We are providing
VB, C++, C#,
VB, C++, C#,
JScript
JScript
Third
Third
-
-
parties are building
parties are building
APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl,
APL, COBOL, Pascal, Eiffel, Haskell, ML, Oberon, Perl,
Python, Scheme, Smalltalk…
Python, Scheme, Smalltalk…
Microsoft .NET Framework -41
Summary
Summary
Simplified development
Simplified development
Unified programming models
Unified programming models
Multi
Multi
-
-
language, OO platform
language, OO platform
Web standards and best practices
Web standards and best practices
Simple to deploy, run, & maintain
Simple to deploy, run, & maintain
Application Development
Application Development
Microsoft .NET Framework
Microsoft .NET Framework
-
-
Part II
Part II
Microsoft .NET Framework -43
The Tools
The Tools
Visual Studio .NET
Visual Studio .NET
Command Line Tools
Command Line Tools
Microsoft .NET Framework -44
Inheritance
Inheritance
Animal
Mammal
Bird
C#
C#
Java
Java
VB
VB
Microsoft .NET Framework -45
Sample Applications
Sample Applications
Focus on .NET Framework Concepts
Focus on .NET Framework Concepts
.NET Application
.NET Application
.NET “Assembly”
.NET “Assembly”
Reuse class from C# in VB
Reuse class from C# in VB
ASP.NET application
ASP.NET application
Web Service
Web Service
Microsoft .NET Framework -46
Of Academic Interest
Of Academic Interest
Generics for the CLR (and C#)
Generics for the CLR (and C#)
Shared Source Common Language
Shared Source Common Language
Infrastructure
Infrastructure
Runs on Windows XP, the FreeBSD
Runs on Windows XP, the FreeBSD
operating system, and Mac OS X 10.2
operating system, and Mac OS X 10.2
Released under a shared source initiative
Released under a shared source initiative
Microsoft .NET Framework -47
New in .NET Framework 1.1
New in .NET Framework 1.1
Mobile Web Applications
Mobile Web Applications
Granular Version Control: Side
Granular Version Control: Side
-
-
by
by
-
-
Side Execution
Side Execution
Execution of Windows Forms from the Internet
Execution of Windows Forms from the Internet
Code Access Security for ASP.NET Applications
Code Access Security for ASP.NET Applications
Native Support for ODBC and Oracle Databases
Native Support for ODBC and Oracle Databases
Unified Programming Model for Smart Client App.
Unified Programming Model for Smart Client App.
Support for IPv6
Support for IPv6
Scalability, Performance, Documentation
Scalability, Performance, Documentation
Microsoft .NET Framework -48
Links to More Information
Links to More Information
msdn.microsoft.com/netframework/
msdn.microsoft.com/netframework/
www.gotdotnet.com
www.gotdotnet.com
msdn.microsoft.com/net/ecma/
msdn.microsoft.com/net/ecma/
research.microsoft.com/projects/clrgen/
research.microsoft.com/projects/clrgen/
msdn.microsoft.com/net/sscli/
msdn.microsoft.com/net/sscli/
Questions?
Questions?
©
©
2003 Microsoft Corporation. All rights reserved.
2003 Microsoft Corporation. All rights reserved.