Tuesday, June 30, 2015

Unmanaged Code


Unmanaged code is the code that is executed directly by the operating system outside the CLR environment. It is directly compiled to native machine code which depends on the machine configuration.

Managed Code


Managed code is the code that is executed directly by the CLR instead of the operating system. The code compiler first compiles the managed code to intermediate language (IL) code, also called as MSIL code. This code doesn't depend on machine configurations and can be executed on different machines.

Code Access Security (CAS)


Code access security (CAS) is part of the .NET security model that prevents unauthorized access of resources and operations, and restricts the code to perform particular tasks. When the CLR loads an assembly it will obtain evidence for the assembly and use this to identify the code group that the assembly belongs to.

Garbage Collection(GC)


The .NET Framework's garbage collector manages the allocation and release of memory for your application.GarbageCollection (GC), also known as automatic memory management, is the automatic recycling of heap memory. GarbageCollection is performed by a garbage collector which recycles memory that it can prove will never be used again. Systems and languages which use GarbageCollection can be described as garbage-collected.

Common Type System (CTS).


In Microsoft's .NET Framework, the Common Type System (CTS) is a standard that specifies how type definitions and specific values of types are represented in computer memory. It is intended to allow programs written in different programming languages to easily share information.

Memory-mapped files(MMFs)


Memory-mapped files (MMFs) allow you map the content of a file to the logical address of an application. These files enable the multiple processes running on the same machine to share data with each Other. The MemoryMappedFile.CreateFromFile() method is used to obtain a MemoryMappedFile object that represents a persisted memory-mapped file from a file on disk.

Version history of .NET Framework


.NET 1.0 - 2002 Initial version (1st release)
 .NET 1.1 - 2003 Update on 1.0, added provider for Oracle
 .NET 2.0 - 2005 Generics were introduced.
 .NET 3.0 - 2006 WPF, WCF, WF were introduced
 .NET3.5 - 2007  LINQ and ADO .NET Entity Framework
 .NET 4.0 - 2010 Dynamic support for languages and TPL (dynamic keyword introduced along with Task Parallel library )
 .NET 4.5 - 2012 Asynchronous programming support (async and await keyword introduced).
 .NET 4.5.1 - 2013 Asynchronous programming support (Includes performance and debugging improvements, Support for automatic binding redirection, Expanded support for Windows Store apps
 ).
.Net 4.5.2 - 2013  .NET 4.5.2 Controls with High DPI setting.

Managed extensibility framework


Managed extensibility framework (MEF) is a new library that is introduced as a part of .NET 4.0 and Silverlight 4. It helps in extending your application by providing greater reuse of applications and components. MEF provides a way for host application to consume external extensions without any configuration requirement.

The code contracts


Code contracts help you to express the code assumptions and statements stating the behavior of your code in a language-neutral way. The contracts are included in the form of pre-conditions, post-conditions and object-invariants. The contracts help you to improve-testing by enabling run-time checking, static contract verification, and documentation generation.

Manifest

Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do the following things
•    Version of assembly.
•    Security identity.
•    Scope of the assembly.
•    Resolve references to resources and classes.

The assembly manifest can be stored in a PE file either (an .exe or) .dll with Microsoft
intermediate language (MSIL code with Microsoft intermediate language (MSIL) code or in a
stand-alone PE file, that contains only assembly manifest information.

IL (Intermediate Language)

Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.

The new features added in .NET Framework 4.0.

The following are the new features of .NET Framework 4.0:
•    Improved Application Compatibility and Deployment Support
•    Dynamic Language Runtime
•    Managed Extensibility Framework
•    Parallel Programming framework
•    Improved Security Model
•    Networking Improvements
•    Improved Core ASP.NET Services
•    Improvements in WPF 4
•    Improved Entity Framework (EF)
•    Integration between WCF and WF

The main components of .NET Framework

.NET Framework provides enormous advantages to software developers in comparison to the advantages provided by other platforms. Microsoft has united various modern as well as existing technologies of software development in .NET Framework. These technologies are used by developers to develop highly efficient applications for modern as well as future business needs. The following are the key components of .NET Framework:
•    .NET Framework Class Library
•    Common Language Runtime
•    Dynamic Language Runtimes (DLR)
•    Application Domains
•    Runtime Host
•    Common Type System
•    Metadata and Self-Describing Components
•    Cross-Language Interoperability
•    .NET Framework Security
•    Profiling
•    Side-by-Side Execution

.NET Framework


The .NET Framework (pronounced dot net) is a proprietary, partially open source freeware software framework developed by Microsoft that runs primarily on Microsoft Windows.

.NET Framework is a complete environment that allows developers to develop, run, and deploy the following applications:
•    Console applications
•    Windows Forms applications
•    Windows Presentation Foundation (WPF) applications
•    Web applications (ASP.NET applications)
•    Web services
•    Windows services
•    Service-oriented applications using Windows Communication Foundation (WCF)
•    Workflow-enabled applications using Windows Workflow Foundation (WF)

.NET Framework also enables a developer to create sharable components to be used in distributed computing architecture. NET Framework supports the object-oriented programming model for multiple languages, such as Visual Basic, Visual C#, and Visual C++. .NET Framework supports multiple programming languages in a manner that allows language interoperability. This implies that each language can use the code written in some other language.