An Overview: Hanspeter Mössenböck
An Overview: Hanspeter Mössenböck
Hanspeter Mössenböck
What is .NET?
A new software platform for the desktop and the Web
unmanaged
applications
2
What is .NET?
A new software platform for the desktop and the Web
unmanaged
managed applications
applications
class library
3
What is .NET?
A new software platform for the desktop and the Web
unmanaged
managed applications web applications
applications
4
What is .NET?
A framework and more ...
unmanaged
managed applications Web applications
applications
5
Goals of .NET
To unify desktop and Web programming
So far
Desktop programming Web programming
object-oriented ASP (not object-oriented)
compiled (C/C++, Fortran, ...) interpreted (VBScript, Javascript, PHP, ...)
class library special library
6
Goals of .NET
To unify desktop and Web programming
So far
Desktop programming Web programming
object-oriented ASP (not object-oriented)
compiled (C/C++, Fortran, ...) interpreted (VBScript, Javascript, PHP, ...)
class library special library
Under .NET
Desktop and Web programming
object-oriented (ASP.NET)
compiled (C#, C++, VB.NET, Fortran, ...)
uniform class library
7
Goals of .NET
Interoperability between programming languages
So far
- millions of lines of code in C++, Fortran, Visual Basic, ...
- very limited interoperability
8
Goals of .NET
Interoperability between programming languages
So 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, ...)
Class in VB.NET Subclass in C# Used in Eiffel
Public Class A class B : A { class Client feature
Public x As Integer public string s; obj: B;
Public Sub Foo() ... public void Bar() {...} ...
End Class } create obj;
obj.Bar;
...
end
9
Goals of .NET
Web Services: distributed applications on the Internet
Usage of the Internet so far
- Email
- Web browsers (show information for human users)
10
Goals of .NET
Web Services: distributed applications on the Internet
Usage of the Internet so far
- Email
- Web browsers (show information for human users)
12
Goals of .NET
Simpler dynamic Web pages
So far
- ASP (mixture of HTML and VBScript or Javascript)
Under .NET
- ASP.NET (clear separation of HTML and script code)
object-oriented
event-based
interactively composable (RAD)
custom GUI elements possible
efficient (compiled server code)
state management
authorisation / authentification
...
13
Goals .NET
More quality and convenience
14
Interoperability
C#
C# C++ VB ... if (a > b) max = a; else max = b;
CIL
compiler compiler compiler compiler IL_0004: ldloc.0
IL_0005: ldloc.1
IL_0006: ble.s IL_000c
IL_0008: ldloc.0
CIL code IL_0009: stloc.2
(+ metadata) IL_000a: br.s IL_000e
IL_000c: ldloc.1
IL_000d: stloc.2
loader
Intel code
verifyer
mov ebx,[-4]
JIT compiler mov edx,[-8]
cmp ebx,edx
jle 17
mov ebx,[-4]
machine code mov [-12],ebx
...
15
Assemblies
Prog.cs Lib.cs
Assemblies are the smallest units for
class A { ... } class C { ... }
class B { ... } • deployment
• versioning
• loading
csc Prog.cs,Lib.cs
Prog.exe
loader
16
Literature
Web
- www.microsoft.com/net/
- msdn.microsoft.com/net/
- www.gotdotnet.com
- www.devhood.com
- www.go-mono.com
- dotnet.jku.at
Books
- Beer, Birngruber, Mössenböck, Wöß: Die .NET-Technologie. dpunkt.verlag, 2003
- Albahari, Drayton, Merrill: C# Essentials, O'Reilly, 2001
- Robinson et al.: Professional C#, Wrox Press, 2001
- Richter: Applied Microsoft .NET Framework Programming, Microsoft Press, 2002
- Watkins et al.: Programming in the .NET Environment, Addison Wesley, 2002
- Box: Essential .NET, Addison Wesley, 2002
17