voved vo aspnet
TRANSCRIPT
-
7/30/2019 Voved Vo Aspnet
1/21
.NET
2012
-
-
7/30/2019 Voved Vo Aspnet
2/21
Today
What is .NET? What Problems Does .NET Solve?
What are .NET Framework Components?
-
7/30/2019 Voved Vo Aspnet
3/21
What is .NET?
A set of technologies for developing and usingcomponents to create:
Web Forms
Web Services
Windows Applications
.NET Framework 4 Developer Center
http://msdn.microsoft.com/en-us/netframework/
http://msdn.microsoft.com/en-us/netframework/http://msdn.microsoft.com/en-us/netframework/http://msdn.microsoft.com/en-us/netframework/http://msdn.microsoft.com/en-us/netframework/ -
7/30/2019 Voved Vo Aspnet
4/21
.NET Framework
Provides support for many languages VB, C#, J#, C++, PERL, Python, Eiffel, Cobol, ..
Conform to Common Language Infrastructure specifications
.NET is included with Windows
Mono is an open-source implementation of .NET for
Linux, Solaris, Mac OS X, Windows, and Unix
-
7/30/2019 Voved Vo Aspnet
5/21
Before .NET
Operating System (Windows, Linux, Unix, ...)
Unmanaged
Applications
-
7/30/2019 Voved Vo Aspnet
6/21
Operating System (Windows, Linux, Unix, ...)
Unmanaged
Applications Managed Applications
Class Library
Common Language Runtime
With .NET
-
7/30/2019 Voved Vo Aspnet
7/21
.NET Web Applications
Operating System (Windows, Linux, Unix, ...)
Unmanaged
Applications Managed Applications
Class Library
Common Language RuntimeWeb Server (IIS)
ASP.NET
Web Forms Web Services
Web Applications
-
7/30/2019 Voved Vo Aspnet
8/21
Goals of .NET
Uniform model for Desktop and Web programming
So far
Desktop programming
object-oriented
compiled (C++)extensive class libraries
Web programming
ASP (not object-oriented)
interpreted (VBScript, JavaScript, PHP, ...)specialized libraries
Under .NET
Desktop and Web programming
object-oriented (ASP.NET)
compiled (C#, VB.NET)
uniform class library
-
7/30/2019 Voved Vo Aspnet
9/21
Goals of .NET
Interoperability between programming languagesSo far- millions of lines of code in C++, Fortran, Visual Basic, ...
- very limited interoperability
Under .NET- binary compatibility between more than 20 languages (C#, C++, VB.NET, Java,
Eiffel, Fortran, Cobol, ML, Haskell, Pascal, Oberon, Perl, Python, ...)
Public Class A
Public x As IntegerPublic Sub Foo() ...
End Class
class B : A {
public string s;public void Bar() {...}
}
class Client feature
obj: B;...
create obj;
obj.Bar;
...
end
class in VB.NET subclass in C# used in Eiffel
-
7/30/2019 Voved Vo Aspnet
10/21
.NET Core features
Comprehensive interoperability with existing code: (COM binaries, PInvoke calls C-based libraries)
Complete and total language integration:
.NET supports cross-language inheritance, cross-language exception handling, andcross-language debugging of code.
A common runtime engine shared by all .NET-aware languages:
One aspect of this engine is a well-defined set of types that each .NET-awarelanguage understands.
A comprehensive base class library:
This library provides shelter from the complexities of raw API calls and offers aconsistent object model used by all .NET-aware languages.
No more COM plumbing:
IClassFactory, IUnknown, IDispatch, IDL code, and the evil variant compliant datatypes (BSTR, SAFEARRAY, and so forth) have no place in a .NET binary.
A truly simplified deployment model:
Under .NET, there is no need to register a binary unit into the system registry.Furthermore, .NET allows multiple versions of the same *.dll to exist in harmony on asingle machine.
-
7/30/2019 Voved Vo Aspnet
11/21
.Net Framework 3.5 Architecture
.NET Framework 2.0 + SP2
WPF WCF WF WindowsCardSpace
.NET Framework 3.0 + SP2
.NET Framework 3.5
LINQ WF & WCFEnhancements
Add-inFramework
AdditionalEnhancements
ADO.NET EntityFramework
ADO.NET DataServices
ASP.NETDynamic Data
WPF & WCFEnhancements
-
7/30/2019 Voved Vo Aspnet
12/21
The .NET Framework
Common Language Specification
Common Language Runtime
VB C++ C#
ASP.NET: Web Servicesand Web Forms
J#
WindowsForms
.NET Framework Base Classes
ADO.NET: Data and XML
Visua
lStudio.NE
T
Perl Cobol
Windows (Win32, IIS, COM+, )
-
7/30/2019 Voved Vo Aspnet
13/21
Interoperability
C# C++ VB ...
compiler
MSIL code
(+ metadata)
compiler compiler compiler
machine code
loader
verifier
JIT compiler
if (a > b) max = a; else max = b;
IL_0004: ldloc.0
IL_0005: ldloc.1
IL_0006: ble.s IL_000c
IL_0008: ldloc.0IL_0009: stloc.2
IL_000a: br.s IL_000e
IL_000c: ldloc.1
IL_000d: stloc.2
mov ebx,[-4]mov edx,[-8]
cmp ebx,edx
jle 17
mov ebx,[-4]
mov [-12],ebx
...
C#
CIL
Intel code
-
7/30/2019 Voved Vo Aspnet
14/21
Whats CIL Look Like?.method static void main(){
.entrypoint.maxstack 4
.locals init (int32 first,int32 second,int32 result)
ldstr "First number: "call void [mscorlib]System.Console::Write(string)call string [mscorlib]System.Console::ReadLine()call int32 [mscorlib]System.Int32::Parse(string)stloc first
ldstr "Second number: "call void [mscorlib]System.Console::Write(string)call string [mscorlib]System.Console::ReadLine()call int32 [mscorlib]System.Int32::Parse(string)stloc second
ldloc firstldloc secondaddstloc result
ldstr "{0} + {1} = {2}"
ldloc firstbox int32
ldloc secondbox int32
ldloc resultbox int32
call void [mscorlib]System.Console::WriteLine(string, object, object, object)
ret}
-
7/30/2019 Voved Vo Aspnet
15/21
Andin C#?static class Program
{static void Main(string[] args)
{
Int32 first;
Int32 second;
Int32 result;
System.Console.Write("First number: ");
first = System.Int32.Parse(System.Console.ReadLine());
System.Console.Write("Second number: ");
second = System.Int32.Parse(System.Console.ReadLine());
result = first + second;
System.Console.WriteLine("{0} + {1} = {2}", first, second, result);
}
}
-
7/30/2019 Voved Vo Aspnet
16/21
CLR (Common Language Runtime):
JAVA
-
7/30/2019 Voved Vo Aspnet
17/21
System.Data
Design
OLEDB
SQLTypes
SQL
System
Globalization
Diagnostics
Configuration
Collections
Resources
Reflection
Net
IO
Threading
Text
ServiceProcess
Security RuntimeInteropServices
Remoting
Serialization
System.Xml
XPath
XSLT Serialization
System.Web
Configuration SessionState
Caching Security
ServicesDescription
Discovery
Protocols
UIHtmlControls
WebControls
System.Drawing
Imaging
Drawing2D
Text
Printing
.NET Framework Classes
System.Windows.Forms
Form Button
MessageBox ListControl
-
7/30/2019 Voved Vo Aspnet
18/21
Mono Project
www.mono-project.com
Open source implementation of .NET (according to ECMA standards)
Platform support: Linux, Solaris, MacOS X, Windows
Contains:
Compilers for C# (some features of C# 2.0), MonoBasic (extension of Visual Basic.NET)
Common Language Runtime with JIT compiler BCL implementation
ADO.NET
Implementation of ASP.NET, Web Services for Apache web server
GUI library GTK# (based on GTK)
Windows Forms
Integrated development environment
Help browser
-
7/30/2019 Voved Vo Aspnet
19/21
Visual Studio
+ Service Pack 1 + SP1 Update for Vista
+ WF Extensions + WPF & WCF Extensions
+ SharePoint Workflow
+ Visual Studio Tools for Office Second Edition
+ ASP.NET AJAX Extensions
+ Device Emulator v2.0 + .NETCF v2.0 SP2+ WM 5.0 Pocket PC SDK + WM5.0 Smartphone SDK
-
7/30/2019 Voved Vo Aspnet
20/21
Multitargeting in Visual Studio 2008
-
7/30/2019 Voved Vo Aspnet
21/21
?
- ,
-
-
21