Wednesday, September 16, 2009

Microsoft Framework Versions:

Microsoft Framework Versions :
.NET Framework Version Changes when compared to the previous versions
1.0
Released in 1993
1.1
• Built-in support for mobile ASP.NET controls now part of the framework.
• Security changes - enable Windows Forms assemblies to execute in a semi-trusted manner from the Internet, and enable Code Access Security in ASP.NET applications.
• Built-in support for ODBC and Oracle databases now part of the framework.
• .NET Compact Framework - a version of the .NET Framework for small devices.
• Internet Protocol version 6 (IPv6) support.
• Numerous API changes.
2.0
• Numerous API changes.
• A new hosting API for native applications wishing to host an instance of the .NET runtime. The new API gives a fine grain control on the behavior of the runtime with regards to multithreading, memory allocation, assembly loading and more (detailed reference).
• Language support for generics built directly into the .NET CLR.
• Many additional and improved ASP.NET web controls.
• New data controls with declarative data binding.
• New personalization features for ASP.NET, such as support for themes, skins and web parts.
• .NET Micro Framework - a version of the .NET Framework related to the Smart Personal Objects Technology initiative.
• Partial classes
• Anonymous methods
• Data Tables
3.0
.NET Framework 3.0 consists of four major new components:
• Windows Presentation Foundation (WPF), formerly code-named Avalon; a new user interface subsystem and API based on XML and vector graphics, which uses 3D computer graphics hardware and Direct3D technologies. See WPF SDK for developer articles and documentation on WPF.
• Windows Communication Foundation (WCF), formerly code-named Indigo; a service-oriented messaging system which allows programs to interoperate locally or remotely similar to web services.
• Windows Workflow Foundation (WF) allows for building of task automation and integrated transactions using workflows.
• Windows CardSpace, formerly code-named InfoCard; a software component which securely stores a person's digital identities and provides a unified interface for choosing the identity for a particular transaction, such as logging in to a website.
3.5
• New language features in C# 3.0 and VB.NET 9.0 compiler
• Adds support for expression trees and lambda methods
• Extension methods
• Expression trees to represent high-level source code at runtime.[23]
• Anonymous types with static type inference
• Language Integrated Query (LINQ) along with its various providers
o LINQ to Objects
o LINQ to XML
o LINQ to SQL
• Paging support for ADO.NET
• ADO.NET synchronization API to synchronize local caches and server side data stores
• Asynchronous network I/O API[23] .
• Peer-to-peer networking stack, including a managed PNRP resolver[24]
• Managed wrappers for Windows Management Instrumentation and Active Directory APIs[25]
• Enhanced WCF and WF runtimes, which let WCF work with POX and JSON data, and also expose WF workflows as WCF services.[26] WCF services can be made stateful using the WF persistence model.[23]
• Support for HTTP pipelining and syndication feeds.[26]
• ASP.NET AJAX is included
• New System.CodeDom namespace.
4.0
• Parallel Extensions to improve support for parallel computing, which target multi-core or distributed systems.[30] To this end, they plan to include technologies like PLINQ (Parallel LINQ),[31] a parallel implementation of the LINQ engine, and Task Parallel Library, which exposes parallel constructs via method calls.[32]
• Visual Basic and C# languages innovations such as statement lambdas, implicit line continuations, dynamic dispatch, named parameters, and optional parameters.
• Full support for IronPython, IronRuby, and F#.[33]
• Support for a subset of the .NET Framework and ASP.NET with the "Server Core" variant of Windows Server 2008 R2.[34]
• Support for Code Contracts.
• Inclusion of the Oslo modelling platform, along with the M programming language.[35]

Tuesday, September 15, 2009

.NET Framework Architecture

The following diagram illustrates the architecture.


 
 
.NET Framework Architecture


Class Library
The class library provides a comprehensive set of facilities for application development. Primarily written in C#, it can be used by any language, thanks to the Common Language Specification.
A set of reusable objects which may be used within the context of a framework
but may also be used as stand-alone objects. The .NET Framework class library is
a library of classes interfaces and value types that are included in the
Windows Software Development Kit (SDK). This library provides access to system
functionality and is designed to be the foundation on which .NET Framework
applications components and controls are built.
The class library is structured into Namespaces, and deployed in shared libraries known as Assemblies. When we speak of the .NET framework , we are primarily referring to this class library.
Namespaces
Namespaces are a mechanism for logically grouping similar classes into a hierarchical structure. This prevents naming conflicts. The structure is implemented using dot-separated words. The top level namespace for most of the .NET framework is System. Under the System namespace you'll find the following:
• System.IO
• System.Net
• System.Net.Sockets
• System.Reflection
• System.Threading
• ...and many others.
Assemblies
Assemblies are the physical packaging of the class libraries. An assembly can also be composed of several files. These are .dll files, but don't confuse them with Win32 shared libraries. Examples are
• mscorlib.dll
• System.dll
• System.Data.dll
• Accessibility.dll
Common Language Infrastructure
More commonly known as the Common Language Runtime. This runtime is used to execute the compiled .NET application. To run your application, you must invoke the runtime with the relevant parameters.
Common Language Specification
It defines the interface to the CLI, such as conventions like the underlying types for Enum.
Managed and Unmanaged Code
Managed code runs in the Common Language Runtime. The runtime offers a wide variety of services to your running code. In the usual course of events, it first loads and verifies the assembly to make sure the IL is okay. Then, just in time, as methods are called, the runtime arranges for them to be compiled to machine code suitable for the machine the assembly is running on, and caches this machine code to be used the next time the method is called. (This is called Just In Time, or JIT compiling);
It compiled directly to machine code that ran on the machine where you compiled it—and on other machines as long as they had the same chip, or nearly the same. It didn't get services such as security or memory management from an invisible runtime; it got them from the operating system. And importantly, it got them from the operating system explicitly, by asking for them, usually by calling an API provided in the Windows SDK.

