header image

Archive for 9536

ServiceContractAttribute 

  • Name  and Namespace – The name and namespace are the optional attibutes. Default name is same as the contract type and namespace is http://tempuri.org. It is always recommondable to use Namespace to specify proper namespace which remove the conflict of the datatype/contract.
  • CallbackContract – Return contract in a two-way (duplex) conversation.
  • HasProtectionLevel and ProtectionLevel – Specifies whether all messages supporting the contract have a explicit ProtectionLevel value.
    Default ProtectionLevel is ProtectionLevel.None.
  • ConfigurationName – The name of the service element in the configuration file to use.
  • SessionMode – This is to specify whether the contract requires a binding that supports sessions.

OperationContractAttribute

  • Name: The name of an operation is part of a service contract. Default is the method name.
  • Action: The send message dispatches to the method for the operation based on action.
  • ReplyAction: To specify the reply message
  • IsOneWay: Specifies whether the operation is one directional that an does not return a reply message. This is commonly used for notification service.
  • ProtectionLevel
  • IsInitiating: Specifies if the operation is the intial operation in a session. 
  • IsTerminating: Specifies if the session will be terminated after the operation
  • AsyncPattern: To asynchronously using a Begin/End method pair
under: 11143, 9534, 9536

The evolution of programming languages have been categorized as 1GL, 2GL, 3GL, 4GL….E.g. Machine Language -> Assembly Language -> C / Fortran -> SQL / Focus 4GL. The evolution of these languages are towards Low level language to High Level language.

In 1995, I stated learning computer languages. First I learned C, just after going through Fundamentals of Computer. In my first Academic project using C, I spent lots of time only for writing thousands lines of code. During this period I have gone through System Analysis and Design – where I learned about how to translate / transform the business application into computer systems [application]. Then I learned C++ and OOP, it was too nice experience, where I could compare the whole thing to real life cases. But it was amazing when I came to know SQL – real 4GL… Writing SQL Statement is  about “WHAT” not “HOW” [With few exceptions – Query Hints etc.]. Using SQL generally few lines code computes the values from a set of collections as the resultset/output. Then I started my career with one of the biggest giant – Petroleum Company in India using Sybase and Power Builder. Here I got opportunity to work with all my favourite technologies.

About the future or coming technologies, termed as NEXT GEN Application, I expressed very early in one of my post published on September 15,  2005 Real Challenge to the architect for architecting and designing for FUTURE application development’s method.

That time I was thinking that DSL, ORM, Modeling language were dream and will be goals for the language developer.

Now Microsoft comes up to this with a fantastic way!!!

In last version – .NET Framework 3.5, we got LINQ, LINQ to SQL, LINQ to XML, LING to Object…. Here we focused more on the Entities, Visual Studio writes the code for data manipulation using SQL/XPath all underlying technologies… we stopped thinking about implementation to map the data source to object classes for .NET to some extents. Here we got LINQ to SQL, LINQ to XML and so on so…

This is not the “Full Stop” (“.”). Along with more advancement, Microsoft came up with “M”. It is “Oslo” Modeling Language which is a declarative language for working with data in more readable way for Structuring the the data as well as for querying too. It’s not about how data is stored or accessed, even not by implementation of specific technology.

M builds on three basic concepts: values, types, and extents.

  • A value is the data which follows the rule
  • A type describes a set of values.
  • An extent provides dynamic storage for values.

M has been designed to map the relational model too. Using “Intellipad” tool of “Oslo”, model the data and the corresponding T-SQL statements generated by the compiler. Here “M”->SQL translates “M” “modules” to SQL “schemas.”

More on..

http://msdn.microsoft.com/en-us/library/dd285271.aspx

http://msdn.microsoft.com/en-us/library/dd159725.aspx

under: 9536, 9539, 9541

ServiceContractAttribute 

  • Name  and Namespace – The name and namespace of the contract in the WSDL <portType> element we can modify by specifying this two attribute. Default name is same as the contract type and http://tempuri.org. It is always recommondable to use Namespace to specify proper namespace which remove the conflict of the datatype/contract.
  • CallbackContract – It is used to mention the return contract in a two-way (duplex) conversation.
  • HasProtectionLevel and ProtectionLevel – Specifies whether all messages supporting the contract have a explicit ProtectionLevel value.
    Default ProtectionLevel is ProtectionLevel.None.
  • ConfigurationName – The name of the service element in the configuration file to use.
  • SessionMode – This is to specify whether the contract requires a binding that supports sessions.

Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.servicecontractattribute.aspx

OperationContractAttribute
Name: The name of an operation is part of a service contract. Default is the method name.
Action
ReplyAction
IsOneWay
ProtectionLevel
IsInitiating
IsTerminating
AsyncPattern: To asynchronously using a Begin/End method pair
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.operationcontractattribute.aspx

DataContractAttribute 
http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractattribute.aspx

DataMemberAttribute 
http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datamemberattribute.aspx

MessageContractAttribute
IsWrapped
ProtectionLevel
WrapperName
WrapperNamespace
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.messagecontractattribute.aspx

MessageHeaderAttribute
Name
Namespace
ProtectionLevel
Actor
MustUnderstand
Relay
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.messageheaderattribute.aspx

MessageBodyMemberAttribute
Name
Namespace
ProtectionLevel
Order
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.messagebodymemberattribute.aspx

FaultContract
Ref: http://msdn.microsoft.com/en-us/library/system.servicemodel.faultcontractattribute.aspx

under: 9534, 9536, 9541

Url Rewriting using WCF

Posted by: | December 22, 2008 | No Comment |

