Tuesday, November 25, 2008

What's new Happening around .NET!

What's New in .NET ?! Check out the below Links:
What's new in .NET Framework 3.5 SP1?
Introducing: "Oslo" - Oslo" is the codename for Microsoft's forthcoming modeling platform. Modeling is used across a wide range of domains and allows more people to participate in application design and allows developers to write applications at a much higher level of abstraction.
Introducing: "Dublin"
Azure Services Platform community technology preview now availableThe Azure Services Platform is a new cloud computing and services platform hosted in Microsoft data centers, providing an operating system and a set of developer services. Download the SDKs, see demos, and get started building applications for the cloud using Visual Studio, ASP.NET, and the .NET Framework.
Riding the Next Platform Wave: .NET Framework 4.0 and Windows Server "Dublin"Discover how upcoming enhancements in the .NET Framework 4.0 and Windows Server will simplify the deployment, configuration, management, and scalability of composite applications.

Monday, November 24, 2008

.NET - Current Layer


.NET Framework Technologies
Windows Presentation Foundation (WPF): Use WPF for building Rich UI Windows applications.
Windows Communication Foundation (WCF): Use WCF for building and running connected systems. Next generation of Webservices!
Windows Workflow Foundation (WF): Use WF for building workflow-enabled applications on Windows.
Windows Forms: Use Windows Forms for building smart client applications.
Base Class Libraries (BCL): The BCL provides the fundamental building blocks for any application.
ASP.NET: ASP.NET is a free technology for building dynamic web applications.
ADO.NET: Use ADO.NET to access data sources such as Microsoft SQL Server, OLE DB, and XML.
Common Language Runtime (CLR): The CLR is the .NET Framework run-time environment.
Windows CardSpace: Windows CardSpace provides the consistent user experience required by the identity metasystem.
.NET Compact Framework: Use .NET Compact Framework to build applications for Windows CE-based devices.

Why WPF?


One single Technology - WPF for all our needs to build rich UI application!

Sunday, November 23, 2008

South Asia MVP Open Day 2008




I attended the South Asia MVP Open day summit at Goa. The event is full of fun and had a good chance for connectivity with other MVP Folks and Microsoft community Leaders. I really enjoyed the event!


Indigo Programming Model

Indigo Programming Model

· Indigo programming involves the use of an object model, declarative attributes, and configuration settings.

- Declarative programming. Usually Declarative attributes are used to define contracts and specify service behaviors.

- Imperative programming, in which you work with the Indigo object model in code.

- Configuration-based programming, in which you specify behavior in application configuration files. Configuration-based development helps to modify behaviors like addresses, bindings, security details, service behavior, tracing etc without recompile the program code.

· It’s not mean that you can do three different way of Indigo Programming. It is to say that WCF provide features to do few things in more than one way.

· For instance, An endpoint defined in a configuration file:


