Dot NET Framework

67 %
33 %
Information about Dot NET Framework

Published on October 11, 2009

Author: aSGuest28107


.NET Framework&C# : .NET Framework&C# CAC Noida Sandeep Karan Slide 2: .NET Framework Problem background Solution Common Language Runtime (CLR) MS Intermediate Language MSIL Structure MSIL and Java bytecode Introduction to C# language C# Structure C# Features Problems Background : Problems Background Good code is hard to write All system features in any language COM problems Platform Interoperability Automatic memory management Object-Oriented features in and between all PLs Safety & Security Better Access to OS functions Interoperate with COM (both as client & server) Solution (Common Language Runtime) Managed Code in Common Language Runtime : Solution (Common Language Runtime) Managed Code in Common Language Runtime Requests for existing feature New CLR-Only Feature Common Language Runtime Managed Code Win 32 OS Solution (Microsoft Intermediate Language)Different Languages are Compiled into MSIL : Solution (Microsoft Intermediate Language)Different Languages are Compiled into MSIL Source code : Any languages MS Intermediate Language Platform specific code Development tools Just-In-Time compiler .Net platform features : .Net platform features Automatic memory management Explicit Versioning OO features in any languages Accessing system functionality throw a hierarchical namespace Code security Interoperability with COM Costs: : Costs: OS got harder to write More memory and CPU time CLR structure : CLR structure Compare with traditional ways : Compare with traditional ways C# VB C++ J-script other Compiler Intermediate Language JIT econoJIT PreJIT Executables .NET CLR Compiler C++ Executable Existing OS Machine hardware A simple example : A simple example Slide 11: Imports Microsoft.VisualBasic ' Declare the namespace that clients will use to access ' the classes in this component Namespace TimeComponentNS Public Class TimeComponent Public Function GetTime(ByVal ShowSeconds As Boolean) As String If (ShowSeconds = True) Then Return Now.ToLongTimeString Else Return Now.ToShortTimeString End If End Function End Class End Namespace TimeComponent.vb Slide 12: using System ; using TimeComponentNS ; class MainApp { public static void Main() { // Declare and create a new component of the class // provided by the VB server we wrote TimeComponent tc = new TimeComponent ( ) ; // Call the server's GetTime method. Write its // resulting string to a console window. Console.Write (tc.GetTime (true)) ; } } Timeclient.cs Assembly : Assembly A logical collection of one or more exe and dll file containing an application’s code and resources It contains 1-Codes in MSIL 2-Manifest A metadata description of the code and resources Metadata : Metadata What classes and method it contains What external objects it requires What version of code it represents Manifest example (TimeComponent.dll) : Manifest example (TimeComponent.dll) .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 1:0:2411:0 } .assembly extern Microsoft.VisualBasic { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 7:0:0:0 } .assembly TimeComponent { .hash algorithm 0x00008004 .ver 0:0:0:0 } .module TimeComponent.dll // MVID: {144ACC38-E825-45C4-83A6-C2A9E5A901DD} .imagebase 0x00400000 .subsystem 0x00000002 .file alignment 512 .corflags 0x00000001 // Image base: 0x032a0000 Private or Public : Private or Public Private In client directory Public (shared) In Global Assembly Cache (GAC) \\winnt\assembly Namespaces : Namespaces A logical division within which a name need to be unique The best way to handle a large list of system objects and functions System namespace (implemented in several separated DLLs We can import a namespace Your code can have its own namespace Versioning : Versioning DLL Hell Replacing a DLL used by an existing client, with a newer version (or vice versa) .NET provides a standard way to specify version Each client assembly uses its own specified versions of related assemblies Object oriented programming : Object oriented programming Whether to smarten up non-object oriented languages or dump down OO languages .NET provides all languages with inheritance and constructors features Virtual Object Model Slide 20: All .NET classes inherit from the base class System.Object Equals GetHashCode GetType ToString Cross-language inheritance : Cross-language inheritance Because of the standardized IL architecture you can inherit form a class in another language For example: System.Object .NET memory management : .NET memory management .NET CLR provides all languages with automatic memory management. Garbage collector automatically removes unreferenced objects You can force a garbage collection manually Interoperability with COM objects : Interoperability with COM objects .NET Supports interoperation with COM object as client or server via a runtime callable wrapper or a COM Callable Wrapper Using COM objects from .NET objects : Using COM objects from .NET objects Using .NET objects from COM objects : Using .NET objects from COM objects Transaction in .NET : Transaction in .NET Transaction ensure the integrity of databases during complex operations Native .NET objects can also participate in transactions with a simple attribute Structured exception handling : Structured exception handling .NET provides structured exception handling as a fundamental feature available in and between all languages The exception handler can tell exactly where the exception originated by using a stack trace Code access security : Code access security Most software comes from web A user doesn’t know whether a Web code is safe or not .NET allows an administrator to specify privileges that each managed code has. You can specify these privileges in three level by modifying XML-based files Enterprise Machine User \\winnt\\framework\[c.v.]\config\

Add a comment

Related presentations

Related pages

Download Microsoft .NET Framework 4 (Webinstaller) from ...

Die zum Ausführen in der Zielcomputerarchitektur und auf dem Betriebssystem erforderlichen .NET Framework-Komponenten werden vom Microsoft .NET Framework ...
Read more

.NET - Powerful Open Source Cross Platform Development

The .NET Framework is a comprehensive programming model for building mobile, ... @dotnet on Twitter; ASP.NET Community Standup.NET Foundation.NET on GitHub;
Read more

Microsoft .NET Framework 4.5.2 - Download - CHIP

Microsoft .NET Framework 4.6.1 Deutsch: Der Windows-Patch ".NET Framework" in der aktuellsten Version 4.6.1 zum Download.
Read more

.NET – Wikipedia

.NET 2015 ist ein von Microsoft geprägter Oberbegriff, unter dem vor allem .NET Framework 4.6 und .NET Core 5.0 zusammengefasst werden, ...
Read more

Microsoft .NET Framework 3.5 - Download - CHIP

Microsoft .NET Framework 3.5 Deutsch: Der Windows-Patch ".NET Framework" ist in einer neuen Version erschienen.
Read more

.NET Framework und .NET SDKs – Downloads

Microsoft .NET Framework and .NET SDK: Library, learning resources, downloads, support, and community. Evaluate and find out how to install, deploy, and ...
Read more - Die unabhängige deutsche Info-Site ...

.NET Framework, Visual Studio, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, Microsoft, Developer, Entwickler, Community
Read more

.NET Framework - Download - heise online

Das .NET Framework ist eine Laufzeitumgebung für Windows und unterstützt die Entwicklung von Windows-Apps.
Read more

Microsoft .NET Framework Download - ComputerBase

Plattform zum Ausführen von .NET-Anwendungen, dem Java-Konkurrenten von Microsoft. Microsoft .NET Framework Download (65 MB, deutsch, kostenlos)!
Read more

Download .NET Framework Version 4.6.1 -

The Microsoft .NET Framework 4 redistributable package installs the .NET Framework runtime and associated files that are required to run and develop ...
Read more