One of my interesting thing is “URL Rewriting”. The first time I have implemented it through implementing HTTPHandler using .NET 1.1. Same concept I have applied to a Document Management Service [DMS] project to PUT the document and GET the document by an .ASMX WebService. There I added verb * using wild charater in IIS 6.0 as well as added  <httpHandler> node in web.config. Then we got in different way in .NET 2.0. Finally this time we got using URITemplate, WebGet, WebInvoke in WCF 3.5 SP1.

The UriTemplate class provides methods for working with sets of URIs that share a common structure for URL Rewriting.
As this follows based on the URL pattern comprises left portion of URI which is fixed and rest is dynamic where certain parameter is getting manipulated or changed to request a page. System.UriTemplate provides runtime support for URI template syntax.
UriTemplate is to manipulate parameters using ByName and ByPosition.
[WebGet] – supports HTTP GET method
WebOperationContext provides easy access to Web specifics (e.g., headers, status codes)
[WebInvoke] supports other HTTP methods; POST is default method

http://blogs.msdn.com/endpoint/archive/2008/08/22/rest-in-wcf-part-ix-controlling-the-uri.aspx

http://weblogs.asp.net/jgalloway/archive/2007/05/02/mix07-wcf-adding-system-uritemplate-webget-and-webinvoke.aspx

Corresponding to previous version’s URL concept the available resources are in

http://msdn.microsoft.com/en-us/library/ms972974.aspx

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/

 

under: 9532, 9533, 9534, 9535, 9536

So nicely step by step blogged by Eric Lippert for “Covariance and Contravariance” as “Fabulous Adventures In Coding”

  • Covariance and Contravariance, Part Eleven: To infinity, but not beyond
  • Immutability in C# Part Three: A Covariant Immutable Stack
  • Covariance and Contravariance in C#, Part Ten: Dealing With Ambiguity
  • Covariance and Contravariance in C#, Part Nine: Breaking Changes
  • Covariance and Contravariance in C#, Part Eight: Syntax Options
  • Covariance and Contravariance in C# Part Seven: Why Do We Need A Syntax At All?
  • Covariance and Contravariance in C#, Part Six: Interface Variance
  • Covariance and Contravariance In C#, Part Five: Higher Order Functions Hurt My Brain
  • Covariance and Contravariance in C#, Part Four: Real Delegate Variance
  • Covariance and Contravariance in C#, Part Three: Method Group Conversion Variance
  • Covariance and Contravariance in C#, Part Two: Array Covariance
  • Covariance and Contravariance in C#, Part One
  • under: 9536, 9537

    Very good resources for the coming version…

    Sam Ng

    Chris Burrows

    Eric Lippert

    PDC

    under: 9535, 9536, 9537, 9538, 9539

    “What’s Next?” – Everybody is interested to know about new and upcoming things. While I purchase new thing, I could not wait to use. Previously I was curious to know abour Whidbey, Orcas, WinFx ( Indigo, Avalon)… Next???

    Now it is the case for Oslo too.

    Now after PDC 2008, may many of us come to know about Visual Studio 2010.

     “10” – this one very significant number for football player or hockey player; only the most important player are getting No. 10 as their jersey number.

    Yes, this time, it is “10” – Visual Studio 2010, VB.NET 10, Visual Studio 10 is the NEXT.

    Here are some very useful links related to this.

    http://blogs.msdn.com/kirillosenkov/archive/2008/11/20/links-about-visual-studio-2010-and-c-4-0.aspx

    http://weblogs.asp.net/pgielens/archive/2008/10/27/the-future-of-c-4-0.aspx

    http://code.msdn.microsoft.com/csharpfuture

    http://code.msdn.microsoft.com/csharpfuture/Wiki/View.aspx?title=Home&version=4

     http://blogs.msdn.com/bclteam/archive/2008/11/04/what-s-new-in-the-bcl-in-net-4-0-justin-van-patten.aspx

    under: 9536, 9537, 9538

    C# Language Enhancement

    C# 3,0 LINQ

    C# 3.0 and LINQ With Language Extention

    C# Dynamic Language Enhancement

    C# 4.0 can be found on the Downloads page. The CSharpDynamic samples include several projects showing how to use Dynamic with Office, IronPython and other technologies. There is also a covariance and contravariance example, and an example show how to use the new IDynamicObject interface to create native C# objects that can be called dynamically.

    The document New Features in C# 4.0 is a high level description of the additions to the C# language, and the samples are designed to show off the new language features, particularly around the dynamic scenario.

    under: 9536, 9537

    In my free time I like to see videos from Channel9, TechEd and PDC sessions.

    Guide and Self Learning Resources are avilable @

    NetFxGuide

    http://www.netfxguide.com/guide/wcf.aspx

    http://www.netfxguide.com/guide/WPF.aspx

    http://www.netfxguide.com/guide/WF.aspx

    channel9

    http://channel9.msdn.com/tags/WCF/

     http://channel9.msdn.com/tags/WF/

    http://channel9.msdn.com/tags/WPF/

    under: 9534, 9536, 9542, 9543

    WS-* specifications and WCF

    Posted by: | November 11, 2008 | No Comment |

    To create robust distributed service with WCF it is very essential to understand WS-* specifications.

    List of Web service specifications – http://en.wikipedia.org/wiki/List_of_Web_service_specifications

    In .NET this supports as Web Services Enhancements (WSE). http://en.wikipedia.org/wiki/Web_Services_Enhancements

    The Web Service Specifications is to provide interoperable protocols for Security, Reliable Messaging, and Transactions http://msdn.microsoft.com/en-us/library/ms951274.aspx

    Windows Communication Foundation (WCF) implements a number of Web services protocols. http://msdn.microsoft.com/en-us/library/ms734776.aspx

    The article for WCF implementation of the WS-ReliableMessaging http://msdn.microsoft.com/en-us/library/aa480191.aspx is very nice.

    under: 9534, 9536, 9545

    Older Posts »

    Categories