Monday, June 25, 2007

.Net Definitions Continued...

21) Data Set:
A class that contains an application copy of data that has been retrieved from a data source.
22) Delegate:
An object that acts as a type-safe function-pointer. Delegates can be used to invoke the method they point to.
23) Destructor:
A method that is run just before a class is removed from memory. A destructor contains code to clean up after the class is destroyed.
24) Encapsulation:
Binding data with a set of related functionalities.
25) Exception Handling:
The process dealing with unusual occurrences within code so that it does not cause the program to crash or lose data.
26) Explicit Conversion:
A conversion of one type to another that cannot be performed automatically. Explicit conversion usually presents some danger of a failed conversion or loss of data.
27) Extender Provider:
A special type of control that provides design time properties to other controls. Error Provider and Help Provider are examples of extender providers.
28) Foreign Key:
In a data table, a column that contains a key value that uniquely identifies a record in a related table.
29) Floating-Point Types/Numbers:
A number that has a decimal component is called floating point number. Types capable of representing floating-point numbers are called floating point types.
30) Garbage Collector:
It is a thread running in the background of managed .Net applications; it constantly keeps searching the reference tree for objects without reference. It reclaims the memory automatically when it finds non-reference objects.

Sunday, June 24, 2007

What are the differences between a .NET Assembly, a Windows DLL and a COM Component?

A Windows DLL contains library code to be used by any program running on Windows. A DLL may contain either structured or object oriented libraries. COM (Component Object Model) is the component model based on the object oriented design, which means that the components represented by the COM component exists in the form of classes and objects implementing a standard specification defined by COM. COM components can be used by any program running on Windows Operating System; be it is written with VB, C++, Java or even some .NET compliant language like C# and VB.NET. Dot NET assembly is the component standard specified by the .NET. Hence, dot net assemblies are understandable to only Microsoft.NET and can be used only in .NET managed applications.


What are the differences between a .NET Assembly, a Windows DLL and a COM Component?

A Windows DLL contains library code to be used by any program running on Windows. A DLL may contain either structured or object oriented libraries. COM (Component Object Model) is the component model based on the object oriented design, which means that the components represented by the COM component exists in the form of classes and objects implementing a standard specification defined by COM. COM components can be used by any program running on Windows Operating System; be it is written with VB, C++, Java or even some .NET compliant language like C# and VB.NET. Dot NET assembly is the component standard specified by the .NET. Hence, dot net assemblies are understandable to only Microsoft.NET and can be used only in .NET managed applications.


What is the difference between an executable assembly and a class library?

