Friday, January 30, 2009

WCF Service Configuration Editor


Do you really know there is a WCF configuration editor tool with the entire feature that you are looking for including diagnostics?


Go to this path:


C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin


You can see a tool name - SvcConfigEditor.exe


With this tool, you can manage almost all configuration settings (Both client and Service) including WCF bindings, behaviors, services, and diagnostics without having to directly edit XML files. Isn’t it cool?! Try it.




Sunday, January 25, 2009

Windws 7

Windows 7 - The Windows 7 Beta is now available for download. It is the next client version of operating system next to Vista.

Few features that I really liked it:
1. Windows Touch, Multitouch Screen Navigation: “This is going to be the way the most of the people give inputs to the system in the near future. It is smart enough to distinguish between various gestures and combinations of fingers.” This feature is real cool and get's top 1st point.

2. Faster, more responsive performance - Performance is always key to any prodcut to be succesful and Win 7 is lot better when compare to Vista!

3. With Windows 7, you'll use a single Devices and Printers screen to connect, manage, and use whatever printers, phones, and other devices you have on-hand.

For more:
See what's new in Windows 7
What's coming? See video demos
Keep up with Windows 7 developments
If you're really serious, try the Beta

Wednesday, January 21, 2009

What's going to come on WCF and WF - .NET Framework 4.0?!

Check out the article by Aaron on - WCF And WF Services In The .NET Framework 4.0 And “Dublin”. I will spend some time on the new tools and will update more on the new Things!

Tuesday, January 20, 2009

Service Configuration Editor







Service Configuration Editor





· Windows Communication Foundation (WCF) Service Configuration Editor enables administrators and developers to create and modify configuration settings for WCF services using a graphical user interface (GUI).



· With this tool, you can manage settings for WCF bindings, behaviors, services, and diagnostics without having to directly edit XML files.



- The file SvcConfigEditor.exe present in the location: C:\Program Files\Microsoft SDKs\Windows\v6.0\Bin

Service Trace Viewer

· Windows Communication Foundation (WCF) Service Trace Viewer helps you analyze activity tracing (*.svclog) diagnostic traces that are generated by WCF listeners.

· Service Trace Viewer provides a way to easily merge, view, and filter trace messages so that you can diagnose, repair, and verify WCF service issues.


· To configure tracing for WCF messages, use Service Configuration Editor (SvcConfigEditor.exe).
· Try changing the binding to wsHttpBinding from basicHttpBinding in config file. You can see encrypted CipherValue rather than plain “Hello World” in the trace.

………
256
YG0GBisGAQUFAqBjMGGgJDAiBgorBgEEAYI3AgIKBgkqhkiC9xIBAgIGCSqGSIb3EgECAqI5BDdOVExNU1NQAAEAAAC3shjiBwAHADAAAAAIAAgAKAAAAAUCzg4AAAAPVi1ESkFDT0JGQVJFQVNU

Visual Studio Team System 2008 Team Explorer

Microsoft Visual Studio Team System 2008 Team Explorer can be used as a standalone rich client for accessing Visual Studio Team System 2008 Team Foundation Server. It enables users to join the software development life cycle with integrated support for source control, work item tracking, build management, and detailed reports showing bug trends, project velocity and quality indicators.
You can download the same :
http://www.microsoft.com/downloads/details.aspx?familyid=0ED12659-3D41-4420-BBB0-A46E51BFCA86&displaylang=en

Visual Studio Team System Web Access 2008 Power Tool

Team System Web Access (formerly known as TeamPlain) is a Web interface to Visual Studio 2008 Team Foundation Server.
What are the cool Features?
NEW: Direct links to work items, query results, diffs, change sets and more
NEW: Display custom controls on work item forms
NEW: View queued builds new, queue new builds
Add new work items or edit existing ones
Work with any type of work item, including custom ones
Add new work item queries or edit existing ones
View, download, upload, check-in and check-out documents on SharePoint team portal
View reports, export as PDF or Excel
Browse source control repositories, download files, view changesets, diffs, histories, and annotated views
View build results, start or stop builds
Search for keywords in work items

Visual Studio Team System 2008 Team Foundation Server Power Tools - October 2008 Release Visual Studio Team System Web Access 2008 SP1 Power Tool
Team Foundation Installation Guide for Visual Studio Team System 2008
Visual Studio 2008 Team Foundation Server Service Pack 1
Visual Studio Team System 2008 Team Explorer
Related Resources
Brian Harry's Blog
Buck Hodges' Blog
Hakan Eskici's Blog
Forum - Team Foundation Server - Team System Web Access

Sunday, January 18, 2009

WPF Overview

• WPF is the new presentation subsystem for Windows.
 Unified programming model to build smart windows client applications including UI, Documents, and Media (audio, video, sound, animation, 2D, 3D, speech etc).


• Presentation Foundation Services
 User Interface Services: Application Services, Deployment, Controls, Layout, Data Binding
 Base Services: XAML, Property System, Input and Eventing, Accessibility.
 Media Services: 2D, 3D, Audio, Video, Text, Imaging, Animation, Effects, Composition Engine.  Document Services: XPS Documents, Open Packaging Conventions.

• Right now we have island of technologies to develop rich smart windows applications having differentiated User experience.
 For example, to develop User Interface we need to use Windows Forms or USER32.
 Present GDI and GDI+ is thin wrapper to Win32 API’s and targeting 2D graphics.
 To incorporate 3D, we need to use Direct 3D or OpenGL.
 To incorporate media, we need to use DirectShow.

• WPF provides all the above features as single technology with out changing our gears between the diverse choices of different technologies.
 One single technology for incorporating variety of features starting from UI, data binding, Style, Animation etc, regardless of whether we are targeting 2D, 3D or text content.

• Integrated, vector-based composition engine
 Utilizing the power of the PC and the powerful Graphical Processing Units.
 The rendering architecture uses Direct3D for all output.
 WPF takes advantage of hardware capabilities using a DirectX-based model. If required hardware is not available, it will make use of software rendering.
 WPF provides Vector based rendering, rather than bitmap-based, supports high-dpi, double buffering using powerful composition engine.

• Ease of deployment
 WPF provides the best features of both Web (Broad Reach, Easy change maintenance, Easy Deployment) and Windows (Rich User Experience, Developer Productivity, Responsiveness) world through smart client Click Once technology.


• WPF supports both stand alone and web-browser applications.
 Web-browser applications run in a partial trust sandbox for security. Web-browser applications also make use of the local client hardware and use 3D and media services for the richest Web experience.

• Windows Presentation Foundation also provides a new set of document and print technologies.
 WPF builds on fixed documents by defining a new type of document, known as an XML Paper Specification (XPS) document.
 XPS is an open, cross-platform document format that enables users to create, share, print, and archive paginated documents.

Saturday, January 17, 2009

WCF Fundamentals - One should Know!

WCF Fundamentals

· Before switch to Programming gear in the upcoming blogs, let’s have a quick look on some fundamental concepts.

· WCF programs communicate through the exchange of messages.

- A message is a self-contained unit of data consists of header and a body.

- A message should contain one body and any number of headers.

- All Indigo messages are represented as XML, specifically SOAP envelopes containing XML
Infosets.

· There are three types of Messaging programs: Clients, Services and Intermediaries.

- Client program initiate and send the request message to Service program.

- Service program respond to the client message. The input message may cause the service to perform some action like code execution or reply back to the client with an output message.

- Intermediary is a program between Service and Client which do some tasks like routing, acting as gateway, monitoring etc…

ABC’s of WCF

· Out of the box, WCF provides the following encodings:

- Text encoding, an interoperable encoding.

- Message Transmission Optimization Mechanism (MTOM) encoding, this is an interoperable way for efficiently sending unstructured binary data to and from a service.

- Binary encoding for efficient transfer.

· One can have more encoding mechanisms like a compression encoding using the built-in extension points of WCF.

· WCF supports the following messaging patterns

- Simplex – One Way Messaging (Fire and Forget).
- Duplex – Asynchronous two-way messaging. (Ex: Remotely controlled robot).
- Request: Reply – Synchronous two-way messaging. (Ex: XML Web services)


Indigo Service – Internally

· Internally, Indigo service contains contracts, bindings, endpoints and implementation code.

· Address: Where is the service?

· An address defines where messages can be sent. The format of an endpoint address depends on the transport mechanism.

- For instance, for HTTP Transport it looks like http://www.objectinnovations.com:8080/nf3

- For TCP, it looks likes net.tcp://www.objectinnovations.com:9000/nf3

- The endpoint address enables you to create unique endpoint addresses for each endpoint in
a service.

· Binding: How do I communicate to the service?

