Tuesday, November 4, 2008

at 3:19 AM Posted by senthil

1. What is Microsoft .Net?

Microsoft .NET is the latest software development platform / technology / tool from Microsoft based on the Windows operating systems. Microsoft .NETtechnology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions. Microsoft .NET-connected solutions enable businesses to integrate their systems more rapidly and in a better manner and help them realize the promise of information anytime, anywhere, on any device.

2. What is Microsoft .Net Framework?

The Microsoft .NET Framework is the heart and soul of the .Net platform, and is intended to be used by most new applications created for the Windows platform. It is a managed type-safe environment for application development and execution.

Principal Features of Microsoft .Net Framework

  • Interoperability
  • Common Runtime Engine (CLR)
  • Language Independence
  • Base Class Library
  • Simplified Deployment
  • Security
  • Portability


The Microsoft .Net Framwork consists of two main components: The Common Language Runtime (CLR) and the Base Class Library (BCL).

3. What is the Microsoft .Net Common Language Runtime (CLR)?

Applications written for the Microsoft .NET Framework execute in an environment that manages the program's runtime requirements. This runtime environment, is known as the Common Language Runtime (CLR). The CLR can be thought of as the manager of your applications. It provides core services, such as code compilation, memory allocation / reallocation, thread management, garbage collection, and much more. Through the common type system (CTS), it enforces strict type-safety and ensures that code is executed in a safe environment by also enforcing code access security.

4. What is the Microsoft .Net Base Class Library (BCL)?

The Microsoft .Net Framework also consists of a library of classes (Base Class Library) which provides common functionality for programming requirements. The Base Class Library (BCL) is a standard library available to all languages using the Microsoft .NET Framework.

The BCL provides a collection of useful and reusable types (classes / objects) that are designed to integrate with the CLR. The types provided by the Microsoft .NET Framework are object-oriented and fully extensible, and they allow you to seamlessly integrate your applications with the .NET Framework.

The classes that form the framework's Base Class Library cover a large range of programming needs in areas including: user interface, file reading and writing, graphic rendering, data access, database connectivity, cryptography, web application development, web services, XML document manipulation, mobile application development, smart device applications, Class Libraries (DLLs), network communications, etc. The class library is used by programmers who combine it with their own code to develop applications.

The BCL is organized into namespaces. A namespace is a logical grouping of types that perform related functions. For example, the System.Windows.Forms namespace contains all the types that make up Windows forms and the controls used in those forms.

Namespaces are logical groupings of related classes. The namespaces in the Microsoft .NET base class library are organized hierarchically. The root of the .NET Framework is the System namespace. Other namespaces can be accessed with the period operator ( . ). A typical namespace construction appears as follows:

System
System.Data
System.Data.SQLClient
System.Windows.Forms


The namespace names are self-descriptive. Straightforward names make the Microsoft .NET Framework easy to use and allow you to rapidly familiarize yourself with its contents and classes.

5. What languages are available for programming in Microsoft .Net?

Visual Studio .NET (The IDE for Microsoft .Net) ships with languages such as Visual Basic .NET, Visual C#, and Visual C++ with managed extensions, as well as the JScript scripting language. You can also write managed code for the Microsoft .NET Framework in other languages. Third-party tools and compilers exist for Fortran, Cobol, Perl, and a host of other languages. The Common Language Specification (CLS) defines the minimum standards to which .NET language compilers must conform. Thus, the CLS ensures that any source code successfully compiled by a .NET compiler can interoperate with the Microsoft .NET Framework.

6. What is Language Independence? What does cross-language compatibility mean?

The Microsoft .NET Framework is designed for cross-language compatibility. This simply means, that Microsoft .NET components can interact with each other no matter what supported language they were written in originally. So, an application written in Microsoft VB.NET might reference a dynamic-link library (DLL) file written in C#, which in turn might access a resource written in managed Visual C++ or any other .NET language. This language interoperability extends to full object-oriented inheritance. A VB.NET class might be derived from a C# class, for example, or vice versa.

This level of cross-language compatibility is possible because of the CLR. When a Microsoft .NET application is compiled, it is converted from the language in which it was written (VB.NET, C#, or any other .NET-compliant language) to Microsoft Intermediate Language (MSIL or IL). Because all Microsoft .NET executables and DLLs exist as MSIL, they can freely interoperate.

The CTS ensures type compatibility between .NET components. Because Microsoft .NET applications are converted to IL prior to deployment and execution, all primitive data types are represented as .NET types. Thus, a VB Integer and a C# int are both represented in IL code as a System.Int32. Because both languages use a common type system, it is possible to transfer data between components and avoid time-consuming conversions or hard-to-find errors.

7. How is a Microsoft .Net Application compiled? What is MSIL?

Applications written in any language on the .NET Framework compile into an intermediate language known as the Common Intermediate Language, or CIL (formerly known as Microsoft Intermediate Language, or MSIL). MSIL is a low-level language that the CLR can read and understand. In Microsoft's implementation, this intermediate language is not interpreted, but rather compiled in a manner known as just-in-time compilation (JIT) into native code. The combination of these concepts is called the Common Language Infrastructure (CLI), a specification; Microsoft's implementation of the CLI is known as the Common Language Runtime (CLR).

8. What are Microsoft .Net Assemblies?

The primary unit of a .NET application is the assembly. The Microsoft .Net Applications pseudo code is compiled into intermediate CIL (MSIL) code and is stored in .NET assemblies. An assembly is a self-describing collection of code, resources, and metadata.

Assemblies are stored in the DLL and EXE files. The assembly consists of one or more files. Each assembly has one and only one assembly manifest, which contains the metadata or description information for the assembly.

An assembly contains one or more modules. A module contains the code that makes up your application or library, and it contains metadata that describes that code. When you compile a project into an assembly, your code is converted from pseudo code to IL. Because all managed code is first converted to IL code, applications written in different languages can easily interact. For example, one developer might write an application in Visual C# that accesses a DLL in Visual Basic .NET. Both resources will be converted to IL modules before being executed, thus avoiding any language-incompatibility issues.

9. What is Interoperability? How does Microsoft .Net provide Interoperability?

Interoperability is the ability of diverse/different components to work together (inter-operate).

Because interaction between new and older applications is commonly required, the Microsoft .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment, e.g COM components. Access to COM components is provided in the System.Runtime.InteropServices and System.EnterpriseServices namespaces of the framework, and access to other functionality is provided using the P/Invoke feature (Platform Invoke).

10. What is Simplified Deployment in Microsoft .Net?

Once the .Net Application is developed, it must be installed on client machines or on the server. Installation of the Application must be carefully managed to ensure that it does not interfere with previously installed software, and that it conforms to stringent security requirements. The Microsoft .NET framework includes design features and tools that help address these deployment requirements.

11. What is Portability?

Application Portability is one of the key concepts of Microsoft .Net. Application Portability means to be able to reuse the existing code instead of creating new code when moving Applications from one environment to another.

The design of the .NET Framework allows for it to be cross platform compatible. This means, that a program written to use the Microsoft .Net Framework should run without change on any type of system for which the framework is implemented. Microsoft's commercial implementations of the framework cover Windows, Windows CE, and the Xbox 360. In addition, Microsoft submits the specifications for the Common Language Infrastructure (which includes the core class libraries, Common Type System, and the Common Intermediate Language), and the C# language, and the C++/CLI language to both ECMA and the ISO, making them available as open standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.

12. How does Microsoft .Net implement Security for Applications?

The Microsoft .NET Framework has its own security mechanism. The security mechanism in Microsoft .Net has two general features: Code Access Security (CAS), and validation and verification. CAS is based on information that is associated with a specific assembly. The information is the source of the assembly. CAS uses information to determine the permissions granted to the code. Other code can demand that calling code is granted a specified permission. The demand causes the CLR to perform a call stack walk: every assembly of each method in the call stack is checked for the required permission and if any assembly is not granted the permission then a security exception is thrown.

When an assembly is loaded the CLR performs various tests. Two such tests are validation and verification. During validation the CLR checks that the assembly contains valid metadata and CIL, and it checks that the internal tables are correct. Verification is not so exact. The verification mechanism checks to see if the code does anything that is 'unsafe'. The algorithm used is quite conservative and hence sometimes code that is 'safe' is not verified. Unsafe code will only be executed if the assembly has the 'skip verification' permission, which generally means code that is installed on the local machine.

13. How does Microsoft .Net manage Memory? What is Garbage Collection?

The Microsoft .NET Framework is a managed type-safe environment for developing .Net applications and employs an automatic memory management scheme called garbage collection. Memory from objects that are no longer used is traced and reclaimed without any action required by the application.

The CLR frees the developer from the burden of managing memory (allocating and freeing up when done); instead it does the memory management itself. Memory is allocated to instantiations of .NET types (objects) from the managed heap, a pool of memory managed by the CLR. As long as there exists a reference to an object, the object is considered to be in use by the CLR. When there is no reference to an object, or it goes out of scope, and thus cannot be reached or used, it becomes garbage. However, it still holds on to the memory allocated to it. The Microsoft .NET Framework includes a Garbage Collector which runs periodically, on a separate thread. The Garbage Collector (GC) is a low-priority thread under normal circumstances. It operates when processor time is not consumed by more important tasks. When memory becomes limited, however, the Garbage Collector thread moves up in priority. Memory is reclaimed at a more rapid pace until it is no longer limited, at which point the priority of garbage collection is again lowered.

The Garbage Collector (GC) is non-deterministic. This approach to memory reclamation seeks to maximize application performance and supplies a less bug-prone application environment. Because of the mechanism by which garbage collection operates, you cannot be certain when an object will be reclaimed. Thus, you have no control over when a class’s destructor (Visual C#) or finalizer (Visual Basic .NET) is executed. These methods should not contain code that you rely on being run at a given time. Instead, classes should implement a Dispose() method to explicitly free those resources when the class is no longer needed.

14. What versions of Microsoft .Net are available?

Microsoft started development on the .NET Framework in the late 1990s, originally under the name of Next Generation Windows Services (NGWS). By late 2000, the first beta versions of Microsoft .NET 1.0 were being released.

Version

Version Number

Release Date

1.0

1.0.3705.0

2002-01-05

1.1

1.1.4322.573

2003-04-01

2.0

2.0.50727.42

2005-11-07

3.0

3.0.4506.30

2006-11-06

3.5

3.5.21022.8

2007-11-19


The Microsoft .NET Framework is included with Windows Server 2003, Windows Server 2008 and Windows Vista, and can be installed on some older versions of Windows like Windows 2000 and Windows XP.

0 comments: