You are on page 1of 32

Developer life with .

net
framework 2.0, 3.0 and
3.5
• .NET Framework 2.0, which was included
with Visual Studio 2005.

• .NET Framework 3.0, which is included with


Windows Vista.

• .NET Framework 3.5, which is included with


Visual Studio 2008.
C# 2.0

• Generics
• Nullable Types
• Anonymous Methods
• Iterators
• Partial Types
Asp.net 2.0

• Asp.net Ajax
• DAL(Data Access Layer).
• BLL(Business Logic Layer)
• WAT(Website Administrative Tool)
Ado.net 2.0

• Transaction Scope Class


• Xml and Ado.net
• Sql Cache Dependency
.net 3.0 World
.net 3.0 Framework

A new Layer over the .net 2.0

• WCF- Windows Communication Foundation


• WPF- Windows Presentation Foundation
• WF- Windows Work Flow
• Windows Card Space
C# 3.0
• Implicit variable declaration
• Anonymous Types
• Extension Methods
• Object and Collection Initializers
• Lambda Expressions
• Query Expressions
• Expression Trees
• Automatic Properties
• Anonymous Methods
• LINQ to Collections
• LINQ to DataSet
• LINQ to SQL
• Partial Methods
• LINQ to XML
C# 3.0
Implicitly Typed Local Variables

• Local variables can be declared as type ‘var’ which means


compiler to determine the actual type based on the data by which
its is initialized.
• var i = 10; // i is created of type int
• var name = “MyName” ; // name is created of type string
• can only be used when declared and initialized in same statement.
• Cannot be initialized to null.
• Cannot be used as class members.
• Mostly used to store anonymous types as in LINQ based
programming.
C# 3.0
Object & Collection Initializers

• Allow assigning values to any accessible members or properties of


a type at the time of initiation without invoking the constructor
with parameters.
• The default constructor gets executed before assigning the values.
• E.g. Coordinate c1 = new Coordinate {x=1 , y=2};
• Used in LINQ query expressions along with anonymous types.
• Collection Initializers use Object Initializers to specify multiple
elements of collection without calling Add method multiple times.
C# 3.0
Extension Methods

• Allows adding new methods to existing types without


modifying the existing type.
• Are special kind of static methods but are called as if they
are instance methods.
• The first parameter passed to Extension methods specifies
to which type they operate on preceded by ‘this’ keyword.
• They cannot access the private variables of type which they
are extending.
• Extension Methods need to defined in a non-nested and
non-generic static class.
• Instance methods take priority over extension methods in
case they have same signature.
C# 3.0
Auto-Implemented Properties

• Helps in simplifying property declaration in cases where


there is no custom logic required in accessors methods.
• E.g. public int Price {get; set;};
• Internally compiler creates an anonymous field for
assigning values.
C# 3.0
Lambda Expressions

• Very similar to anonymous methods introduced in C# 2.0.


• Its an inline expression or statement block which can be
used to pass arguments to method call or assign value to
delegate.
• All lambda expression use lambda operator => where the
left side denotes result and right contains statement block
or expression.
C# 3.0
Anonymous Types

• Are of class types which can have only public read-only


properties as their members. No other class members like
methods are allowed.
• They are of reference types and are derived from ‘Object’
class.
• Internally compiler gives them the name but its not
accessible by application code.
• They have a method scope.
• Can be initiated directly e.g. new { property1=1,
property2=”Hello World”};
.net 3.5 world
Visual Studio 2008 and .NET 3.5
• Visual Studio 2008 and .NET 3.5 contain a ton of
new functionality and improvements.

• VS 2008 Multi-Targeting Support :VS 2008


enables you to build applications that target
multiple versions of the .NET Framework.  This
means you can use VS 2008 to open, edit and
build existing .NET 2.0 and ASP.NET 2.0
applications (including ASP.NET 2.0 applications
using ASP.NET AJAX 1.0), and continue to deploy
these application on .NET 2.0 machines. 
Visual Studio 2008 and .NET 3.5
• ASP.NET AJAX and JavaScript Support:.NET 3.5
has ASP.NET AJAX built-in (no separate download
required).  In addition to including all of the features in
ASP.NET AJAX 1.0, ASP.NET 3.5 also now includes
richer support for UpdatePanels integrating with
WebParts, ASP.NET AJAX integration with controls like
<asp:menu> and <asp:treeview>, WCF support for
JSON, and many other AJAX improvements.

• VS 2008 and Visual Web Developer 2008 also now


have great support for integrating JavaScript and AJAX
into your applications.
• VS 2008 JavaScript Intellisense
• VS 2008 JavaScript Debugging
• VS 2008 ASP.NET AJAX Control Extender Support
• VS 2008 JavaScript Intellisense for Silverlight
Visual Studio 2008 and .NET 3.5
• ASP.NET AJAX and JavaScript Support:.NET 3.5
has ASP.NET AJAX built-in (no separate download
required).  In addition to including all of the features in
ASP.NET AJAX 1.0, ASP.NET 3.5 also now includes
richer support for UpdatePanels integrating with
WebParts, ASP.NET AJAX integration with controls like
<asp:menu> and <asp:treeview>, WCF support for
JSON, and many other AJAX improvements.

• VS 2008 and Visual Web Developer 2008 also now


have great support for integrating JavaScript and AJAX
into your applications.
• VS 2008 JavaScript Intellisense
• VS 2008 JavaScript Debugging
• VS 2008 ASP.NET AJAX Control Extender Support
• VS 2008 JavaScript Intellisense for Silverlight
Asp.net 3.5
• Visual Studio 2008 provides ASP.NET developers
with great support for :

c) Web Design work.


b) AJAX development
e) Data processing and more.

• Also SilverLight Integration


Asp.net 3.5

• Asp.net Ajax Support in VS 2008.


• DataPagerControl
• VS 2008 and nested Master Pages
• New Designer Support in VS 2008
• JavaScript Intellisense Support in VS 2008
• Ajax enable web sevice in a web site
• Multi Targeting support in VS 2008
Asp.net 3.5
• Creation of ASMX & WCF based web services and consuming
them from AJAX Library

• ASP.NET server side application services like authentication,


roles management exposed as web services

• ASP.NET Merge Tool - a new tool for merging pre-compiled


assemblies

• ASP.NET integrated with core IIS 7.0 which makes ASP.NET


services like authentication & caching available for other content
types also.

• Microsoft AJAX Library to support AJAX based web development


Base Classes & CLR- 3.5

• Support for CSharp 3.0 including LINQ.

• HashSet : A high performance collection of type set.

• Time Zone Improvements : to develop applications which


operate in multiple time zones .

• Minor Improvements in Threading, Reflection and


controlling the GC behavior
Others-3.5

• Client Application Services : All windows based application


to use ASP.NET login, roles and profile services hosted on
central server.

• Occasionally Connected Services (OCS) : keeps windows


application's local and remote data in sync.

• 'Silver' : code name for a new technology


which unifies WF and WCF .

• WCF Syndication : WCF services exposing syndication


feeds. Supports Atom 1.0 and RSS 2.0
WPF 3.5

• Indic Language Support


WPF 3.5 supports display and editing of most of the
languages spoken in India. The scripts supported and
languages that map to them are in the table below:
WPF 3.5

FirefoxSupport

In the .NET Framework 3.5 XAML browser applications


(XBAPs) run cross browser in Firefox in addition to IE 6 and
above. Navigate to an .xbap on the web running in Firefox,
and the XBAP just works. Shell-execute or click on a
hyperlink to a .xbap, and it will open in Firefox, if that is
your default browser.
WPF 3.5

• New Software rendering API

A new API in the .NET Framework 3.5 allows developers to


force software rendering in their application (per window)
instead of using the GPU. This should provide developers a
much better alternative than setting the global ‘
Disable HW Acceleration’ registry key. For various scenarios
and machine configurations this will improve rendering
performance.
WPF 3.5

• CookiesIntegration
In the .NET Framework 3.5,WPF XAML Browser Applications
(XBAPs) enjoy increased integration with the browser
process to enable unified cookies access. This enables
XBAPs to exchange HTTP cookies with web servers, as well
as the automatic attaching of cookies to outgoing HTTP web
requests.

• WPF UI Add-Ins

In the .NET Framework 3.5, the WPF Add-In Model provides


a common framework for discoverability, communication
contracts, activation, lifetime management, isolation and
versioning. The WPF Add-in Model builds upon the
capabilities of the CLR Add-In model by providing support
for Add-Ins to contribute to the UI of the host application.
WPF 3.5

• Interactive 3D API and 2D on 3D API

Previously, interactive 3D and 2D UI on 3D surfaces were


grafted onto WPF with the 3D Tools Codeplex project. These
features are now integrated into the WPF classes
UIElement3D and Viewport2DVisual3D enabling developers
to add interactivity through the standard WPF event model,
to add standard 2D WPF controls to 3D items, and to take
advantage of other core WPF features. In addition,
ContainerUIElement3D and ModelUIElement3D have been
provided for developers to easily add interactivity to
current 3D models or groups of models without having to
write their own subclasses of UIElement3D.
WCF 3.5
• WCF 3.5 introduces two new operation behaviors:
WebGet and WebPut.
ADO.net 3.5

We now have a new datasource control for ASP.NET


(like the ObjectDataSource, SQLDataSource, etc
controls that shipped with ASP.NET 2.0).

which makes declaratively binding ASP.NET UI


controls to LINQ to SQL data models really easy.
(This is only for flat data-binding -- there is no
hierarchical binding support with LinqDataSource
yet).
Silver (Wf services)

• WCf and Wf Integration


•  WCF Autohosting
• Contract Selector Dialog
• Workflow first contract design
• Receive Activity
• Send Activity
The end