· Binding provides information on how a service can be accessed including transport method (HTTP / HTTPS / TCP / Named pipe / MSMQ), encoding format (Text / Binary /MTOM), security mechanism, reliability requirement etc...

- A service to be accessible, at least it should be associate with either one or more bindings.

- A contract can support many bindings and a binding can support many contracts.

· Out of the box, Indigo support following bindings which covers most of the common scenarios.

- Developers can create their own custom binding based on their requirement with the mix of functionality.

· Contract: What can the service do for me?

- A contract explains a service’s behavior, structures, or message formats.

- There are three types of contracts in Indigo Services including Service contracts, Data contracts and Message contracts.

· You define service contracts, data contracts, and message contracts by using declarative attributes.

· The class that needs to be exposed as a WCF service should be marked with ServiceContract attribute.

· Service contracts can be defined by annotating an interface with [ServiceContract].

· Identify service operations by annotating methods with [OperationContract].

· A service contract defines service-level settings, such as the namespace of the service, a corresponding callback contract, etc.

- In comparison to object oriented programming, the service contract is nothing but an interface.

- All methods that need to be invoke using SOAP message should be marked with OperationContract attribute.

- An operation contract defines the parameters and return type of an operation.

· A WCF service can have multiple service contracts.

· For instance, a service contract looks as follows:
[ServiceContract]

public interface IBook
{
[OperationContract]
bool BookAvailable(string bookName, string authorName, int bookID)
[OperationContract]
bool AddCart(Book book)
[OperationContract]
void OrderBook(int bookID)
}

· By default service contracts handle simple service calls. Data contract defines custom data structures like object or struct.

· If the service is using only simple types, there is no need to explicitly use data contracts. In Data Contracts, the data can be passed to and from services in XML Schema form.

· For instance, a data contract looks as follows:
[DataContract]
public class Book
{
[DataMember]
public string bookName;
[DataMember]
public string authorName;
………
}
· Contrast to ASMX Web services, in WCF you need to decorate a class with Data contract attributes, to allow serialization.

· Data Contract specifies how the data is serialized and de-serialized.

· A message contact describes the format of a message. For example, it declares whether message elements should go in headers versus the body, what level of security should be applied to what elements of the message, and so on.

· Externally, Indigo service exposes a service description (WSDL, WS-Policy) and one or more endpoints, with each endpoint exposing one or more service operations.

· An endpoint connects a contract and a binding with an address. At least one endpoint needs to be there to access that service. A service can have multiple endpoints.

· For instance,
- Endpoint1 = Address1 (http://www.objectinnovations.com/WCF/) + Binding1 (Http / X.509 Cert / MTOM Encoding) + Contract1 (IContract1 interface)
- Endpoint 2 = Address 2 (net.tcp://www.objectinnovations.com/WPF/) + Binding2 (TCP / Windows Security / Binary Encoding) + Contract2 (IContract2 interface)
- Endpoint 3 = Address3 (net.msmq://www.objectinnovations.com/WF/) + Binding3 (MSMSQ / Binary Encoding) + Contract2 (IContract2 interface)
- A service can have many endpoints (contract bound to address) coexisting and available at the same time.

Indigo Service – Externally

· If you want to expose your service via HTTP and use SOAP 1.1 for maximum interoperability, and also want to expose it via TCP using a binary wire encoding for maximum performance, the two resulting endpoints can reside side-by-side on top of the very same service!

- Endpoints: Addresses, Bindings, and Contracts!

· An endpoint consists of four properties:

- An address that specifies where the endpoint can be found.

- A binding that specifies how a client can communicate with the endpoint.

- The contract specifies what functionality the endpoint exposes to the client.

- A set of behaviors that specify local implementation details of the endpoint.

WCF - New Mantra to Connected World

· One of the biggest challenges / opportunities in the industry is the integration and reuse of the existing systems.

- Connectivity (Connect people, organizations, and existing systems) through connected applications becomes the key factor in the software development.

- Solution to this challenge lies on developing interoperable, secure distributed application using Service Orientation.

- For the last few years, Web Services assist the developers to build distributed applications.

· The Windows Communication Foundation (WCF), Microsoft’s next generation Web services technology, simplifies development of connected applications through a new service-oriented managed programming model.

- WCF takes Web services to the next level by providing developers with a highly productive framework for building secure, reliable and interoperable applications that send messages between services and clients.

- Windows Communication Foundation (formerly code-named "Indigo") is a set of .NET technologies which for building and running connected systems.

WCF Key Features
· WCF is the Microsoft service-oriented communication infrastructure and programming platform and runtime system for building, configuring and deploying network-distributed services.

- WCF is implemented in managed code as an extension of the Microsoft .NET Framework 2.0.

- WCF provides key characteristics like Transport Neutral (Http, TCP, MSMQ and Named Pipes), various security features, multiple messaging patterns (simplex, duplex and request reply), encodings (text, binary or MTOM), network topologies, and hosting models (Windows, Windows NT Service, Console and IIS).

- Unification of existing .NET Framework communication technologies like ASMX, Remoting, Enterprise Services, WSE, MSMQ etc...

- Implementing latest Web Services Standards / WS* Specifications and to support interoperability, including reliability, security, and transactions.

- Implicit use of service-oriented development principles.

Unified Programming Model
· Today we had distributed stacks of technologies like ASMX, WSE, Remoting, System.Messaging, Enterprise Services etc…

- AMX (ASP.NET Web Services) – To achieve cross-vendor interoperability (Interoperable, ASP.NET Integration)

- .NET Remoting - Tightly coupled .NET-to-.NET communication to achieve performance (Extensible and CLR Integration)

- Web Services Enhancements (WSE) – To implement WS-* specifications along with ASMX

- System. Messaging – Communication with Windows-based applications that require guaranteed data delivery. (Queuing, Reliable Messaging and MSMQ Integration),

- Enterprise Services - This handles things like components, activation, transactions and so on.

· Developers have had to use multiple technologies to build connected systems.

- Each stack has its own strengths and once you choose one technology, it is difficult to switch gear to another one.

- WCF combines and extends the functionality of existing Microsoft technologies (ASMX, .NET Remoting, .NET Enterprise Services, Web Services Enhancements, and System.Messaging) to deliver a single, highly-productive development framework that improves developer productivity.

· Indigo provides all these features through one unified programming model including
- Message oriented programming (System. Messaging)
- Implement WS* specifications (WSE)
- Achieve Extensibility and performance (Remoting)
- Service oriented programming and Interop (ASMX)
- Attribute based programming, object life time management, distributed transactions (Enterprise services).
- Wondering how? Will see one by one!
Interoperability with Applications
· Right now, XML Web services provide support for basic interoperability between applications running on different platforms.

- WCF delivers secure, reliable, transacted interoperability through built-in support for the WS-* specifications.

- For developers, this greatly reduces the amount of infrastructure code required to achieve interoperability along with other enterprise features.

· An application built on WCF can communicate with WCF-based applications running in a different process on the same Windows machine, WCF-based applications running on another Windows machine and applications built on other technologies, such as IBM WebSphere, BEA WebLogic, and other Web services built in J2EE that are standards compliant.

- These applications can be running on Windows machines or on machines running other operating systems, such as Sun Solaris, IBM z/OS, or Linux.

- WCF support various specifications/standards, including basic standards (XML, XSD, XPath, SOAP, WSDL) as well as advanced standards and specifications that comprise the WS-* architecture. These include: WS-Addressing, WS-MetadataExchange, WS-Policy, WS-Security, WS-Trust, WS-SecureConversation, WS-ReliableMessaging, WS-AtomicTransaction, WS-Coordination, WS-Policy, and MTOM.

Support for Service-Oriented Development

· Building adaptable solution which is flexible enough to the fast moving business and technological change is one of the biggest challenges faced by software industry.

- WCF is the programming model build up from scratch for building service-oriented application development.

· WCF completely supports the four tenants of Service Orientation.
- Boundaries are Explicit
- Services are Autonomous
- Services share schema and contract, not class
- Service compatibility is determined based on policy
· Applications based on the above four tenants provide benefits in maintainability, reusability, and manageability of connected systems.

· Service-oriented development complements object-oriented (OO) development. Still Object-oriented concepts will be used to implement internal design of services.

WWF - New Wrestler in Workflow world!

· Windows Workflow Foundation (WF) is a programming model, engine and tools for defining, building, executing, debugging and managing workflows on Windows.

- WWF consists of namespace (System.Workflow), an in-process workflow engine, and designers for Microsoft Visual Studio 2005.

- Windows Workflow Foundation is a programming framework to build workflow enabled applications.

- System.Workflow.ComponentModel is the name space in which most of the abstractions used in WWF are defined.

· A workflow is a set of activities that are stored as a model.
- A workflow is a set of activities that are stored as a model.

- Workflow is nothing but a set of activities that are organized in a tree structure. Activities are the fundamental building blocks of workflows.

- Workflow instance is created and maintained by an in-process workflow runtime engine.

- The Workflow runtime engine is responsible for creating and maintaining running workflow instances.
· Core Components of WWF:
- Base Activity Library: Out-of-box activities which provides functionality for control flow, conditions, event handling, state management and invoking web service. One can build their own custom domain-specific activities using the base activity.
- Runtime Engine: Workflow execution and state management
- Runtime Services: Hosting flexibility and communication
- Visual Designer: Graphical and code-based construction
· Workflows run within a Host Process.
- Once a workflow model is compiled, it can be executed inside any Windows process including console applications, Windows Forms applications, Windows Services, ASP.NET Web sites, and Web services.
· Traditional programming languages won’t support program durability, persistence and long running process. Windows Workflow Foundation is flexible, extensible and supports long running process.

· Work Flow also separates business logic from the code. Developers can build their own custom activities and reuse the same.

· A workflow can be expressed in either declarative XAML or in imperative code using any .NET language like C# and VB.NET.
- You can build workflows directly in code, in markup, or in a combination of both. Pure XAML has an advantage of loading into memory with out compilation.
- Work flow application can be authored in three ways including Code-only (C# and VB.NET), Code-separation (XAML+ C#/VB.NET) and No-Code (XAML).
· Visual workflow designer to design workflows, a visual debugger to debug the workflow designed and project system to compile their workflows inside Visual Studio 2005.

· WWF supports three kind of workflows including sequential, state-based and data driven workflows involving both human and system interaction.
- Sequential workflow is a map of activities with a Start and an End, in series or parallel.
- We can use Sequential work flow, if activities are predictable and repeatable.
- State-based workflow is a state machine where events cause transitions.
- In data-driven workflow, activities are run based on a data state.

XAML browser applications (XBAPs)

· XAML Browser Applications run in an IE sandbox with "Internet Permissions".

· XAML browser applications (XBAPs) provide the advantage of both web applications and rich-client applications.

- XAML browser applications (XBAPs) have access to the rich features of the Windows Presentation Foundation (WPF) runtime. In addition, XAML browser applications can be deployed in a web server similar to a web application.

· To build XBAPs, we need to use the subset of WPF elements that is compatible with Internet zone permissions.

- XAML browser applications (XBAPs) can be deployed from a server with Microsoft Internet Information Services (IIS) or later.

- It is not necessary to have the WPF runtime on the server to deploy WPF applications from it. However, it requires the WPF Multipurpose Internet Mail Extensions (MIME) types and file extensions to be registered.


XAML - The new Bridging language between Designer and Coder!

· Declarative programming - XAML
- Windows Presentation Foundation introduces XAML (eXtensible Application Markup Language), an XML-based way for instantiating and populating nested object hierarchies to write user interfaces.


- Actually XAML internally maps XML markup tags to objects in the .NET Framework. End of the day, XAML gets compiled into an object definition.

- During runtime, it instantiates each of the elements and nodes described in the XAML document and creates an equivalent object model in memory.

- XAML is not Avalon, and Avalon is not XAML! XAML is just another declarative XML based language (Similar to C#, VB .NET etc) to build UI in Windows.


Developer - Designer collaboration
- Developer - Designer collaboration with the introduction of the XML Application Markup Language (XAML).
· Trust me! Mostly Good Developer can’t be a Good Designer!

- With XAML, the developer-designer productivity and collaboration increases with the usage of tools like Visual Studio 2005 (Developer) and Expression Interactive Designer (Designer).

- XAML act as a communication channel between designers and developers!

- With introduction of XAML, Designer can use tools like Expression "Sparkle" or any third-party tools including ZAM 3D, Mobiform Aurora etc to design user interfaces including 2-D and 3-D graphics, video and animation in XAML format

- Developers consume the designer generated XAML with their code for better UI.

- Therefore one can split off presentation UI and client-side logic in the same way as with a Web application.

· Interoperability between Windows Presentation Foundation and Win Forms applications.
- You can host WPF controls in a Windows Forms application, and a Windows Forms control in a WPF application to leverage the existing code base and to facilitate incremental approach for migration.