Thursday, May 15, 2008

.Net Interview Questions and answers

.NET Architecture

The programming model for the .NET platform.

The .NET Framework provides a managed execution environment, simplified development and deployment, and integration with a wide variety of programming languages.

The .NET Framework has two key parts:

1. The .NET Framework class library is a comprehensive, object-oriented collection of reusable types that you can use to develop applications. The .NET Framework class library includes ADO.NET, ASP.NET and Windows Forms.
2. The common language runtime (CLR) is the core runtime engine for executing applications in the .NET Framework. You can think of the CLR as a safe area - a "sandbox" - inside of which your .NET code runs. Code that runs in the CLR is called managed code.

ADO.NET

The data access component for the .NET Framework.

ADO.NET leverages the power of XML to provide disconnected access to data. ADO.NET is made of a set of classes that are used for connecting to a database, providing access to relational data, XML, application data and retrieving results.

ADO.NET is made of a set of classes that are used for connecting to a database, providing access to relational data, XML, application data, and retrieving results.

ASP.NET

The component of the Microsoft .NET Framework used for building, deploying, and running Web applications and distributed applications.

Assembly

A compiled representation of one or more classes.

Each assembly is self-contained, that is, the assembly includes the metadata about the assembly as a whole.

Assemblies can be private or shared:

* Private assemblies, which are used by a limited number of applications, are placed in the application folder or one of its subfolders. For example, even if the client has two different applications that call a private assembly named formulas, each client application loads the correct assembly.
* Shared assemblies, which are available to multiple client applications, are placed in the Global Assembly Cache (GAC). Each shared assembly is assigned a strong name to handle name and version conflicts.

Assembly Cache

A code cache used for side-by-side storage of assemblies.

The assembly cache is made of two parts:

* The global assembly cache contains assemblies that are explicitly installed to be shared among many applications on the computer.
* The download cache is a directory inside the assembly cache that stores code downloaded from the Internet or intranet site and isolated to the application that caused the download. This isolation prevents code downloaded on behalf of one application from affecting other applications.

Code Access Security (CAS)

The component of the Microsoft .NET Framework used for building, deploying and running Web applications and distributed applications.

Common Language Runtime (CLR)

The core runtime engine in the Microsoft .NET Framework. The CLR supplies services such as cross-language integration, code access security, object lifetime management and debugging support. Applications that run in the CLR are sometimes said to be running "in the sandbox."

Download Cache

The subdirectory in assembly cache that stores code downloaded from Internet or intranet sites, isolated to the application that caused the download. This isolation prevents code downloaded on behalf of one application from affecting other applications.

DTC (Distributed Transaction Coordinator)

In Microsoft Windows NT, Windows 2000, Windows XP and the Windows Server 2003 family, the DTC is a system service that is part of COM+ services.

COM+ components that use DTC can enlist .NET connections in distributed transactions. This makes it possible to scale transactions from one to many computers without adding special code.

Expose

To host and make available a Web service so that it can be used by other applications or services.

Garbage Collection

A process in the CLR that automatically frees allocated objects when there are no longer any outstanding references to them. The developer does not need to explicitly free memory assigned to an object.

Global Assembly Cache (GAC)

The part of the assembly cache that stores assemblies specifically installed to be shared by many applications on the computer. Applications deployed in the global assembly cache must have a strong name to handle name and version conflicts.

Isolation Level

An isolation level represents a particular locking strategy employed in the database system to improve data consistency. The higher the isolation level, the more complex the locking strategy behind it.

The isolation level provided by the database determines whether a transaction will encounter defined behaviors in data consistency.

The American National Standards Institute (ANSI) defines four isolation levels:

1. Read uncommitted (0)
2. Read committed (1)
3. Repeatable read (2)
4. Serializable (3)

JIT Compiler

The "just-in-time" compilation that converts Microsoft intermediate language (MSIL) into machine code at the point when the code is required at run time.

Locking Level

Locking is a database operation that restricts a user from accessing a table or record. Locking is used in situations when more than one user might try to use the same table at the same time. By locking the table or record, only one user at a time can affect the data.