· The same endpoint definition in code:
serviceHost = new ServiceHost();
serviceHost.AddEndpoint(typeof(IMyContract), new WSProfileBinding(),
http://localhost:8000/MyService/);

Hello World WCF Service

· Let’s first see, how to develop a simple WCF service which simply returns “Hello World” when client connects to it.

· Service programs contain four elements: Contract definitions, implementation code, hosting code and Endpoint definitions.

namespace HelloService
{
class Infrastructure
{
static void Main(string[] args)
{

// A Uri, which represents the address of the service.
Uri baseURI = new Uri("http://localhost/helloworld");

ServiceHost HelloWCF = new
ServiceHost(typeof(HelloService), baseURI);

//Binding (BasicHttpBinding) provides how to communicate with the endpoint.

HelloWCF.AddServiceEndpoint(typeof(HelloService),
new BasicHttpBinding(), baseURI);
HelloWCF.Open();
Console.WriteLine("Hello World Service Started.");
Console.ReadKey();
HelloWCF.Close();
}
}


[ServiceContract]
class HelloWorld
{
[OperationContract]
string Hello()
{
return ("Hello World!");
}
}
}

- The [ServiceContract] attribute specifies that class will be exposed as a WCF service.

- The attribute [OperationContract] specifies that the Hello() function which returns the string “Hello World!" will be exposed as a method on that service.

- The class Infrastructure contains the basic infrastructure including "ServiceHost" which provides the hosting infrastructure for the service and the endpoint definition.

- BasicHttpBinding uses HTTP as the transport for sending SOAP 1.1 messages.

- A service can use this binding to expose endpoints that conform to WS-I BP 1.1, such as those that ASMX clients consume.

- Both classes and interfaces can be used to define a WCF service contract. It’s better to use Interfaces, because they directly model service contracts.

· Now, let's move the endpoint definition of the “HellowWorld” service from the code to the config file.

· The config file will be read at runtime. Therefore we can modify the binding details with out rebuild and restart of the application.

· Add a configuration file “app.config” and comment the code:

HelloWCF.AddServiceEndpoint(typeof(HelloService),
new BasicHttpBinding(), baseURI);

· Add the following configuration details in the app.config:

· If you run the service now, you will see an error message “Metadata publishing for this service is currently disabled.”

· By default, the framework does not expose any metadata.

- To expose the metadata required to generate the proxy, you must add a Element and set its httpGetEnabled attribute to True.

Hello World WCF Client

· To test our Service, let’s create a client. A client must create a proxy, which establishes a channel to the service.

· To generate client code from a service, we need to use the Svcutil tool. Svcutil not only generates contract code, but it also provides a proxy class for accessing the service.

· Clients create a new instance of the proxy, and they can then access the service through the proxy.

- svcutil http://localhost/hello?wsdl

- Then SvcUtil will get the WSDL file for the service, download the metadata, and generate the service proxy for you. Along with client code from a running service it also generates a config file.
· Add the proxy class and config file in the project and you can access the Service.

Friday, November 14, 2008

Which one to choose for UI?!

· Now we have a set of technologies like Windows Forms, ASP.NET, DirectX, WPF etc for building user interfaces. Which one should I use?
- Windows Forms – Better for building smart client application which didn’t need high end graphics, rich differentiated User experience.
- ASP.NET/Atlas – If you want to build dynamic thin client web applications.
- DirectX - Highest-intensity graphics applications (Mainly for developing Games!)
- WPF – Better for building differentiated User Interfaces which require features like 2-D, 3-D graphics, video, animation, media, complex data visualization etc

Thursday, November 13, 2008

Cool Tools / Info from CodePlex - TFS

patterns & practices: Team Development with Visual Studio Team Foundation Server
Team Development with Visual Studio Team Foundation Server

Microsoft Team Foundation Server Branching Guidance
Microsoft Team Foundation Server Branching Guidance

patterns & practices: Visual Studio 2005 Team System Guidance
The purpose of this project is to build some insightful and practical guidance around using Visual Studio Team System 2005.

TFS Migration and Synchronization Toolkit
The purpose of the TFS Migration and Synchronization Toolkit is to enable customers of Team Foundation Server (TFS) to build custom tools that enable migration and synchronization with other version..

TFS to TFS Migration Tool
The TFS to TFS Migration tool is based on the [TFS Migration and Synchronization Toolkit]. The toolkit is designed to make it faster and easier to build migration tools from TFS to other repositor...

VSTS Scrum Process Template
This is a community project that will result in a usable SCRUM process template for Team System. You will be able to download this process template from CodePlex and upload it into VSTS.

TFS Sticky Buddy
Sticky Buddy is a Digital Dashboard that will run off Team Foundation Server and allow teams to display information on the status of their development on one or many projects.

WCF Load Test
This tool takes a WCF trace file and a WCF client proxy, or a WCF interface contract, and generates a unit test that replays the same sequence of calls found in the trace file.

Search Work Items
This plugin for Team System puts a little search box right into Visual Studio to make it easy to find work items. It is an addin for Team Foundation Client (Team Explorer)

SQL Load Test
This tool takes a SQL Profiler trace file and generates a unit test that replays the same sequence of database calls found in the trace file.