Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

February 15, 2011

WCF Data Services Toolkit released

The intent of the toolkit is to make it easier to expose arbitrary data sources as OData services. Examples of such data sources might be:
An existing web API XML/CSV file(s)
Data stored within a proprietary software system
The toolkit also makes it easy to mash-up multiple data sources so that creating a "unified model" is possible, regardless how much disparate data you or your customers might have.

This project was created from the needs of our live partner services (e.g. eBay, Netflix, Facebook, Twitpic) and will continue to be iterated on as we discover new scenarios and needs during future partner engagements.
Read the following blog post to get an introduction on how to use the toolkit: Looking forward to seeing what the community does with the toolkit and are of course very open to feedback/suggestions/comments

June 17, 2010

WCF Vs Web Services

WCF/ASP.Net Web Services are used for developing web services. Here is a list of differentiation between these two.

Feature

ASP.NET Web Service

WCF

Data Transformation

To and from Data Transition is done through XML Serializer

DataContractSerializer is used for data transition

File Extension

File extension is asmx

File extension is .svc

Webmethods vs    DataContract Attributes

ASP.NET WebService uses Webmethods to translate .NET FW types in to XML.</SPAN< td>

The WCF uses the DataContractAttribute and DataMemeberAttribute to translate .NET FW types in to XML.

Limitations

Only Public fields or Properties of .NET types can be translated into XML.Only the classes which implement IEnumerable interface. ICollection interface can be serializable

Public/Private fields or properties of .NET types can be translated.

IDictionary Interface  class

Classes that implement the IDictionary interface, such as Hash table can not be serialized.

The DataContractSerializer can translate the Hash Table into XML. Hence using WCF we can even translate HashTable into XML

Security

WCF is more secured than WebService due to -> It is based on WS Standards. capable to run in any .NET executable, so it needs independent security capabilities.

Transfer security  Responsible for providing message confidentiality, data integrity, and authentication of communicating parties.
Authorization Responsible for providing a framework for making authorization decisions.
Auditing Responsible for logging security-related events to the audit log

Binding

Web service supports only HTTP.

WCF supports multiple bindings HTTP,TCP,MSMQ,WS-HTTP etc

Messaging

ASP.Net web service uses only SOAP (Simple Object Access Protocol) for sending and receiving data. It uses Xml Schema  to  defines structure of message.

Windows Communication Foundation (WCF) can send message in any format. It uses SOAP for communication by default. It can use any other transport protocol for message transport .

Performance

Slower compared to WCF

The main advantage of the design of the DataContractSerializer is better performance over XML serialization

Fields / Properties

XMLSerialization does not indicate the which fields or properties of the type are serialized into XML

DataContratSerializer Explicitly shows the which fields or properties are serialized into XML

Exception handling

In ASP.NET Web services, Unhandled exceptions are returned to the client as SOAP faults.

In WCF Services, unhandled exceptions are not returned to clients as SOAP faults. A configuration setting is provided to have the unhandled exceptions returned to clients for the purpose of debugging.

Example

[WebService]
public class Service : System.Web.Services.WebService
{
[WebMethod]
public string Demo(string strDemog)
{
return strDemo;
}
}

[ServiceContract]
public interface ITest
{
[OperationContract]
string ShowMessage(string strDemo);
}
public class Service : ITest
{
public string Demo(string strDemo)
{
return strDemo;
}
}

After you know the importance of the WCF on WebServices, to create and explore on Your first WCF application

July 09, 2007

.NET Framework 3.0

ASPAlliance publishes my article on All about .NET Framework 3.0
I have written an article and submitted in ASPAlliance .
Today I am happy to see the mail that it has got approved and published.

About ASPAlliance
It’s the site that connects Active Software Professionals. Here is the LINK
This article explains about Windows Presentation Foundation,Windows Communication Foundation,Windows WorkFlow Foundation in depth.

If you have find sometime please have a look at the ARTICLE

If you feel that article is useful please kick on the link here
kick it on DotNetKicks.com


AuctionAds: Increase the bid on your site's income!