Monday, September 14, 2009

Features of DotNet:


Common Runtime Engine:
The Common Language Runtime (CLR) is the virtual machine component of the .NET framework. All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling. CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that converts a MSIL code into the host machine language code, which is then executed appropriately. 
The CLR is the execution engine for .NET Framework applications. It provides a number of services, including:
·                    Code management (loading and execution)
·                    Application memory isolation
·                    Verification of type safety
·                    Conversion of IL to native code.
·                    Access to metadata (enhanced type information)
·                    Managing memory for managed objects
·                    Enforcement of code access security
·                    Exception handling, including cross-language exceptions
·                    Interoperation between managed code, COM objects, and pre-existing DLL's   
·                    Automation of object layout
·                    Support for developer services (profiling, debugging, and so on).
Language Independence:
The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible data types and programming constructs supported by the CLR and how they may or may not interact with each other. Because of this feature, the .NET Framework supports the exchange of instances of types between programs written in any of the .NET languages.
The main advantage of language and platform independent feature of .NET Framework can be attributed to CLR and the same CLR also takes care of run-time services such as memory processes, security enforcement, integration of language, and thread management. Hence, you can make use of the various infrastructures that have been provided in .NET Framework for creating your web-applications.
Interoperability:
Because interaction between new and older applications is commonly required, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System.Runtime. InteropServices and System.EnterpriseServices namespaces of the framework; access to other functionality is provided using the P/Invoke feature.
Base Class Library:
The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions, including file reading and writing, graphic rendering, database interaction and XML document manipulation.
Simplified Deployment:
The .NET framework includes design features and tools that help manage the installation of computer software to ensure that it does not interfere with previously installed software, and that it conforms to security requirements.
Security:
The design is meant to address some of the vulnerabilities, such as buffer overflows, that have been exploited by malicious software. Additionally, .NET provides a common security model for all applications.
Portability:
The design of the .NET Framework allows it to theoretically be platform agnostic, and thus cross-platform compatible. That is, a program written to use the 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), 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.

Tuesday, August 25, 2009

Dot Net for Beginners

Dot Net is the product of Microsoft. It is one of the prestigious products launched as a competitor to Java. While Java stood out with its platform independence Dot Net is famed for it's multi language compatibility.
This is aimed for beginners into dot Net, people migrating from other domains into DotNet.
I shall try to keep this as simple as possible while covering all the aspects.
Contents:
1. Introduction to Dot Net
2. Dot Net Framework
3. Asp.Net
4. C#
5. VB.Net

Introduction to Dot Net:
  • It is platform independent
  • It supports many programming languages
  • .NET provides a common set of classes which can be accessed from other .Net programming languages.
  • Basically .Net is a framework
.Net Framework:
It is a new, easy, and extensive programming platform. It supports several programming languages. By default .NET comes with few programming languages including C#, VB.NET, J# and managed C++ .NET is a common platform for all the supported languages. It gives a common class library, which can be called from any of the supported languages. So, developers need not learn many libraries when they switch to a different language making it easier to switch between languages. Only the syntax differs between the languages.

When you write code in any language and compile, it will be converted to an 'Intermediate Language' (Microsoft Intermediate Language - MSIL). So, your compiled executable contains the IL and not really executable machine language. When the .NET application runs, the .NET framework in the target computer take care of the execution. (To run a .NET application, the target computer should have .NET framework installed.) The .NET framework converts the calls to .NET class libraries to the corresponding APIs of the Operating system.

Whether you write code in C# or VB.NET, you are calling methods in the same .NET class libraries. The same .NET framework executes the C# and VB.NET applications. So, there won't be any performance difference based on the language you write code.

H/W and S/W requirements to learn .Net:
Please have the following installed on your system before we embark the journey into .Net.
.Net framework 2.0,3.0 or 3.5
Visual studio 2005 or 2008
that should be enough to get you started with . In future .Net may come packaged with windows making life easier.
We will continue with .Net in my next post.
Hope you enjoyed your stay on this page.
blogcatalog