ss » s Home ss » s Online TV ss » . Technology ss » s Blog

Sunday, 24 May 2009

VS 2008 an its predecessors



Microsoft Visual Studio 2008 (VS08) is the current incarnation of the company’s long line of IDEs. It's the premier IDE for developing applications with the Microsoft .Net Framework and, at least, a contender for the best Windows-hosted C/C++ IDE. Of course, Visual Studio 2008 isn't limited to developing desktop applications; it is also good for developing Web, SOA, and device applications. This release introduces support for .Net Framework 3.5, and it supports other versions of the .Net Framework as well. It also introduces Language-Integrated Query, a generic way to query all kinds of data in C# and Visual Basic, and full support for Windows Vista, Silverlight, and Windows Presentation Foundation.

VS08 comes in a range of editions, from the free Express Editions to the $10,000 does-everything Visual Studio Team System 2008 Team Suite. Basically, the Express editions are for beginner, student, and hobbyist developers; Standard Edition is for individual developers; Professional Edition is for advanced developers and those who work in small teams.

Team System is primarily for larger teams. There are Team System clients for developers, architects, DBAs, and testers, as well as a combined client for all roles called Team Suite. The server for Team System is Team Foundation Server (TFS), which combines a team portal, version control, work item tracking, build management, process guidance, and business intelligence.

In this review, I'll concentrate on the features of VS08 Professional Edition, and touch on a few of the highlights of Team Suite. I won't try to discuss Team Foundation Server as such, although it has received numerous enhancements, such as a new team build system and Web access, since we last reviewed it (see Tom Yager's May 2004 preview of Visual Studio 2005).

Installation and testing

For review purposes, I used three installations of VS08: Professional Edition installed on a Windows Vista for x64 laptop along with Expression Web and Expression Blend; Team Suite installed on a Windows XP desktop along with Visual Studio 2005 (VS05), without access to TFS; and Team Suite installed in a Windows Server 2003 Virtual PC along with TFS. Ninety-day trial versions of all of these versions are available from Microsoft's Web site.

I have blogged at some length (here and here) about my trials and travails installing Team Suite. None of that should affect you, unless you try to uninstall VS08 from a machine that also has VS05; nevertheless, making an image backup of your system before you start your installation might be wise. Expect a VS08 installation to take several hours, with one manual intervention required to start the documentation installation step.

Monday, 11 May 2009

Ajax Security



Ajax Security : Server Side
• AJAX-based Web applications use the same serverside security schemes of regular Web applications
• You specify authentication, authorization, and data protection requirements in your web.xml file (declarative) or in your program (programatic)
• AJAX-based Web applications are subject to the same security threats as regular Web applications
Ajax Security : Client Side
• JavaScript code is visible to a user/hacker. Hacker can use the JavaScript code for inferring server side weaknesses
• JavaScript code is downloaded from the server and executed ("eval") at the client and can compromise the client by mal-intended code
• Downloaded JavaScript code is constrained by sand-box security model and can be relaxed for signed JavaScript

Ajax Framework



• An Ajax framework is a framework that helps to develop web applications that use Ajax, a collection of technologies used to build dynamic web pages on the client side. Data is read from the server or sent to the server by JavaScript requests. However, some processing at the server side may be required to handle requests, such as finding and storing the data. This is accomplished more easily with the use of a framework dedicated to process Ajax requests. The goal of the framework is to provide the Ajax engine described below and associated server and client-side functions.

Benefits of a framework
In the article that coined the "Ajax" term, J.J. Garrett describes the technology as "an intermediary...between the user and the server."[1] This Ajax engine is intended to suppress the delays perceived by the user when a page attempts to access the server. A framework eases the work of the Ajax programmer at two levels: on the client side, it offers JavaScript functions to send requests to the server. On the server side, it processes the requests, searches for the data, and transmits them to the browser. Some frameworks are very elaborate and provide a complete library to build web applications.

Types of frameworks
Ajax frameworks can be loosely grouped into categories according to the features they offer and the skills required of the user:
Direct Ajax frameworks
These frameworks require HTML, CSS and Ajax expertise: a developer is expected to author pages directly in HTML, and framework APIs deal directly with HTML elements. Cross-browser APIs are provided for a variety of purposes, commonly including communications, DOM manipulation, event handling, and sizing/moving/animating HTML elements.
These frameworks are generally smaller. They are commonly used for a web site such as a shopping experience, but not for a web application such as web-based email, at least not without further frameworks layered on top.

Indirect Ajax frameworks
These frameworks are based on compiler technology, where, instead of writing direct Ajax and Javascript, a high-level language is used instead, along with a compiler that turns the high-level language into Javascript. Indirect frameworks therefore require knowledge of the high-level language, CSS and HTML, and do not necessarily require a great deal of Ajax or Javascript expertise. The Indirect frameworks are typically accompanied by convenient libraries, modules and classes (written in the high-level language) that take care of communications, DOM manipulation including HTML element manipulation, and event handling.
Examples of Indirect Ajax frameworks include Google Web Toolkit, Pyjamas (software) and RubyJS. The advantages of Indirect Ajax frameworks - compilation to Javascript - are:
• the developer can effectively create their own Ajax framework using programming concepts and techniques appropriate to the high-level language (e.g. modules and classes) which are simply not present in the Javascript language.
• a developer can program the web front-end in the same programming language as that which the server-side code is written in. For example, programming the front-end with Pyjamas is easier if the developer is familiar with Django (web framework); or programming with GWT is easier if the developer is familiar with Apache Tomcat.
• the high-level web widget sets of the Indirect Ajax frameworks have far more in common with Desktop widgets than they do with "traditional" web development.
• the framework, through the compiler, can create code that takes care of browser incompatibilities at run-time, and thus can present a common browser-independent API to the developer.
Indirect Ajax frameworks have distinct and significant advantages:
• Compared to Ajax component frameworks, the developer can use the available base class widgets to create their own widgets, in the high-level language with which they are familiar, instead of trying to get to grips with javascript.
• The developer is therefore neither burdened by the bloat of Ajax component frameworks nor bound by their rigidity.
• The developer has both the advantages of the Ajax component frameworks, and their associated widgets, as well as the advantages of the freedom of Direct Ajax frameworks.
• Indirect Ajax frameworks can be used to even greater effect in combination with a Server-driven framework (typically using JSONRPC or XMLRPC).
Interestingly, Python and Ruby are a good match for compilation to Javascript, and a far better match than Java, because Java (and Java Virtual Machines) lack some of the run-time dynamic capabilities of Javascript, Python and Ruby. Fortunately for Java (and for GWT), it's Java that is less dynamically capable than Javascript. The "class" capability of these high-level languages can be emulated using Javascript "prototype".

Ajax component frameworks
These frameworks offer pre-built components, such as tabbed panes, which automatically create and manage their own HTML. Components are generally created via JavaScript or XML tags, or by adding special attributes to normal HTML elements. These frameworks are generally larger, and intended for web applications rather than web sites.
Some component frameworks require the developer to have extensive HTML/CSS/Ajax experience and to do cross-browser testing. For example, grids, tabs, and buttons may be provided, but user input forms are expected to be authored directly in HTML/CSS and manipulated via Ajax techniques. Other frameworks provide a complete component suite such that only general XML and/or JavaScript abilities are required.
Ajax component frameworks can enable more rapid development than direct Ajax frameworks, but with less control, hence it is key that an Ajax component framework provides the following:
• customization APIs, e.g., an event that fires when the user stops editing within a grid
• skinning facilities, where appearance can be changed without affecting behavior or layout
• programmatic control, e.g., dynamically adding tabs or dynamically creating components based on user data
• extensibility—creation of new components based on other components, so that the benefits of a component-based framework are not lost
[edit] Server-driven Ajax frameworks
Several frameworks offer a server-side component-based development model with some degree of Ajax support.
Components are created and manipulated on the server using a server-side programming language. Pages are then rendered by a combination of server-side and client-side HTML generation and manipulation. User actions are communicated to the server via Ajax techniques, server-side code manipulates a server-side component model, and changes to the server component model are reflected on the client automatically.
These frameworks offer familiarity and efficiency for server-side developers at the possible expense of power and performance. Ajax frameworks that handle presentation completely within the browser may offer greater responsiveness if they handle more user interactions without server involvement. In a server-driven model, some UI interactions can react slowly, for example when an input field is dynamically enabled based on server-requests. Furthermore, server-dependent Ajax frameworks can not offer offline support. The approach is still popular for situations where the benefits of a full Ajax architecture can't be captured or where server interaction is needed anyway.
Extending such a framework may require the developer to understand which parts of the presentation are handled on the client vs on the server, and to code in JavaScript/Ajax as well as server-side code (an issue which can be overcome through the use of an Indirect Ajax framework, by choosing an Indirect Ajax framework with a compiler that accepts the same language as the server-side code).

Ajax -A brief History



Brief history
Ajax is only a name given to a set of tools that were previously existing.
The main part is XMLHttpRequest, a server-side object usable in JavaScript, that was implemented into Internet Explorer since the 4.0 version.
In Internet Explorer it is an ActiveX object that was first named XMLHTTP some times, before to be generalized on all browser under the name XMLHttpRequest, when the Ajax technology becomes commonly used.
The use of XMLHttpRequest in 2005 by Google, in Gmail and GoogleMaps has contributed to the success of this format. But this is the when the name Ajax was itself coined that the technology started to be so popular.
Why use Ajax?
Mainly to build a fast, dynamic website, but also to save resources.
For improving sharing of resources, it is better to use the power of all the client computers rather than just a unique server and network. Ajax allows to perform processing on client computer (in JavaScript) with data taken from the server.
The processing of web page formerly was only server-side, using web services or PHP scripts, before the whole page was sent within the network.
But Ajax can selectively modify a part of a page displayed by the browser, and update it without the need to reload the whole document with all images, menus, etc...
For example, fields of forms, choices of user, may be processed and the result displayed immediately into the same page.
What is Ajax in depth?
Ajax is a set of technologies, supported by a web browser, including these elements:
• HTML and CSS for presenting.
• JavaScript (ECMAScript) for local processing, and DOM (Document Object Model) to access data inside the page or to access elements of XML file read on the server (with the getElementByTagName method for example)...
• The XMLHttpRequest object is used to read or send data on the server asynchronously.
Optionally...
• DOMParser may be used
• PHP or another scripting language may be used on the server.
• XML and XSLT to process the data if returned in XML form.
• SOAP may be used to dialog with the server.
The "asynchronous" word, means that the response of the server while be processed when available, without to wait and to freeze the display of the page.
How does it works?
Ajax uses a programming model with display and events. These events are user actions, they call functions associated to elements of the web page.
Interactivity is achieved with forms and buttons. DOM allows to link elements of the page with actions and also to extract data from XML files provided by the server.
To get data on the server, XMLHttpRequest provides two methods:
- open: create a connection.
- send: send a request to the server.
Data furnished by the server will be found in the attributes of the XMLHttpRequest object:
- responseXml for an XML file or
- responseText for a plain text.

Take note that a new XMLHttpRequest object has to be created for each new file to load.

We have to wait for the data to be available to process it, and in this purpose, the state of availability of data is given by the readyState attribute of XMLHttpRequest.

States of readyState follow (only the last one is really useful):
0: not initialized.

LINQ to XML overview



XML has been widely adopted as a way to format data in many contexts. For example, you can find XML on the Web, in configuration files, in Microsoft Office Word files, and in databases.
LINQ to XML is an up-to-date, redesigned approach to programming with XML. It provides the in-memory document modification capabilities of the Document Object Model (DOM), and supports LINQ query expressions. Although these query expressions are syntactically different from XPath, they provide similar functionality.
LINQ to XML Developers
LINQ to XML targets a variety of developers. For an average developer who just wants to get something done, LINQ to XML makes XML easier by providing a query experience that is similar to SQL. With just a bit of study, programmers can learn to write succinct and powerful queries in their programming language of choice.
Professional developers can use LINQ to XML to greatly increase their productivity. With LINQ to XML, they can write less code that is more expressive, more compact, and more powerful. They can use query expressions from multiple data domains at the same time.
What Is LINQ to XML?
LINQ to XML is a LINQ-enabled, in-memory XML programming interface that enables you to work with XML from within the .NET Framework programming languages.
LINQ to XML is like the Document Object Model (DOM) in that it brings the XML document into memory. You can query and modify the document, and after you modify it you can save it to a file or serialize it and send it over the Internet. However, LINQ to XML differs from DOM: It provides a new object model that is lighter weight and easier to work with, and that takes advantage of language improvements in Visual C# 2008.
The most important advantage of LINQ to XML is its integration with Language-Integrated Query (LINQ). This integration enables you to write queries on the in-memory XML document to retrieve collections of elements and attributes. The query capability of LINQ to XML is comparable in functionality (although not in syntax) to XPath and XQuery. The integration of LINQ in Visual C# 2008 provides stronger typing, compile-time checking, and improved debugger support.
Another advantage of LINQ to XML is the ability to use query results as parameters to XElement and XAttribute object constructors enables a powerful approach to creating XML trees. This approach, called functional construction, enables developers to easily transform XML trees from one shape to another.
For example, you might have a typical XML purchase order as described in Sample XML File: Typical Purchase Order (LINQ to XML). By using LINQ to XML, you could run the following query to obtain the part number attribute value for every item element in the purchase order:
C#
Copy Code
IEnumerable partNos =
from item in purchaseOrder.Descendants("Item")
select (string) item.Attribute("PartNumber");
In Visual Basic, the same query can be written as follows:
Visual Basic
Copy Code
Dim partNos = _
From item In purchaseOrder... _
Select item.@PartNumber
As another example, you might want a list, sorted by part number, of the items with a value greater than $100. To obtain this information, you could run the following query:
C#
Copy Code
IEnumerable partNos =
from item in purchaseOrder.Descendants("Item")
where (int) item.Element("Quantity") *
(decimal) item.Element("USPrice") > 100
orderby (string)item.Element("PartNumber")
select item;
In Visual Basic, the same query can be written as follows:
Visual Basic
Copy Code
Dim partNos = _
From item In purchaseOrder... _
Where (item..Value * _
item..Value) > 100 _
Order By item..Value _
Select item
In addition to these LINQ capabilities, LINQ to XML provides an improved XML programming interface. Using LINQ to XML, you can:
• Load XML from files or streams.
• Serialize XML to files or streams.
• Create XML from scratch by using functional construction.
• Query XML using XPath-like axes.
• Manipulate the in-memory XML tree by using methods such as Add, Remove, ReplaceWith, and SetValue.
• Validate XML trees using XSD.
• Use a combination of these features to transform XML trees from one shape into another.

All about LINQ



Language Integrated Query (LINQ, pronounced "link") is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages.

Microsoft LINQ defines a set of proprietary query operators that can be used to query, project and filter data in arrays, enumerable classes, XML (XLINQ), relational database, and third party data sources. While it allows any data source to be queried, it requires that the data be encapsulated as objects. So, if the data source does not natively store data as objects, the data must be mapped to the object domain. Queries written using the query operators are executed either by the LINQ query processing engine or, via an extension mechanism, handed over to LINQ providers which either implement a separate query processing engine or translate to a different format to be executed on a separate data store (such as on a database server as SQL queries (DLINQ)). The results of a query are returned as a collection of in-memory objects that can be enumerated using a standard iterator function such as C#'s foreach.

Many of the concepts that LINQ has introduced were originally tested in Microsoft's Cω research project. LINQ was released as a part of .NET Framework 3.5 on November 19, 2007.

Introducing Linq
Linq is short for Language Integrated Query. If you are used to using SQL to query databases, you are going to have something of a head start with Linq, since they have many ideas in common. Before we dig into Linq itself, let's step back and look at what makes SQL different from C#.

Imagine we have a list of orders. For this example, we will imagine they are stored in memory, but they could be in a file on disk too. We want to get a list of the costs of all orders that were placed by the customer identified by the number 84. If we set about implementing this in C# before version 3 and a range of other popular languages, we would probably write something like (assuming C# syntax for familiarity):
List Found = new List();
foreach (Order o in Orders)
if (o.CustomerID == 84)
Found.Add(o.Cost);
Here we are describing how to achieve the result we want by breaking the task into a series of instructions. This approach, which is very familiar to us, is called imperative programming. It relies on us to pick a good algorithm and not make any mistakes in the implementation of it; for more complex tasks, the algorithm is more complex and our chances of implementing it correctly decrease.

If we had the orders stored in a table in a database and we used SQL to query it, we would write something like:
SELECT Cost FROM Orders WHERE CustomerID = 84
Here we have not specified an algorithm, or how to get the data. We have just declared what we want and left the computer to work out how to do it. This is known as declarative or logic programming.

Linq brings declarative programming features into imperative languages. It is not language specific, and has been implemented in the Orcas version of VB.Net amongst other languages. In this series we are focusing on C# 3.0, but the principles will carry over to other languages.

Understanding A Simple Linq Query

Let's jump straight into a code example. First, we'll create an Order class, then make a few instances of it in a List as our test data. With that done, we'll use Linq to get the costs of all orders for customer 84.
class Order
{
private int _OrderID;
private int _CustomerID;
private double _Cost;
public int OrderID
{
get { return _OrderID; }
set { _OrderID = value; }
}
public int CustomerID
{
get { return _CustomerID; }
set { _CustomerID = value; }
}
public double Cost
{
get { return _Cost; }
set { _Cost = value; }
}
}
class Program
{
static void Main(string[] args)
{
// Set up some test orders.
var Orders = new List {
new Order {
OrderID = 1,
CustomerID = 84,
Cost = 159.12
},
new Order {
OrderID = 2,
CustomerID = 7,
Cost = 18.50
},
new Order {
OrderID = 3,
CustomerID = 84,
Cost = 2.89
}
};
// Linq query.
var Found = from o in Orders
where o.CustomerID == 84
select o.Cost;

// Display results.
foreach (var Result in Found)
Console.WriteLine("Cost: " + Result.ToString());
}
}
The output of running this program is:
Cost: 159.12
Cost: 2.89
Let's walk through the Main method. First, we use collection and object initializers to create a list of Order objects that we can run our query over. Next comes the query - the new bit. We declare the variable Found and request that its type be inferred for us by using the "var" keyword.

We then run across a new C# 3.0 keyword: "from".
from o in Orders
This is the keyword that always starts a query. You can read it a little bit like a "foreach": it takes a collection of some kind after the "in" keyword and makes what is to the left of the "in" keyword refer to a single element of the collection. Unlike "foreach", we do not have to write a type.

Following this is another new keyword: "where".
where o.CustomerID == 84
This introduces a filter, allowing us to pick only some of the objects from the Orders collection. The "from" made the identifier "o" refer to a single item from the collection, and we write the condition in terms of this. If you type this query into the IDE yourself, you will notice that it has worked out that "o" is an Order and intellisense works as expected.

The final new keyword is "select".
select o.Cost
This comes at the end of the query and is a little like a "return" statement: it states what we want to appear in the collection holding the results of the query. As well as primitive types (such as int), you can instantiate any object you like here. In this case, we will end up with Found being a List, though.

You may be thinking at this point, "hey, this looks like SQL but kind of backwards and twisted about a bit". That is a pretty good summary. I suspect many who have written a lot of SQL will find the "select comes last" a little grating at first; the other important thing to remember is that all of the conditions are to be expressed in C# syntax, not SQL syntax. That means "==" for equality testing, rather than "=" in SQL. Thankfully, in most cases that mistake will lead to a compile time error anyway

Sunday, 10 May 2009

Silver light 1.1



Silverlight 1.1
At MIX we shipped both a beta version of Silverlight 1.0 (which will ship in final release form this summer), as well as delivered an alpha version of Silverlight 1.1.

Silverlight 1.1 includes a cross platform version of the .NET Framework, and enables a rich .NET development experience within a browser. The total download size of the Silverlight 1.1 package (including all of the 1.0 features + CLR + a WPF and .NET FX library API subset + dynamic language support) is ~4MB - and it takes less than 20 seconds to install on a machine.

Some of the Silverlight V1.1 features include:

•A built-in CLR engine that delivers a super high performance execution environment for the browser. Silverlight uses the same core CLR engine that we ship with the full .NET Framework today (we build it from a single source tree). It delivers the same type-system, garbage collector, and JIT code generation engine that your .NET code uses today. This means that you can write .NET code that can now run in Silverlight, ASP.NET, and a WinForms/WPF Windows application. It also means you can now execute code within the browser that runs more than 250x faster than interpreted Javascript.
•Silverlight includes a rich framework library of built-in classes that you can use to develop browser-based applications. This framework library is a subset of the full .NET Framework class library you use today, and enables you to easily re-use your existing skills and knowledge. It includes support for collections, generics, IO, threading, globalization, networking, and LINQ.
•Silverlight includes support for a WPF UI programming model. The Silverlight 1.1 Alpha enables you to program your UI with managed code/event handlers, and supports the ability to define and use encapsulated UI controls (built with any managed .NET language). The first Silverlight Alpha doesn't yet ship with a rich set of built-in UI controls -- we've been busy at work building the core UI infrastructure first. Don't worry, though, a rich set of high-level controls will definitely be included in the future (in the meantime you can download some nice samples of controls here). WPF for Silverlight will also ultimately ship with support for core WPF constructs like layout managers and data-binding (these features are not yet implemented in the current alpha - but are coming).
•Silverlight provides a managed HTML DOM API that enables you to program the HTML of a browser using any .NET language (this means you can now wire-up an event handler to an HTML button using C# or VB). Silverlight also provides the ability to have Javascript code within an HTML page call into .NET methods you expose from within your Silverlight control/application. Silverlight includes a JSON serializer that supports automatic marshalling of .NET datatypes to/from Javascript (meaning you can have standard browser Javascript code call a C# method within Silverlight, and have the C# method return a .NET collection which is then serialized by Silverlight into a Javascript collection for your browser Javascript to use).
•Silverlight doesn't require ASP.NET to be used on the backend web-server (meaning you could use Silverlight with with PHP on Linux if you wanted to). However, we've naturally added some pretty nice features that enables you to easily integrate Silverlight on the client and ASP.NET on the server together. Silverlight can use the standard ASP.NET application services (membership, roles, profile, etc), and can call either WCF or ASMX web-services hosted within ASP.NET. This week we also shipped new ASP.NET server controls that make it easy to host Silverlight controls within ASP.NET pages.
Below is a 22 minute video I recorded that demonstrates how to build a Silverlight application from scratch using Visual Studio and Expression Blend (click here to download the UI controls I used):



You can click on the picture below to download a nice poster that provides an overview of some of the key .NET namespaces and features that are supported with the Silverlight 1.1 alpha today:



I also did a Channel9 interview that you can watch to learn a little more about how the managed programming model works within Silverlight, and how we added the CLR support:



May 10th Update: I also did a great podcast with Scott Hanselman that you can download and listen to here.

I'd also recommend watching these (free) conference sessions from the MIX conference that cover Silverlight 1.1 with .NET scenarios:

•Building Silverlight Applications using .NET (Part 1)
•Building Silverlight Applications using .NET (Part 2)
•Extending the Browser Programming Model with Silverlight
You can download the source code for the Part1/Part2 samples on Nick's site here.

FarPoint Spread for BizTalk Server 2006



Convert your Microsoft Excel® XLS data into XML for easy processing through the BizTalk Server pipeline

Spread for BizTalk Server 2006 provides a complete solution for integrating Microsoft Excel data seamlessly into your BizTalk applications.

Spread includes a pipeline disassembler that parses Excel data (XLS, Excel 2007 XML, CSV, TXT) into XML, and a pipeline assembler that creates Excel (XLS, Excel 2007 XML) and PDF documents from XML data in BizTalk Applications.
This is one of the single most important and long awaited innovations to the business process integration (BPI) market I've ever seen.

I rarely make a "pitch" for non-MSFT development products, but if you're a BizTalk developer like me this is one tool that you really need in your "integration arsenal".
- Jeff Lynch Industry Expert and Microsoft MVP



A Codeless Solution
Spread includes the Spreadsheet Schema Wizard and the Spreadsheet Format Designer that are both integrated into Visual Studio 2005. The Spreadsheet Schema Wizard enables the developer to codelessly create custom schemas. These schemas are used by the pipeline disassembler to define the structure of the resulting XML data as it is parsed from incoming Excel streams. This same wizard is used to define the schemas that represent XML data streams to be assembled into Excel or PDF documents through the pipeline assembler. The Spreadsheet Format Designer can be used by the developer to design the appearance of the resulting Excel or PDF documents to be created by the pipeline assembler.


A Simple Solution
The power of Spread is in its functionality, not in its complexity. Spread is a simple and elegant solution to a real business problem – the integration and use of spreadsheet data in your business applications.


Spread for BizTalk provides:•a codeless solution for the integration of Microsoft Excel data into your BizTalk applications
•a Visual Studio integrated design-time that includes the Spreadsheet Schema Wizard, and the Spreadsheet Format Designer
•automated parsing of Excel message streams (XLS, Excel 2007 XML, CSV, TXT) into XML message stream
•automated document creation by assembling XML data in BizTalk applications into Excel (XLS, Excel 2007 XML), or PDF documents

Watch the Video
Watch the Training Video
This video is as close as you will get to a live demo without scheduling a Live Meeting with us! Our Product Manager takes you through a real business scenario using the disassembler and assembler and illustrates the power of Spread for BizTalk Server 2006 and why it should be added to your Microsoft BizTalk arsenal. We highly recommend viewing this video prior to beginning your evaluation of the 60-day trial.

Saturday, 11 April 2009

WCF Client overview



WCF Client Overview

This section describes what client applications do, how to configure, create, and use a Windows Communication Foundation (WCF) client, and how to secure client applications.

Using WCF Client Objects
A client application is a managed application that uses a WCF client to communicate with another application. To create a client application for a WCF service, the following steps are required.

Obtain the service contract, binding, and address information for a service endpoint.

Create a WCF client using that information.

Call operations.

Close the WCF client object.

The following sections discuss these steps as well as provide brief introductions to the following issues:

Handling errors

Configuring and securing clients

Creating callback objects for duplex services

Calling services asynchronously

Calling services using client channels

Obtain the Service Contract, Bindings, and Addresses
In WCF services and clients model contracts using managed attributes, interfaces, and methods. To connect to a service in a client application, then, you need to obtain the type information for the service contract. Typically, you do this by using the ServiceModel Metadata Utility Tool (Svcutil.exe), which downloads metadata from the service, converts it to a managed source code file in the language of your choice, and creates a client application configuration file that you can use to configure your WCF client object. For example, if you are going to create an WCF client object to invoke a MyCalculatorService and you know that the metadata for that service is published at http://computerName/MyCalculatorService/Service.svc?wsdl then the following code example shows how to use Svcutil.exe to obtain a ClientCode.vb file that contains the service contract in managed code

Wednesday, 8 April 2009

What is WCF



What Is Windows Communication Foundation?

The global acceptance of Web services, which includes standard protocols for application-to-application communication, has changed software development. For example, the functions that Web services now provide include security, distributed transaction coordination, and reliable communication. The benefits of the changes in Web services should be reflected in the tools and technologies that developers use. Windows Communication Foundation (WCF) is designed to offer a manageable approach to distributed computing, broad interoperability, and direct support for service orientation.

WCF simplifies development of connected applications through a new service-oriented programming model. WCF supports many styles of distributed application development by providing a layered architecture. At its base, the WCF channel architecture provides asynchronous, untyped message-passing primitives. Built on top of this base are protocol facilities for secure, reliable, transacted data exchange and broad choice of transport and encoding options.



The typed programming model (called the service model) is designed to ease the development of distributed applications and to provide developers with expertise in ASP.NET Web services, .NET Framework remoting, and Enterprise Services, and who are coming to WCF with a familiar development experience. The service model features a straightforward mapping of Web services concepts to those of the .NET Framework common language runtime (CLR), including flexible and extensible mapping of messages to service implementations in languages such as Visual C# or Visual Basic. It includes serialization facilities that enable loose coupling and versioning, and it provides integration and interoperability with existing .NET Framework distributed systems technologies such as Message Queuing (MSMQ), COM+, ASP.NET Web services, Web Services Enhancements (WSE), and a number of other functions.

Problem Example
The following example illustrates some of the problems that WCF addresses. A car rental company decides to create a new application for reserving cars. The creators of this rental car reservation application know that the business logic it implements must be accessible by other software running both inside and outside their company. Accordingly, they decide to build it in a service-oriented style, with the application’s logic exposed to other software through a well-defined set of services. To implement these services, and thus communicate with other software, the new application will use WCF.



Over its lifetime, the rental car reservation application will likely be accessed by a range of other applications. When it is designed, however, the architects of the rental car reservation application know that its business logic will be accessed, as shown in the preceding figure, by three other kinds of software:

A call center client application running on the Windows desktops that are used by employees in the organization’s call center. Created specifically for the new reservations system, this application will also be built using the Microsoft .NET Framework and WCF. This application is not truly distinct from the new rental car reservation application, because its only purpose is to act as a client for the new system. From a service-oriented perspective, it is just another client for the reservation system’s business logic.

An existing reservation application built on a J2EE server running on a non-Windows system. Due to a recent merger with another car rental firm, this existing system must be able to access the new application’s logic to provide customers of the merged firms with a unified experience.

Partner applications running on a variety of platforms, each located within a company that has a business arrangement with the car rental firm. Partners might include travel agencies, airlines, and others that have a business requirement to make car rental reservations.

The diverse communication requirements for the new rental car reservation application are not simple. For interactions with the call center client application, for instance, performance is important, while interoperability is straightforward, because both are built on the .NET Framework. For communication with the existing J2EE-based reservation application and with the diverse partner applications, however, interoperability becomes the highest goal. The security requirements are also quite different, varying across local Windows-based applications, a J2EE-based application running on another operating system, and a variety of partner applications coming in across the Internet. Even transactional requirements might vary, with only the internal applications being allowed to make transactional requests. How can these diverse business and technical requirements be met without exposing the creators of the new application to unmanageable complexity?

WCF is designed for this diverse but realistic scenario and is the default technology for Windows applications that expose and access services. This topic provides an introduction to WCF, examining what it provides and showing how it is used. Throughout this introduction, the scenario just described will serve as an example. The goal is to make clear what WCF is, show what problems it solves, and illustrate how it solves those problems.

Tuesday, 10 March 2009

Service Oriented Architecture



What is Service Oriented Architecture?


that their technologies remain aligned with business goals. Failure to do so compromises organizational agility.
Service orientation is an approach to organizing distributed IT resources into an integrated
solution that breaks down information si

los and maximizes business agility. Service
orientation modularizes IT resources, creating loosely coupled business processes that integrate information across business systems. Each IT resource,
whether an application, system or trading partner, can be accessed as a service. These capabilities are available through interfaces; complexity arises when service providers differ in their operating system or communication protocols, resulting in inoperability. Service orientation is a means for integrating across diverse systems. Service orientation uses standard protocols and conventional interfaces—usually Web services—to facilitate access to business logic and information

among diverse services. Service Oriented Architecture (SOA) provides the principles and guidance to transform a company's existing array of heterogeneous, distributed, complex and inflexible IT resources into integrated, simplified and highly flexible resources that can be changed and composed to more directly support business goals. SOA ultimately enables the delivery of a new generation of dynamic applications (sometimes called composite applications). These applications provide end users with more accurate and comprehensive information and insight into processes, as well as the flexibility to access it in the most suitable form and presentation factor, whether through the Web or through a rich client or mobile device. What is Business Process Management (BPM)? Business processes underlie all organizational efforts, and the effectiveness with which they are carried out contributes directly to critical b

usiness goals such as customer retention, length of time it takes to fulfill a product order or service, or regulatory compliance. Business process management (BPM) is a management discipline that combines a process-centric and cross-functional approach to improving how organizations achieve their business


goals. A BPM solution provides the tools that help make these processes explicit, as well as the functionality to help business managers control and change both manual and automated workflows. Although early implementations of BPM have unfolded in large enterprises, managing business processes is critical for any size of organization that would benefit from greater visibility into and control over the processes that support their business goals. Business process management has its origins in total quality management and business process reengineering. While it adds to these a technological framework, it is more than just the combination of these disciplines. BPM is an IT enabled management discipline that promotes organizational agility and supports the efforts of people to drive process change and rapid innovation. As such, BPM supports the alignment of IT and business activities both within the organization and with business partners and suppliers. fddl

What is Service Oriented Architecture (SOA)? IT departments are managing increasingly complex IT portfolios. Yet as business needs change, these departments must still ensure that their technologies remain aligned with business goals. Failure to do so compromises organizational agility.

Yet as business needs change, these departments must still ensure that their technologies remain aligned with business goals. Failure to do so compromises organizational agility.