An executable assembly exists as the .exe file while a class library exists as the .dll file. Executable assembly represent executable applications having some entry (e.g., Main() method in C#). A class library, on the other hand, contains components and libraries to be used inside various applications. A Class library can not be executed and thus it does not have any entry point.


What does one need to build or execute .NET applications?

To execute a standalone .NET application (Windows or Console application), one needs to first compile all its constituent assemblies and modules including the executable assembly. Once, the constituent assemblies are compiled, one needs to make sure that the target system contains the .NET framework. The application can now be executed by running its executable assembly (the .exe file). The executable assembly (.exe) is a Win32 executable that hosts the .Net CLR (Common Language Runtime), which exists as a COM component, in its process space and initializes it. Once the CLR is hosted and initialized, the starting point of the .NET executable assembly is passed to the hosted CLR which starts the execution of the program by translating and executing the parts of the program code.

What does it mean by managed code?

By managed code, it means that the complete life cycle and execution is managed by the .NET Common Language Runtime (CLR). The .NET CLR manages the memory on behalf of the managed code, performs garbage collection on the managed heap, perform assembly validation and assembly (component) resolution on behalf of the program. The CLR also maintains the security constraints applied to the managed code.

DotNet 2.0 Latest Release!

Microsoft .NET Framework Version 2.0 Redistributable Package (x86)

.Net Compact Framework SP1 Redistributable

Friday, June 22, 2007

.NET FAQ'S

What is the .NET framework?

The .NET framework is a collection of all the tools and utilities required to execute the .NET managed applications on a particular platform. The MS.NET framework includes the standard compilers (C#, VB.NET, J#, C++.NET, Jscript.NET), various utilities like (caspol, ngen, installutil, tlbimp, sn, asmreg, ildasm, etc), runtime environment (CLR), garbage collector, security manager, thread manager, assembly loader, just in time compilers, and the standard framework or base class libraries. It is important to realize that while the implementation of .Net applications is platform independent; the implementation of .NET framework is platform specific. In fact, it is this particular specific implementation of the .NET framework that makes the managed .NET applications platform independent.


What is the VB.NET and C# language comparisons?

VB.NET and C# both are integral part of the .NET framework. Both of the languages have a lot of similarities in language constructs and language design with minor differences in the syntax. C# is more like C++ and Java in its syntax while VB.NET lends its syntax from VB6 a great deal; although VB.NET can not be seen as the successor of Visual Basic at the level of overall language design and the vision of its creators.
The general conception is that most of the VB6 developers will upgrade to VB.NET while developers coming from Java or C++ to .NET are likely to go for C#. Since web developers for Windows using ASP are familiar with VB and VB Scripts, therefore, most of the web development with ASP.NET at the start is likely to be dominated by VB.NET; but after sometime C# will be able to attract at least half of these developers. Keeping technical side away, C++ and thus C# developers are generally paid more than those of VB developers. So, this might also be the factor for making C# the language of choice on .NET framework.


What is the difference between Console, Windows, Web applications and Web services?

Console applications are light weight programs run inside the command prompt (DOS) window. They are commonly used for test applications. Windows Applications are form based standard Windows desktop applications for common day to day tasks. Microsoft word is an example of a Windows application.
Web applications are programs that used to run inside some web server (e.g., IIS) to fulfill the user requests over the http. A typical example of web application is Hotmail and Google.
Web services are web applications that provide services to other applications over the internet. Google search engine’s web service, e.g., allows other applications to delegate the task of searching over the internet to Google web service and use the result produced by it in their own applications.


What is meant by language interoperability and language integration?

Prior to the introduction of .Net, the code written in one programming language is considered to be usable only in the programs written with the same programming languages. For example, an algorithm implemented in Perl programming language can not be reused in the programs written in the C++. At Windows platform, Microsoft introduced the standards for COM (Component Object Model) which allows components written in one programming language to be used in other programming language. In Java, JNI (Java Native Interface) is presented to use-up the code written in non-Java languages into Java programs. But both the standards (COM and JNI) are too complex and have their own limitations. They also don’t allow the language integration, which means that you can use the components written in other programming languages but you can’t extend the functionality of the components.
In Microsoft.Net, the code written in any programming language is compiled to the same Intermediate Language (Microsoft Intermediate Language - MSIL or Common Intermediate Language – CIL) and to same component standard (assembly). Hence, it is possible for developers to employ the language interoperability by using and extending the solution implemented by other developers which might be using different programming language provided developers at both end are using.Net compliant programming languages.


What is a .Net Assembly?

The .NET assembly is the standard for components developed with the Microsoft.NET. Dot NET assemblies may or may not be executable, i.e., they might exist as the executable (.exe) file or dynamic link library (DLL) file. All the .NET assemblies contain the definition of types, versioning information for the type, meta-data, and manifest. The designers of .NET have worked a lot on the component (assembly) resolution.
There are two kind of assemblies in .NET; private and shared. Private assemblies are simple and copied with each calling assemblies in the calling assemblies folder. Shared assemblies (also called strong named assemblies) are copied to a single location (usually the Global assembly cache). For all calling assemblies within the same application, the same copy of the shared assembly is used from its original location. Hence, shared assemblies are not copied in the private folders of each calling assembly. Each shared assembly has a four part name including its face name, version, public key token and culture information. The public key token and version information makes it almost impossible for two different assemblies with the same name or for two similar assemblies with different version to mix with each other.
An assembly can be a single file or it may consist of the multiple files. In case of multi-file, there is one master module containing the manifest while other assemblies exist as non-manifest modules. A module in .NET is a sub part of a multi-file .NET assembly. Assembly is one of the most interesting and extremely useful areas of .NET architecture along with reflections and attributes, but unfortunately very few people take interest in learning such theoretical looking topics.

Thursday, June 21, 2007

.Net Framework Supported Languages

.Net Framework supports many languages like Managed C, C++, C#(pronounced 'C Sharp'), Visual Basic, J#(pronounced 'J Sharp'), Python, etc..

The word "Managed" is used here because .NET Framework supports almost all languages that follow the Common Language Specifications(CLS) under the Common Type Systems(CTS).

The language should follow the set of rules specified by the CTS inorder for the application to run by the CLR.
and the process to continue.

So on a final note there are many languages being added to date inorder to make .NET much user-friendly and much popular.

Wednesday, June 20, 2007

.Net FrameWork

1)Platform Independent
2)Language Independent
3)Language Interoperability
4)To Support Pure Object Oriented Programming Synopsis

The .NET Framework is a development platform
.NET Framework based on a standard execution engine

.NET Framework can be classified into two main functionalities. They are:
1) Common Language Runtime (CLR) is Windows implementation
2) .NET programming based on Framework Class Libraries (FCL)

The main tasks of CLR are:
1) Memory Management
2) Common Type System
3) Garbage Collection
Let us discuss the above tasks of the CLR in detail:

1) Memory Management:

This Process is automatically done by the CLR.
No reference Counting.
No Manual Management of memory is required.
Management of memory is done automatically without manual intervention.
It takes exactly the memory space required for the program to run.

2) Common Type System:

Provides built-in data types.
Provides mechanism to define, manage and use new types.
Provide common type representation across all languages.
Cross language inheritance, exceptions, etc.
Common language Specification (CLS) is nothing but a set of rules that are to be followed if a program has to execute according to the .Net Framework.
If the rules are followed then the code is called Managed Code and the CLR can only process the managed code.
The program that does not follow these set of rules are called UnManaged Code.
The CLR can’t process these type of unmanaged code.

3)Garbage Collector:

Completely frees the developer from tracking memory usage and knowing when to free memory
Continuously monitors the application
Tracks the location of roots of the application.
This is the latest technology that supports .Net Framework. The CLR removes any unwanted and free memory which is not being used. The unwanted application space will be released after some time so as to be used by another application in future.