Managed Code

Code executed and managed by the .NET Framework, specifically by the CLR. Managed code must supply the information necessary for the CLR to provide services such as memory management and code access security.

Microsoft .NET Framework

The Microsoft .NET Framework has two key parts:

1. The .NET Framework class library is a comprehensive, object-oriented collection of reusable types that you can use to develop applications. The .NET Framework class library includes ADO.NET, ASP.NET and Windows Forms.
2. The common language runtime (CLR) is the core runtime engine for executing applications in the .NET Framework. You can think of the CLR as a safe area - a "sandbox" - inside of which your .NET code runs. Code that runs in the CLR is called managed code.

Microsoft Intermediate Language (MSIL)

A CPU-independent set of instructions that can be converted to native code. MSIL includes instructions for loading, storing, initializing and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling and other operations.

Namespace

A logical naming scheme for grouping related types.

The .NET Framework uses a hierarchical naming scheme for grouping types into logical categories of related functionality, such as the ASP.NET technology or remoting functionality. Design tools can use namespaces to make it easier for developers to browse and reference types in their code.

A single assembly can contain types whose hierarchical names have different namespace roots, and a logical namespace root can span multiple assemblies.

In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.

No-touch Deployment

A feature of the .NET Framework, similar to browser-based application deployment, that lets clients download the assemblies they need from a remote web server.

The first time an assembly is referenced, it is downloaded to the download cache on the client and executed. After that, when the client accesses the application, the application checks the server to find out whether any assemblies have been updated. Any new assemblies are downloaded to the download cache on the client, refreshing the application without any interaction with the end user.

Side-by-side Execution

The ability to install and use multiple versions of the same assembly in isolation at the same time. Allowing different versions of assemblies to coexist and to execute simultaneously on the same computer enables robust versioning.

Simple Object Access Protocol (SOAP)

A simple, XML-based protocol for exchanging structured data and type information over the Internet. SOAP is currently the de facto standard for XML messaging.

SOAP consists of:

* An envelope that defines a framework for describing message structure.
* A set of encoding rules for expressing instances of application-defined data types.
* A convention for using SOAP with HTTP.

Strong Name

A name that consists of an assembly's text name, version number and culture information (if provided), with a public key and a digital signature generated over the assembly.

Assemblies with the same strong name should be identical. Strong names provide a strong integrity check, because the .NET Framework security checks to be sure that the contents of the assembly have not been changed since it was built.

Universal Description, Discover, and Integration (UDDI)

A platform-independent framework that provides a way to locate and register Web services on the Internet.

The UDDI specification calls for three elements, similar to a telephone book:

1. White pages; which provide business contact information
2. Yellow pages; which organize Web services into categories (for example, credit card authorization services)
3. Green pages; which provide detailed technical information about individual services.

The UDDI specification also contains an operational registry.

Unicode

A standard that software can use to support multi-lingual character sets.

The .NET Framework uses UTF-16 Unicode encoding to represent characters. .NET applications use encoding and decoding to map character representations between Unicode and non-Unicode formats. The .NET Framework also provides UTF-8, ASCII, and ANSI/ISO encodings.

Unmanaged Code

Code that is executed directly by the operating system, outside of the CLR.

Unmanaged code includes all code written before the .NET Framework was introduced. This includes code written to use COM, native Win32 and Visual Basic 6. Because it does not run inside the .NET environment, unmanaged code cannot make use of any .NET managed facilities.

Web Forms

An ASP.NET feature that can be used to create the user interface for Web applications.

The Web Forms page works as a container for the static text and controls you want to display. The programming logic for the Web Forms page resides in a separate file from the user interface file. This file is referred to as the "code-behind" file and has an ".aspx.vb" or ".aspx.cs" extension, depending on whether the code-behind file was written in Visual Basic or Visual C#.

Web Services

A set of modular applications or "services" that can be accessed within a network (e.g., the Internet, an intranet, or extranet) through a standard interface, typically XML.

No comments: