120 likes | 199 Views
What is .NET?. CS 351 Ed Gellenbeck. Today. What is .NET? What Problems Does .NET Solve? What are .NET Framework Components?. What is .NET?. A set of technologies for developing and using components to create: Web Forms Web Services Windows Applications
E N D
What is .NET? CS 351 Ed Gellenbeck
Today • What is .NET? • What Problems Does .NET Solve? • What are .NET Framework Components?
What is .NET? • A set of technologies for developing and using components to create: • Web Forms • Web Services • Windows Applications .NET Framework 4 Developer Center http://msdn.microsoft.com/en-us/netframework/
.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
Before .NET Unmanaged Applications Operating System (Windows, Linux, Unix, ...)
With .NET Unmanaged Applications Managed Applications Class Library Common Language Runtime Operating System (Windows, Linux, Unix, ...)
.NET Web Applications Unmanaged Applications Managed Applications Web Applications Web Forms Web Services Class Library ASP.NET Common Language Runtime Web Server (IIS) Operating System (Windows, Linux, Unix, ...)
Under .NET Desktop and Web programming object-oriented (ASP.NET) compiled (C#, VB.NET) uniform class library Goals of .NET Uniform model for Desktop and Web programming So far Desktop programming Web programming object-oriented compiled (C++) extensive class libraries ASP (not object-oriented) interpreted (VBScript, JavaScript, PHP, ...) specialized libraries
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 Public x As Integer Public Sub Foo() ... End Class class B : A { public string s; public void Bar() {...} } class Client feature obj: B; ... create obj; obj.Bar; ... end
The .NET Framework VB C++ C# J# Perl Cobol … Common Language Specification ASP.NET: Web Services and Web Forms WindowsForms Visual Studio.NET ADO.NET: Data and XML .NET Framework Base Classes Common Language Runtime Windows (Win32, IIS, COM+, …)
Interoperability C# if (a > b) max = a; else max = b; C# C++ VB ... CIL compiler compiler compiler compiler IL_0004: ldloc.0 IL_0005: ldloc.1 IL_0006: ble.s IL_000c IL_0008: ldloc.0 IL_0009: stloc.2 IL_000a: br.s IL_000e IL_000c: ldloc.1 IL_000d: stloc.2 MSIL code (+ metadata) loader Intel code verifier mov ebx,[-4] mov edx,[-8] cmp ebx,edx jle 17 mov ebx,[-4] mov [-12],ebx ... JIT compiler machine code
Same classes forall languages!!! System.Windows.Forms System.Web Form Button Services UI Description HtmlControls MessageBox ListControl Discovery WebControls Protocols System.Drawing Caching Security Drawing2D Printing Configuration SessionState Imaging Text System.Data System.Xml OLEDB SQL XSLT Serialization Design SQLTypes XPath System Collections IO Security Runtime InteropServices Configuration Net ServiceProcess Remoting Diagnostics Reflection Text Serialization Globalization Resources Threading .NET Framework Classes