<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>I.Net</title>
	<atom:link href="http://soumya.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://soumya.wordpress.com</link>
	<description>Yet another .NET blog.</description>
	<lastBuildDate>Wed, 18 Jan 2012 16:12:48 +0000</lastBuildDate>
	<language></language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='soumya.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>I.Net</title>
		<link>http://soumya.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://soumya.wordpress.com/osd.xml" title="I.Net" />
	<atom:link rel='hub' href='http://soumya.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Twitter</title>
		<link>http://soumya.wordpress.com/2011/08/02/twitter/</link>
		<comments>http://soumya.wordpress.com/2011/08/02/twitter/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 17:25:37 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://soumya.wordpress.com/?p=547</guid>
		<description><![CDATA[In a few years we&#8217;ll all be ashamed that we used Twitter. - Me<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=547&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In a few years we&#8217;ll all be ashamed that we used Twitter.</p>
<p>- Me</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/547/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=547&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2011/08/02/twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Concepts Simplified Part 5: Javascript Closures</title>
		<link>http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-5-javascript-closures/</link>
		<comments>http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-5-javascript-closures/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 20:52:32 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-5-javascript-closures/</guid>
		<description><![CDATA[Closures are a tricky concept in Javascript. They seem deceptively simple but there are a lot of intricacies that can trip up developers. To start understanding closures, we need to start with scope – in Javascript, a function has access to it’s parent’s context, grandparent’s&#160; context, etc. up the scope chain. To see this try [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=535&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Closures are a tricky concept in Javascript. They seem deceptively simple but there are a lot of intricacies that can trip up developers. To start understanding closures, we need to start with scope – in Javascript, a function has access to it’s parent’s context, grandparent’s&#160; context, etc. up the scope chain. To see this try the code,</p>
<pre class="code"><span style="color:blue;">var </span>X = <span style="color:#a31515;">&quot;window&quot;</span>;

<span style="color:blue;">function </span>outermost() {
    <span style="color:blue;">var </span>Y = <span style="color:#a31515;">&quot;outermost&quot;</span>;

    <span style="color:blue;">function </span>inner() {
        <span style="color:green;">// Knows about the parent function's Y
        </span>alert(Y);

        <span style="color:blue;">function </span>innermost() {
            <span style="color:green;">// Knows about the grandparent function's Y
            </span>alert(Y);
            <span style="color:green;">// Knows about the greatgrandparent's X
            </span>alert(X);
        }
        innermost();
    }
    inner();
}
outermost();</pre>
<p>This seems simple enough, even expected. Now here’s the trick, let’s return some function pointers,</p>
<pre class="code"><span style="color:blue;">var </span>X = <span style="color:#a31515;">&quot;window&quot;</span>;

<span style="color:blue;">function </span>outermost() {
    <span style="color:blue;">var </span>Y = <span style="color:#a31515;">&quot;outermost&quot;</span>;

    <span style="color:blue;">function </span>inner() {
        <span style="color:green;">// Knows about the parent function's Y
        </span>alert(Y);

        <span style="color:blue;">function </span>innermost() {
            <span style="color:green;">// Knows about the grandparent function's Y
            </span>alert(Y);
            <span style="color:green;">// Knows about the greatgrandparent's X
            </span>alert(X);
        }

        <span style="color:green;">// 'inner' returns a reference to the 'innermost' function
        </span><span style="color:blue;">return </span>innermost;
    }

    <span style="color:green;">// 'outermost' returns a reference to the 'inner' function
    </span><span style="color:blue;">return </span>inner;
}</pre>
<p>Now let’s call these functions,</p>
<pre class="code"><span style="color:green;">// Get the reference to the 'inner' function
</span><span style="color:blue;">var </span>inr = outermost();

<span style="color:green;">// Call the 'inner' function
</span>inr();  <span style="color:green;">// alerts 'outermost'

// Get the reference to the innermost function
</span><span style="color:blue;">var </span>inmost = inr(); <span style="color:green;">// alerts 'outermost'

// Call the 'innermost' function
</span>inmost();   <span style="color:green;">// alerts 'outermost' and 'window'</span></pre>
<p>As you can see, when we call the ‘innermost’ function, using the reference returned by the call to ‘inner’, it still has access to the <font color="#c64000">X</font> and <font color="#c64000">Y</font> values <em>as they were in scope when the ‘innermost’ function was defined</em>. This is Javascript’s closure &#8211; capturing information at the point of definition, so that the information can be used at the point of execution. Also the variables are not copies – they are references.</p>
<p>A very common problem that occurs is in the unintended creation of closure,</p>
<pre class="code"><span style="color:blue;">for </span>(<span style="color:blue;">var </span>i = 0; i &lt; 5; i++) {
    <span style="color:green;">// This creates a closure!
    </span>elements[i].onclick = <span style="color:blue;">function</span>() { alert(i); };
}</pre>
<p>Now clicking on any element will alert ‘4’, why? Because all of the functions we created have a reference (not a copy) to the outer <font color="#c64000">var i</font>, probably not the effect you want. To fix this,</p>
<pre class="code"><span style="color:blue;">for </span>(<span style="color:blue;">var </span>i = 0; i &lt; 5; i++) {
    <span style="color:green;">// Don't create a function - no closure
    </span>elements[i].onclick = Handle(i);
}

<span style="color:blue;">function </span>Handle(i) {
    <span style="color:blue;">return function</span>() { alert(i); };
}</pre>
<p>You can read up more about closures <a href="http://blog.morrisjohns.com/javascript_closures_for_dummies.html">here</a>.</p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=https%3a%2f%2fsoumya.wordpress.com%2f2010%2f06%2f06%2fjavascript-concepts-simplified-part-5-javascript-closures%2f&amp;title=Javascript+Concepts+Simplified+Part+5%3a+Javascript+Closures"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/535/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/535/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/535/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=535&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-5-javascript-closures/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Concepts Simplified Part 4: The Prototype Property</title>
		<link>http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-4-the-prototype-property/</link>
		<comments>http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-4-the-prototype-property/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 07:09:40 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-4-the-prototype-property/</guid>
		<description><![CDATA[All Javascript objects have a property called ‘prototype’ which can contain an object reference. Javascript uses this property to implement it’s inheritance hierarchy – by putting a reference to the parent object via the ‘prototype’ property. To see this try the following code, // The base class function Base() { // Public property this.aPublicProperty = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=528&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>All Javascript objects have a property called ‘<strong>prototype</strong>’ which can contain an object reference. Javascript uses this property to implement it’s inheritance hierarchy – by putting a reference to the parent object via the ‘prototype’ property. To see this try the following code,</p>
<pre class="code"><span style="color:green;">// The base class
</span><span style="color:blue;">function </span>Base() {
    <span style="color:green;">// Public property
    </span><span style="color:blue;">this</span>.aPublicProperty = <span style="color:#a31515;">&quot;This is a public property of the type Base&quot;</span>;
}</pre>
<p>This initializes the prototype property (internally) to an empty class.</p>
<pre class="code"><span style="color:green;">// 'prototype' is not null, it is initialized internally like this - Base.prototype = { }
</span>alert(Base.prototype);   <span style="color:green;">// [object Object]
</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Now we can add fields/properties to the (empty) object that the prototype refers,</p>
<pre class="code"><span style="color:green;">// Add a new field/property
</span>Base.prototype.newField = <span style="color:#a31515;">&quot;This is a new field of the type Base's prototype&quot;</span>;
Base.prototype.aPublicProperty = <span style="color:#a31515;">&quot;This is a public property of the type Base's prototype&quot;</span>;</pre>
<p>Now here’s the trick that transforms this innocuous looking property into the basis of Javascript’s object oriented implementation: when you access a property on a class, if the class doesn’t have the property, Javascript will <em>look for the property on the object the prototype refers to</em>. Now we can see how this might lead to inheritance – the derived class (the object) can access the base class’s (the object’s prototype’s object) methods. Also if both the object and the object’s prototype referred object have the same property, the object’s property overrides the prototype referred object’s property.</p>
<pre class="code"><span style="color:blue;">var </span>baseInstance = <span style="color:blue;">new </span>Base();
alert(baseInstance.newField);        <span style="color:green;">// Access the prototype's property
</span>alert(baseInstance.constructor.prototype.aPublicProperty);  <span style="color:green;">// Access the prototype's property - will see later
</span>alert(Base.prototype.aPublicProperty);  <span style="color:green;">// Access the prototype's property via Base
</span>alert(baseInstance.aPublicProperty);    <span style="color:green;">// Override the prototype's property</span></pre>
<p>We are starting to see object-oriented behaviors implemented via the prototype property. The prototype property refer’s to the object’s base class. Let’s take this further,</p>
<pre class="code"><span style="color:green;">// Derived from the base class
</span><span style="color:blue;">function </span>Derived() { }
Derived.prototype = <span style="color:blue;">new </span>Base();

<span style="color:green;">// Another class derived from the base class
</span><span style="color:blue;">function </span>AnotherDerived() { }
AnotherDerived.prototype = <span style="color:blue;">new </span>Base();

<span style="color:green;">// A class derived from the derived class
</span><span style="color:blue;">function </span>DerivedDerived() { }
DerivedDerived.prototype = <span style="color:blue;">new </span>Derived();</pre>
<p>This results in a class hierarchy that looks like this,</p>
<p><a href="http://soumya.files.wordpress.com/2010/06/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/06/image_thumb.png?w=281&#038;h=166" width="281" height="166" /></a> </p>
<p>Now that we have the class structure, let’s create some instances,</p>
<pre class="code"><span style="color:green;">// Create some instances
</span><span style="color:blue;">var </span>derivedInstance = <span style="color:blue;">new </span>Derived();
<span style="color:blue;">var </span>anotherDerivedInstance = <span style="color:blue;">new </span>AnotherDerived();
<span style="color:blue;">var </span>derivedDerivedInstance = <span style="color:blue;">new </span>DerivedDerived();</pre>
<p>Let’s add a new property to the Base’s prototype. </p>
<pre class="code"><span style="color:green;">// Add a new property to the Base's prototype
</span>Base.prototype.testInheritance = <span style="color:#a31515;">&quot;Every object that derives from Base now has this property&quot;</span>;
alert(derivedDerivedInstance.testInheritance);</pre>
<p>And add a new property to the Derived’s prototype,</p>
<pre class="code"><span style="color:green;">// Add a new property to the Derived's prototype
</span>Derived.prototype.testInheritance = <span style="color:#a31515;">&quot;Every object that derives from Derived now has this property&quot;</span>;
<span style="color:green;">// Does that mean the Base now has the property? No.
</span>alert(baseInstance.testInheritance); <span style="color:green;">// undefined
</span>alert(derivedDerivedInstance.testInheritance);</pre>
<p>For more information about Javascript prototypes see <a href="http://www.packtpub.com/article/using-prototype-property-in-javascript">here</a>.</p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=https%3a%2f%2fsoumya.wordpress.com%2f2010%2f06%2f06%2fjavascript-concepts-simplified-part-4-the-prototype-property%2f&amp;title=Javascript+Concepts+Simplified+Part+4%3a+The+Prototype+Property"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/528/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=528&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-4-the-prototype-property/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/06/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Concepts Simplified Part 3: Javascript and JSON</title>
		<link>http://soumya.wordpress.com/2010/06/04/javascript-concepts-simplified-part-3-javascript-and-json/</link>
		<comments>http://soumya.wordpress.com/2010/06/04/javascript-concepts-simplified-part-3-javascript-and-json/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 22:43:20 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/06/04/javascript-concepts-simplified-part-3-javascript-and-json/</guid>
		<description><![CDATA[JSON stands for Javascript Object Notation. In the first post we saw how to define a class in Javascript so that an object instance can be created. Now let’s create an object using the object literal notation. In Javascript, there is the concept of a literal notation to define an object, // A string literal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=521&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><font color="#c64000">JSON</font> stands for <u>J</u>ava<u>s</u>cript <u>O</u>bject <u>N</u>otation. In the <a href="http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/">first post</a> we saw how to define a class in Javascript so that an object instance can be created. Now let’s create an object using the <em>object literal notation</em>. In Javascript, there is the concept of a literal notation to define an object,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// A string literal
</span><span style="color:blue;">var </span>stringLiteral = <span style="color:#a31515;">&quot;A string literal&quot;</span>;

<span style="background:#e6e6e6;color:green;">// An array literal
</span><span style="color:blue;">var </span>arrayLiteral = [1,2,3];</pre>
<p>Extending this concept to objects, we create an anonymous type in Javascript using an object literal, </p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Create an anonymous type by using the object literal notation,
</span><span style="color:blue;">var </span>myObjectUsingJSON = {

    <span style="background:#e6e6e6;color:green;">// Public field – a name/value pair
</span>    aPublicField : <span style="color:#a31515;">&quot;This is a public field of an anonymous type&quot;</span>,

    <span style="background:#e6e6e6;color:green;">// Public method – another name/value pair
</span>    aPublicMethod : <span style="color:blue;">function</span>() { <span style="color:blue;">return this</span>.aPublicField; }
}

<span style="background:#e6e6e6;color:green;">// Call the anonymous type’s public field or method
</span>alert(myObjectUsingJSON.aPublicMethod()); </pre>
<p>We created an instance (<font color="#c64000">myObjectUsingJSON</font>) of the the anonymous type using the object literal notation and the anonymous object has two members which are <em>name-value pairs</em>. This way of representing (and creating) an object is called the Javascript Object Notation or <font color="#c64000">JSON</font>. It’s just a way of creating an anonymous type using name-value pairs. For comparison, recall how we similarly create anonymous types in C#,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Anonymous type in C#
</span><span style="color:blue;">var </span>anonType = <span style="color:blue;">new </span>{ Name = <span style="color:#a31515;">&quot;John&quot;</span>, Age = 50 };</pre>
<p>Now let’s create a more complicated class using this object notation,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Create an anonymous type...
</span><span style="color:blue;">var </span>myObjectUsingJSON = {

    <span style="background:#e6e6e6;color:green;">// ...with a key whose value is a simple array...
</span>    anArray : [<span style="color:#a31515;">&quot;This&quot;</span>, <span style="color:#a31515;">&quot;array&quot;</span>, <span style="color:#a31515;">&quot;has&quot;</span>, 5, <span style="color:#a31515;">&quot;items&quot;</span>],

    <span style="background:#e6e6e6;color:green;">// ...and another key whose value is an array with a nested object...
</span>    anotherArray : [<span style="color:#a31515;">&quot;This&quot;</span>, <span style="color:#a31515;">&quot;array&quot;</span>, <span style="color:#a31515;">&quot;has&quot;</span>, 6, { X: 1 }, <span style="color:#a31515;">&quot;items&quot;</span>],

    <span style="background:#e6e6e6;color:green;">// ...and another key whose value happens to be another anonymous object...
</span>    anObject : {
        key1 : <span style="color:#a31515;">&quot;A string&quot;</span>,                           <span style="background:#e6e6e6;color:green;">/* ...with one key whose value is a string... */
</span>        key2 : <span style="color:blue;">function</span>() { <span style="color:blue;">return </span><span style="color:#a31515;">&quot;Hello&quot;</span>; },       <span style="background:#e6e6e6;color:green;">/* ...and another key whose value is a function... */
</span>        key3 : {                                     <span style="background:#e6e6e6;color:green;">/* ...and another key whose value happens to be another anonymous object */
</span>            key31 : <span style="color:blue;">true</span>,                            <span style="background:#e6e6e6;color:green;">/* ...with a key whose value is a boolean... */</span>
            key32 : <span style="color:blue;">function</span>() { <span style="color:blue;">return </span>{ Name: <span style="color:#a31515;">&quot;World!&quot; </span>}; }, <span style="background:#e6e6e6;color:green;">/* ...and a key whose value is a function that returns an object */</span>
            key33 : {                                          <span style="background:#e6e6e6;color:green;">/* This key's value happens to get yet another anonymous object */
</span>                key331 : <span style="color:blue;">function</span>() { <span style="color:blue;">return </span><span style="color:#a31515;">&quot;That’s deep!&quot;</span>; }
            }
        }
    }
}

<span style="background:#e6e6e6;color:green;">// Access an array element
</span>alert(myObjectUsingJSON.anArray[2]);

<span style="background:#e6e6e6;color:green;">// Access the inner object
</span>alert(myObjectUsingJSON.anotherArray[4].X);

<span style="background:#e6e6e6;color:green;">// Get a value from a name
</span>alert(myObjectUsingJSON.anObject.key3.key31);

<span style="background:#e6e6e6;color:green;">// Access the object returned by the function
</span><span style="color:blue;">var </span>funcReturn = myObjectUsingJSON.anObject.key3.key32();
alert(funcReturn.Name);

<span style="background:#e6e6e6;color:green;">// Call the deepest function
</span>alert(myObjectUsingJSON.anObject.key3.key33.key331());</pre>
<p>As you can see it’s pretty easy to nest anonymous objects to create a class structure. This representation of a class is more compact than XML, in terms of raw serialized bytes sent over the wire. So, Javascript prefers using this object notation when sending/receiving data. A string can easily be eval-ed into an object,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// The JSON string
</span><span style="color:blue;">var </span>jsonString = <span style="color:#a31515;">&quot;{ anotherArray: ['This', 'array', 'has', 6, { X: 1 }, 'items'] }&quot;</span>;

<span style="background:#e6e6e6;color:green;">// Eval the JSON string into an object
</span><span style="color:blue;">var </span>myEvaledJSONObject = eval(<span style="color:#a31515;">'(' </span>+ jsonString + <span style="color:#a31515;">')'</span>);

<span style="background:#e6e6e6;color:green;">// Access the object
</span>alert(myEvaledJSONObject.anotherArray[4].X);</pre>
<p>For more information about JSON see <a href="http://msdn.microsoft.com/en-us/library/bb299886.aspx">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/521/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/521/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/521/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=521&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/06/04/javascript-concepts-simplified-part-3-javascript-and-json/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Concepts Simplified Part 2: Javascript Inheritance</title>
		<link>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-2-javascript-inheritance/</link>
		<comments>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-2-javascript-inheritance/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 23:29:12 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-2-javascript-inheritance/</guid>
		<description><![CDATA[Now that we created a base Javascript class in the first post, let’s inherit from it to get a derived class. // Define the derived function (remember there is no 'class' keyword in Javascript) function MyDerivedClass() { } // Derive from MyClass, equivalent to –&#62; public class MyDerivedClass : MyClass MyDerivedClass.prototype = new MyClass(); // [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=519&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now that we created a base Javascript class in the <a href="http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/">first post</a>, let’s inherit from it to get a derived class.</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Define the derived function (remember there is no 'class' keyword in Javascript)
</span><span style="color:blue;">function </span>MyDerivedClass() { }

<span style="background:#e6e6e6;color:green;">// Derive from MyClass, equivalent to –&gt; public class MyDerivedClass : MyClass
</span>MyDerivedClass.prototype = <span style="color:blue;">new </span>MyClass();

<span style="background:#e6e6e6;color:green;">// Create an instance of the derived class
</span><span style="color:blue;">var </span>myderivedClass = <span style="color:blue;">new </span>MyDerivedClass();

<span style="background:#e6e6e6;color:green;">// Get the public field
</span>alert(myderivedClass.aPublicField);

<span style="background:#e6e6e6;color:green;">// Call the public method
</span>alert(myderivedClass.aPublicMethod());</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Woah! That was simple! Notice that <font color="#c64000">MyClass</font>’s private methods and the runtime field (<font color="#c64000">aRuntimeField</font>) we gave to <font color="#c64000">MyClass</font> in the last post is not available to <font color="#c64000">MyDerivedClass</font>.</p>
<p>Let’s override the base classe’s public fields and methods and see what happens,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Define the derived function (remember there is no 'class' keyword in Javascript
</span><span style="color:blue;">function </span>MyDerivedClass() {

    <span style="background:#e6e6e6;color:green;">// Override the base's public field
</span>    <span style="color:blue;">this</span>.aPublicField = <span style="color:#a31515;">&quot;This is a public field of the type MyDerivedClass&quot;</span>;

    <span style="background:#e6e6e6;color:green;">// Override the base's public method
</span>    <span style="color:blue;">this</span>.aPublicMethod = <span style="color:blue;">function</span>() { <span style="color:blue;">return this</span>.aPublicField; }
}

<span style="background:#e6e6e6;color:green;">// Derive from MyClass, equivalent to –&gt; public class MyDerivedClass : MyClass
</span>MyDerivedClass.prototype = <span style="color:blue;">new </span>MyClass();

<span style="background:#e6e6e6;color:green;">// Create an instance of the derived class
</span><span style="color:blue;">var </span>myderivedClass = <span style="color:blue;">new </span>MyDerivedClass();

<span style="background:#e6e6e6;color:green;">// Get the public field
</span>alert(myderivedClass.aPublicField);

<span style="background:#e6e6e6;color:green;">// Call the public method
</span>alert(myderivedClass.aPublicMethod());</pre>
<p>You’ll see that the base classes public fields and methods have been overridden in the derived class.</p>
<p>We can obviously derive again,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Derive from MyDerivedClass
</span><span style="color:blue;">function </span>MyDerivedDerivedClass() {

    <span style="background:#e6e6e6;color:green;">// Override the base's public field
</span>    <span style="color:blue;">this</span>.aPublicField = <span style="color:#a31515;">&quot;This is a public field of the type MyDerivedDerivedClass&quot;</span>;

    <span style="background:#e6e6e6;color:green;">// Override the base's public method
</span>    <span style="color:blue;">this</span>.aPublicMethod = <span style="color:blue;">function</span>() { <span style="color:blue;">return this</span>.aPublicField; }
}

<span style="background:#e6e6e6;color:green;">// Derive from MyDerivedClass, equivalent to –&gt; public class MyDerivedDerivedClass : MyDerivedClass
</span>MyDerivedDerivedClass.prototype = <span style="color:blue;">new </span>MyDerivedClass();

<span style="background:#e6e6e6;color:green;">// Create an instance of the derived class
</span><span style="color:blue;">var </span>myderivedderivedClass = <span style="color:blue;">new </span>MyDerivedDerivedClass();

<span style="background:#e6e6e6;color:green;">// Call the public method
</span>alert(myderivedderivedClass.aPublicField);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/519/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/519/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/519/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=519&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-2-javascript-inheritance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Concepts Simplified Part 1: Javascript Classes</title>
		<link>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/</link>
		<comments>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 22:27:46 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/</guid>
		<description><![CDATA[While the Javascript language offers many of the constructs required for object-oriented programming, they remain largely unused. Today we’ll take a look at how to start with object-oriented programing in Javascript. by defining a class in Javascript. We’ll use the simple HTML file to call our script file, &#60;!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.0 Transitional//EN&#34;&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=515&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While the Javascript language offers many of the constructs required for object-oriented programming, they remain largely unused. Today we’ll take a look at how to start with object-oriented programing in Javascript. by defining a class in Javascript. We’ll use the simple HTML file to call our script file,</p>
<pre class="code"><span style="color:blue;">&lt;!</span><span style="color:#a31515;">DOCTYPE </span><span style="color:red;">HTML PUBLIC </span><span style="color:blue;">&quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;</span><span style="color:#a31515;">html</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">head</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">title</span><span style="color:blue;">&gt;</span>Hello Javascript!<span style="color:blue;">&lt;/</span><span style="color:#a31515;">title</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">script </span><span style="color:red;">type</span><span style="color:blue;">=&quot;text/javascript&quot; </span><span style="color:red;">src</span><span style="color:blue;">=&quot;MyScript.js&quot;&gt;&lt;/</span><span style="color:#a31515;">script</span><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">head</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">body</span><span style="color:blue;">&gt;
        </span>Hello Javascript!
    <span style="color:blue;">&lt;/</span><span style="color:#a31515;">body</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">html</span><span style="color:blue;">&gt;</span></pre>
<p>Now let’s create a class definition (in <font color="#c64000">MyScript.js</font>). Note that there is no ‘class’ keyword in Javascript, the class definition is just a function definition,</p>
<pre class="code"><span style="color:blue;">function </span>MyClass() {

    <span style="background:#e6e6e6;color:green;">// Public field
</span>    <span style="color:blue;">this</span>.aPublicField = <span style="color:#a31515;">&quot;This is a public field of the type MyClass&quot;</span>;

    <span style="background:#e6e6e6;color:green;">// Private field
</span>    <span style="color:blue;">var </span>aPrivateField = <span style="color:#a31515;">&quot;This is a private field of the type MyClass&quot;</span>;

    <span style="background:#e6e6e6;color:green;">// Public method
</span>    <span style="color:blue;">this</span>.aPublicMethod = <span style="color:blue;">function</span>() {
        <span style="background:#e6e6e6;color:green;">// Use the private method
</span>        <span style="color:blue;">if </span>(aPrivateMethod()) { <span style="color:blue;">return this</span>.aPublicField; }
        <span style="color:blue;">else </span>{ <span style="color:blue;">return </span>aPrivateField; }
    }

    <span style="background:#e6e6e6;color:green;">// Private method
</span>    <span style="color:blue;">function </span>aPrivateMethod() {
        <span style="color:blue;">return true</span>;
    }

    <span style="background:#e6e6e6;color:green;">// Oops! We can expose the private field
</span>    <span style="color:blue;">this</span>.exposePrivateField = aPrivateField;
    <span style="background:#e6e6e6;color:green;">// and the private method
</span>    <span style="color:blue;">this</span>.exposePrivateMethod = aPrivateMethod;
}

<span style="background:#e6e6e6;color:green;">// Create an instance of MyClass using the ‘new’ keyword
</span><span style="color:blue;">var </span>myclass = <span style="color:blue;">new </span>MyClass();

<span style="background:#e6e6e6;color:green;">// Get the public field
</span>alert(myclass.aPublicField);

<span style="background:#e6e6e6;color:green;">// Call the public method
</span>alert(myclass.aPublicMethod());

<span style="background:#e6e6e6;color:green;">// Call the private field – can’t get to them directly
</span>alert(myclass.exposePrivateField);
alert(myclass.exposePrivateMethod());</pre>
<p><a href="http://11011.net/software/vspaste"></a><a href="http://11011.net/software/vspaste"></a></p>
<p>So it’s pretty simple to create a class in Javascript. We can also create a runtime field for the class,</p>
<pre class="code"><span style="background:#e6e6e6;color:green;">// Create an instance of MyClass
</span><span style="color:blue;">var </span>myclass = <span style="color:blue;">new </span>MyClass();

<span style="background:#e6e6e6;color:green;">// Create a field at runtime
</span>myclass.aRuntimeField = <span style="color:#a31515;">&quot;This is a runtime field of the type MyClass&quot;</span>;

<span style="background:#e6e6e6;color:green;">// View the field value
</span>alert(myclass.aRuntimeField);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/515/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/515/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/515/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=515&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Concepts Simplified</title>
		<link>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified/</link>
		<comments>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 22:27:17 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified/</guid>
		<description><![CDATA[In this series, we’ll take a look at some core Javascript concepts. Javascript Concepts Simplified Part 1: Javascript Classes Javascript Concepts Simplified Part 2: Javascript Inheritance Javascript Concepts Simplified Part 3: Javascript and JSON Javascript Concepts Simplified Part 4: The Prototype Property Javascript Concepts Simplified Part 5: Javascript Closures<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=514&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this series, we’ll take a look at some core Javascript concepts.</p>
<p><a href="http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-1-javascript-classes/">Javascript Concepts Simplified Part 1: Javascript Classes</a></p>
<p><a href="http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified-part-2-javascript-inheritance/">Javascript Concepts Simplified Part 2: Javascript Inheritance</a></p>
<p><a href="http://soumya.wordpress.com/2010/06/04/javascript-concepts-simplified-part-3-javascript-and-json/">Javascript Concepts Simplified Part 3: Javascript and JSON</a></p>
<p><a href="http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-4-the-prototype-property/">Javascript Concepts Simplified Part 4: The Prototype Property</a></p>
<p><a href="http://soumya.wordpress.com/2010/06/06/javascript-concepts-simplified-part-5-javascript-closures/">Javascript Concepts Simplified Part 5: Javascript Closures</a></p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=https%3a%2f%2fsoumya.wordpress.com%2f2010%2f06%2f03%2fjavascript-concepts-simplified%2f&amp;title=Javascript+Concepts+Simplified"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/514/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/514/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/514/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=514&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/06/03/javascript-concepts-simplified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>CodePlex Project: Team Foundation Server Explorer</title>
		<link>http://soumya.wordpress.com/2010/05/28/codeplex-project-team-foundation-server-explorer/</link>
		<comments>http://soumya.wordpress.com/2010/05/28/codeplex-project-team-foundation-server-explorer/#comments</comments>
		<pubDate>Fri, 28 May 2010 17:48:58 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[TFS]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/05/28/codeplex-project-team-foundation-server-explorer/</guid>
		<description><![CDATA[Recently I’ve been looking at Microsoft’s Team Foundation Server API and thought of writing a simple Team Foundation Server Browser. The result is posted on CodePlex and the some screenshots are below. Using the browser you can view the source tree and folder/file history, checkin/checkout files, View pending changes (even for other users) and checkin/undo [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=498&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I’ve been looking at <a href="http://msdn.microsoft.com/en-us/library/bb130146(v=VS.80).aspx">Microsoft’s Team Foundation Server API</a> and thought of writing a simple Team Foundation Server Browser. The result is <a href="http://tfsexplorer.codeplex.com/">posted on CodePlex</a> and the some screenshots are below.</p>
<p>Using the browser you can view the source tree and folder/file history, checkin/checkout files,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/sourcetree.png"><img style="display:inline;border-width:0;" title="SourceTree" border="0" alt="SourceTree" src="http://soumya.files.wordpress.com/2010/05/sourcetree_thumb.png?w=630&#038;h=419" width="630" height="419" /></a></p>
<p>View pending changes (even for other users) and checkin/undo your files,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/pendingchanges.png"><img style="display:inline;border-width:0;" title="PendingChanges" border="0" alt="PendingChanges" src="http://soumya.files.wordpress.com/2010/05/pendingchanges_thumb.png?w=630&#038;h=419" width="630" height="419" /></a></p>
<p>You can view your (or other people’s) shelve sets,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image50.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb50.png?w=638&#038;h=157" width="638" height="157" /></a> </p>
<p>You can also change the displayed user via the User’s tab.</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image48.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb48.png?w=335&#038;h=143" width="335" height="143" /></a></p>
<p>You can compare file history,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image51.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb51.png?w=295&#038;h=145" width="295" height="145" /></a> </p>
<p>and view change set details,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image52.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb52.png?w=248&#038;h=127" width="248" height="127" /></a> </p>
<p>FAQs:</p>
<p>1. Make sure you have mapped correctly, ‘Not mapped’ will cause the exception,</p>
<blockquote><p>TF10217: Team Foundation was unable to complete your request due to an unexpected error. For more details, see the event log on the Team Foundation Server.</p>
</blockquote>
<p><a href="http://soumya.files.wordpress.com/2010/05/image49.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb49.png?w=320&#038;h=112" width="320" height="112" /></a></p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=https%3a%2f%2fsoumya.wordpress.com%2f2010%2f05%2f28%2fcodeplex-project-team-foundation-server-explorer%2f&amp;title=CodePlex+Project%3a+Team+Foundation+Server+Explorer"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/498/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/498/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/498/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=498&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/05/28/codeplex-project-team-foundation-server-explorer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/sourcetree_thumb.png" medium="image">
			<media:title type="html">SourceTree</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/pendingchanges_thumb.png" medium="image">
			<media:title type="html">PendingChanges</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb50.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb48.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb51.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb52.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb49.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>WCF Simplified Part 9: SOAP, WSDL, and REST</title>
		<link>http://soumya.wordpress.com/2010/05/27/wcf-simplified-part-9-soap-wsdl-and-rest/</link>
		<comments>http://soumya.wordpress.com/2010/05/27/wcf-simplified-part-9-soap-wsdl-and-rest/#comments</comments>
		<pubDate>Thu, 27 May 2010 23:59:48 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/05/27/wcf-simplified-part-9-soap-wsdl-and-rest/</guid>
		<description><![CDATA[Today we’ll look at some of the basic concepts in web services so that we can have a better understanding of how WCF works. 1. SOAP 1.2: SOAP stands for Simple Object Access Protocol. It is simply an XML document that describes a message (structured and typed information) that can be sent from one network [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=487&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today we’ll look at some of the basic concepts in web services so that we can have a better understanding of how WCF works.</p>
<p>1. <font color="#c64000">SOAP 1.2</font>: SOAP stands for <a href="http://www.w3.org/TR/soap/">Simple Object Access Protocol</a>. It is simply an XML document that describes <em>a message </em>(structured and typed information)<em> </em>that can be sent from one network endpoint to another. SOAP is fundamentally <em>a stateless, one-way message exchange paradigm</em>, but applications can create more complex interaction patterns (e.g., request/response) by combining such one-way exchanges with features provided by an underlying protocol and/or application-specific information. A SOAP message may be transferred by different underlying protocols for example, for web-based access, it could be placed in the body of a HTTP POST request. The schema for the SOAP XML can be found <a href="http://schemas.xmlsoap.org/soap/envelope/">here</a>. The structure of a SOAP message looks like this,</p>
<pre class="code"><span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>'<span style="color:blue;">1.0</span>' <span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">soap:Envelope </span><span style="color:red;">xmlns:soap</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://www.w3.org/2003/05/soap-envelope</span>&quot;<span style="color:blue;">&gt;

  &lt;!-- </span><span style="color:green;">The header is optional. It contains contextual information related to the message </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">soap:Header</span><span style="color:blue;">&gt;
  &lt;/</span><span style="color:#a31515;">soap:Header</span><span style="color:blue;">&gt;

  &lt;!-- </span><span style="color:green;">The body is mandatory </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">soap:Body</span><span style="color:blue;">&gt;
    &lt;!-- </span><span style="color:green;">Sample content </span><span style="color:blue;">--&gt;
    &lt;</span><span style="color:#a31515;">ns:GetPassengerName </span><span style="color:red;">xmlns:ns</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://someURI</span>&quot;<span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">ns:PassengerId</span><span style="color:blue;">&gt;</span>815<span style="color:blue;">&lt;/</span><span style="color:#a31515;">ns:PassengerId</span><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">ns:GetPassengerName</span><span style="color:blue;">&gt;</span><span style="color:blue;">
  &lt;/</span><span style="color:#a31515;">soap:Body</span><span style="color:blue;">&gt;

&lt;/</span><span style="color:#a31515;">soap:Envelope</span><span style="color:blue;">&gt;</span></pre>
<p>And another could look like,</p>
<pre class="code"><span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>'<span style="color:blue;">1.0</span>' <span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">soap:Envelope </span><span style="color:red;">xmlns:soap</span><span style="color:blue;">=</span>&quot;<span style="color:blue;"><a href="http://www.w3.org/2003/05/soap-envelope&quot;&gt;">http://www.w3.org/2003/05/soap-envelope</span>&quot;<span style="color:blue;">&gt;
</span><span style="color:blue;">
</a>  &lt;!-- </span><span style="color:green;">The body is mandatory </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">soap:Body</span><span style="color:blue;">&gt;
    &lt;!<span style="color:blue;">-- </span></span><span style="color:green;">The body has content </span><span style="color:blue;">--&gt;
    &lt;</span><span style="color:#a31515;">ns:GetPassengerNameResponse </span><span style="color:red;">xmlns:ns</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://someURI</span>&quot;<span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">ns:PassengerName</span><span style="color:blue;">&gt;</span>John Locke<span style="color:blue;">&lt;/</span><span style="color:#a31515;">ns:PassengerName</span><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">ns:GetPassengerNameResponse</span><span style="color:blue;">&gt;

    &lt;!<span style="color:blue;">-- </span></span><span style="color:green;">or can report a fault </span><span style="color:blue;">--&gt;
    &lt;</span><span style="color:#a31515;">soap:Fault</span><span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">soap:Code</span><span style="color:blue;">&gt;
      &lt;/</span><span style="color:#a31515;">soap:Code</span><span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">soap:Reason</span><span style="color:blue;">&gt;
      &lt;/</span><span style="color:#a31515;">soap:Reason</span><span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">soap:Detail</span><span style="color:blue;">&gt;
      &lt;/</span><span style="color:#a31515;">soap:Detail</span><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">soap:Fault</span><span style="color:blue;">&gt;
  &lt;/</span><span style="color:#a31515;">soap:Body</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">soap:Envelope</span><span style="color:blue;">&gt;</span></pre>
<p></p>
<p>The above example is a little contrived, it’s recommended that you use URIs as resource identifiers, so your host might look like <a href="http://someHOST/somePATH?PassengerNameFromID=815">http://someHOST/somePATH?PassengerNameFromID=815</a>.</p>
<p>The <font color="#c64000">SOAP-HTTP</font> binding is of particular interest because it is widely used.</p>
<p>&#160;&#160;&#160; a. <font color="#c64000">SOAP HTTP GET</font> example,</p>
<pre class="code">GET /somePATH?PassengerNameFromID=815 HTTP/1.1
Host: someHOST
Accept: text/html;q=0.9, <font color="#c64000">application/soap+xml</font></pre>
<p>with a response,</p>
<pre class="code">HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=&quot;utf-8&quot;
Content-Length: [...]

<span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>'<span style="color:blue;">1.0</span>' <span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">env:Envelope </span><span style="color:red;">xmlns:env</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://www.w3.org/2003/05/soap-envelope</span>&quot;<span style="color:blue;">&gt;
  &lt;</span><span style="color:#a31515;">env:Body</span><span style="color:blue;">&gt;</span>[...]<span style="color:blue;">&lt;/</span><span style="color:#a31515;">env:Body</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">env:Envelope</span><span style="color:blue;">&gt;

</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160;&#160;&#160; b. <font color="#c64000">SOAP HTTP POST</font> example,</p>
<pre class="code">POST /somePATH HTTP/1.1
Host: someHOST
Content-Type: application/soap+xml; charset=&quot;utf-8&quot;
Content-Length: [...]

<span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>'<span style="color:blue;">1.0</span>' <span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">env:Envelope </span><span style="color:red;">xmlns:env</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://www.w3.org/2003/05/soap-envelope</span>&quot; <span style="color:blue;">&gt;
  &lt;</span><span style="color:#a31515;">env:Body</span><span style="color:blue;">&gt;</span>[...]<span style="color:blue;">&lt;/</span><span style="color:#a31515;">env:Body</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">env:Envelope</span><span style="color:blue;">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>2. <font color="#c64000">WSDL 1.1</font>: WSDL stands for <a href="http://www.w3.org/TR/wsdl">Web Services Description Language</a>. It is simply an XML document that describes a web service. The schema for the WSDL XML is publicly available <a href="http://schemas.xmlsoap.org/wsdl/">here</a>. The WSDL XML needs to describe fully how communication between two network endpoints will occur. It is a binding mechanism, it attaches a specific protocol or format to a message, operation or endpoint. The major parts of the WSDL XML are,</p>
<pre class="code"><span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">1.0</span>&quot; <span style="color:red;">encoding</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">UTF-8</span>&quot;<span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">definitions </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">HelloService</span>&quot;<span style="color:blue;">&gt;

  &lt;</span><span style="color:#a31515;">types</span><span style="color:blue;">&gt;
    &lt;!-- </span><span style="color:green;">What data types are exchanged </span><span style="color:blue;">--&gt;
  &lt;/</span><span style="color:#a31515;">types</span><span style="color:blue;">&gt;

  &lt;</span><span style="color:#a31515;">message</span><span style="color:blue;">&gt;
    &lt;!--</span><span style="color:green;">What messages are exchanged </span><span style="color:blue;">--&gt;
  &lt;/</span><span style="color:#a31515;">message</span><span style="color:blue;">&gt;

  &lt;</span><span style="color:#a31515;">portType</span><span style="color:blue;">&gt;
    &lt;!-- </span><span style="color:green;">What operations are supported by the web service </span><span style="color:blue;">--&gt;
  &lt;/</span><span style="color:#a31515;">portType</span><span style="color:blue;">&gt;

  &lt;</span><span style="color:#a31515;">binding</span><span style="color:blue;">&gt;
    &lt;!-- </span><span style="color:green;">How the messages will be transmitted </span><span style="color:blue;">--&gt;
  &lt;/</span><span style="color:#a31515;">binding</span><span style="color:blue;">&gt;

  &lt;</span><span style="color:#a31515;">service</span><span style="color:blue;">&gt;
    &lt;!-- </span><span style="color:green;">Where is the web service located </span><span style="color:blue;">--&gt;
  &lt;/</span><span style="color:#a31515;">service</span><span style="color:blue;">&gt;

&lt;/</span><span style="color:#a31515;">definitions</span><span style="color:blue;">&gt;</span></pre>
<p>Say you have a service contract,</p>
<pre class="code">[<span style="color:#2b91af;">ServiceContract</span>]
<span style="color:blue;">public interface </span><span style="color:#2b91af;">IService1 </span>{
    [<span style="color:#2b91af;">OperationContract</span>]
    <span style="color:blue;">string </span>GetData(<span style="color:blue;">int </span>value);
}</pre>
<p>The corresponding WSDL looks like (some things omitted for clarity), </p>
<p></p>
<pre class="code"><span style="color:blue;">&lt;?</span><span style="color:#a31515;">xml </span><span style="color:red;">version</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">1.0</span>&quot; <span style="color:red;">encoding</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">utf-8</span>&quot;<span style="color:blue;">?&gt;
&lt;</span><span style="color:#a31515;">wsdl:definitions </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">Service1</span>&quot; <span style="color:red;">xmlns:wsdl</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://schemas.xmlsoap.org/wsdl/</span>&quot; <span style="color:blue;">[</span><span style="color:red;">...</span><span style="color:blue;">]&gt;

  &lt;!-- </span><span style="color:green;">The two messages GetData and GetDataResponse (because IsOneWay is false) </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">wsdl:message </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">IService1_GetData_InputMessage</span>&quot;<span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">wsdl:part </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">parameters</span>&quot; <span style="color:red;">element</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">tns:<strong>GetData</strong></span>&quot;<span style="color:blue;">/&gt;
  &lt;/</span><span style="color:#a31515;">wsdl:message</span><span style="color:blue;">&gt;
  &lt;</span><span style="color:#a31515;">wsdl:message </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">IService1_GetData_OutputMessage</span>&quot;<span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">wsdl:part </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">parameters</span>&quot; <span style="color:red;">element</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">tns:<strong>GetDataResponse</strong></span>&quot;<span style="color:blue;">/&gt;
  &lt;/</span><span style="color:#a31515;">wsdl:message</span><span style="color:blue;">&gt;

  &lt;!-- </span><span style="color:green;">The web service only has one operation - GetData </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">wsdl:portType </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">IService1</span>&quot;<span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">wsdl:operation </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;"><strong>GetData</strong></span>&quot;<span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">wsdl:input </span><span style="color:red;">wsaw:Action</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://tempuri.org/IService1/GetData</span>&quot; <span style="color:red;">message</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">tns:IService1_GetData_InputMessage</span>&quot;<span style="color:blue;">/&gt;
      &lt;</span><span style="color:#a31515;">wsdl:output </span><span style="color:red;">wsaw:Action</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://tempuri.org/IService1/GetDataResponse</span>&quot; <span style="color:red;">message</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">tns:IService1_GetData_OutputMessage</span>&quot;<span style="color:blue;">/&gt;
    &lt;/</span><span style="color:#a31515;">wsdl:operation</span><span style="color:blue;">&gt;
  &lt;/</span><span style="color:#a31515;">wsdl:portType</span><span style="color:blue;">&gt;

  &lt;!-- </span><span style="color:green;">Note the WSHttpBinding </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">wsdl:binding </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">WSHttpBinding_IService1</span>&quot; <span style="color:red;">type</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">tns:IService1</span>&quot;<span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">wsdl:operation </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;"><strong>GetData</strong></span>&quot;<span style="color:blue;">&gt;
      </span><span style="color:blue;">  &lt;</span><span style="color:#a31515;">wsdl:input</span><span style="color:blue;">&gt;
          &lt;</span><span style="color:#a31515;">wsp:PolicyReference </span><span style="color:red;">URI</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">#<strong>WSHttpBinding</strong>_IService1_GetData_Input_policy</span>&quot;<span style="color:blue;">/&gt;
        &lt;/</span><span style="color:#a31515;">wsdl:input</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">wsdl:output</span><span style="color:blue;">&gt;
          &lt;</span><span style="color:#a31515;">wsp:PolicyReference </span><span style="color:red;">URI</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">#<strong>WSHttpBinding</strong>_IService1_GetData_output_policy</span>&quot;<span style="color:blue;">/&gt;
        &lt;/</span><span style="color:#a31515;">wsdl:output</span><span style="color:blue;">&gt;
      &lt;/</span><span style="color:#a31515;">wsdl:operation</span><span style="color:blue;">&gt;
</span><span style="color:blue;">  &lt;/</span><span style="color:#a31515;">wsdl:binding</span><span style="color:blue;">&gt;

  &lt;!-- </span><span style="color:green;">The address for the web service </span><span style="color:blue;">--&gt;
  &lt;</span><span style="color:#a31515;">wsdl:service </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">Service1</span>&quot;<span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">wsdl:port </span><span style="color:red;">name</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">WSHttpBinding_IService1</span>&quot; <span style="color:red;">binding</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">tns:WSHttpBinding_IService1</span>&quot;<span style="color:blue;">&gt;
      &lt;</span><span style="color:#a31515;">wsa10:EndpointReference</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">wsa10:Address</span><span style="color:blue;">&gt;</span>http://localhost:8731/Design_Time_Addresses/WcfServiceLibrary2/Service1/<span style="color:blue;">&lt;/</span><span style="color:#a31515;">wsa10:Address</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">Identity </span><span style="color:red;">xmlns</span><span style="color:blue;">=</span>&quot;<span style="color:blue;">http://schemas.xmlsoap.org/ws/2006/02/addressingidentity</span>&quot;<span style="color:blue;">&gt;
          &lt;</span><span style="color:#a31515;">Dns</span><span style="color:blue;">&gt;</span>localhost<span style="color:blue;">&lt;/</span><span style="color:#a31515;">Dns</span><span style="color:blue;">&gt;
        &lt;/</span><span style="color:#a31515;">Identity</span><span style="color:blue;">&gt;
      &lt;/</span><span style="color:#a31515;">wsa10:EndpointReference</span><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">wsdl:port</span><span style="color:blue;">&gt;
  &lt;/</span><span style="color:#a31515;">wsdl:service</span><span style="color:blue;">&gt;</span></pre>
<p></p>
<p>3. <font color="#c64000">REST</font>: REST stands for <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">Representational State Transfer</a>. REST is basically a set of design principles for web services. Since it’s not a protocol (like SOAP), it doesn’t specify any new XML or schema but relies on HTTP’s methods (GET/POST/PUT/DELETE). The idea is to design (REST-ful) web services that deal with identifying and manipulating resources using HTTP methods. is to use The four main tenets of REST are,</p>
<p>&#160;&#160;&#160; a. <font color="#c64000">Use HTTP methods correctly</font>: This means use the methods GET/POST/PUT/DELETE for what they are meant for. For example, GET should be a safe retrieval with no side effects.</p>
<p>&#160;&#160;&#160; b.<font color="#c64000"> Be Stateless</font>: Design the host and client so that the HTTP headers and body of a request contains all of the parameters, context, and data needed by the server-side component to generate a response. A stateless service shifts most of the responsibility of maintaining state to the client application.</p>
<p>&#160;&#160; c. <font color="#c64000">Expose self-documenting (directory structure-like) URIs:</font> For example, <a href="http://someHOST/photos/2010/05/27/{id">http://someHOST/photos/2010/05/27/{id</a>}</p>
<p>&#160;&#160; d. <font color="#c64000">Use MIME types and HTTP Accept</font>: RESt-ful services usually use the common content types application/json or application/xml.</p>
<div class="wlWriterHeaderFooter" style="text-align:right;margin:0;padding:4px 0;"><a href="http://digg.com/submit?url=https%3a%2f%2fsoumya.wordpress.com%2f2010%2f05%2f27%2fwcf-simplified-part-9-soap-wsdl-and-rest%2f&amp;title=WCF+Simplified+Part+9%3a+SOAP%2c+WSDL%2c+and+REST"><img src="http://digg.com/img/badges/100x20-digg-button.png" width="100" height="20" alt="Digg This" title="Digg This" border="0" style="border:0;" /></a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/487/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/487/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/487/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=487&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/05/27/wcf-simplified-part-9-soap-wsdl-and-rest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>

		<media:content url="http://digg.com/img/badges/100x20-digg-button.png" medium="image">
			<media:title type="html">Digg This</media:title>
		</media:content>
	</item>
		<item>
		<title>WCF Simplified Part 8: Sessions, Instance Management and Concurrency</title>
		<link>http://soumya.wordpress.com/2010/05/26/wcf-simplified-part-8-sessions-instance-management-and-concurrency/</link>
		<comments>http://soumya.wordpress.com/2010/05/26/wcf-simplified-part-8-sessions-instance-management-and-concurrency/#comments</comments>
		<pubDate>Wed, 26 May 2010 23:59:51 +0000</pubDate>
		<dc:creator>soumya chattopadhyay</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">https://soumya.wordpress.com/2010/05/26/wcf-simplified-part-8-sessions-instance-management-and-concurrency/</guid>
		<description><![CDATA[Today we’ll look at WCF sessions, instance management, and concurrency. 1. Sessions: A session is a grouping of client requests. Unlike ASP.NET there is no data store associated with a WCF session. Not all bindings support sessions (BasicHttpBinding does not). Client applications initiate sessions and then receive and process the messages sent within the session. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=485&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today we’ll look at WCF sessions, instance management, and concurrency.</p>
<p>1. <font color="#c64000">Sessions</font>: A session is a grouping of client requests. Unlike ASP.NET there is no data store associated with a WCF session. Not all bindings support sessions (<font color="#c64000">BasicHttpBinding</font> does not). Client applications initiate sessions and then receive and process the messages sent within the session. Messages delivered during a session are processed in the order in which they are received. When a WCF service accepts a client session, all calls between a WCF client object are handled by the same user-defined service object. </p>
<p>We can use the <font color="#c64000">SessionMode</font> attribute to require, allow, or prohibit bindings to use sessions between endpoints.</p>
<p>&#160;&#160;&#160; a. <font color="#c64000">Allowed</font>: (default) If a service contract specifies that it allows sessions but does not require one, clients can connect and either establish a session or not establish a session.</p>
<p>&#160;&#160;&#160; b. <font color="#c64000">Required</font>: When a service contract specifies that it requires a session, that contract is specifying that all calls must be part of the same conversation. The service contract requires a sessionful binding. An exception is thrown if the binding is not configured to support session (can’t use <font color="#c64000">BasicHttpBinding</font>). Creating a service contract that requires a session states that the group of operations that the service contract declares must all be executed within the same session and that messages must be delivered in order.</p>
<p>&#160;&#160;&#160; c: <font color="#c64000">NotAllowed</font>: The service contract never supports bindings that initiate sessions.</p>
<p>2. <font color="#c64000">Instance Management</font>: The refers to how WCF manages your service class object instantiation (and disposal) depending on a client request, that is, managing the lifetime of the service instance. The possible values for <font color="#c64000">InstanceContextMode</font> are.</p>
<p>&#160;&#160;&#160; a. <font color="#c64000">PerCall</font>: A new service object is created for each client request, that means that even if the same client is sending requests, <em>a new service object is created for each request </em>and disposed after the reply is sent. To see this, use a service like this,</p>
<pre class="code">[<span style="color:#2b91af;">ServiceBehavior</span>(InstanceContextMode=<span style="color:#2b91af;">InstanceContextMode</span>.PerCall)]
<span style="color:blue;">public class </span><span style="color:#2b91af;">Service1 </span>: <span style="color:#2b91af;">IService1 </span>{
    <span style="color:#2b91af;">Guid </span>guid = <span style="color:#2b91af;">Guid</span>.NewGuid();

    <span style="color:blue;">public string </span>GetGuid() {
        <span style="color:blue;">return </span>guid.ToString();
    }
}</pre>
<p>and a client like this,</p>
<pre class="code"><span style="color:blue;">for </span>(<span style="color:blue;">int </span>i = 0; i &lt; 5; i++) {
    <span style="color:#2b91af;">Console</span>.WriteLine(proxy.GetGuid());
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>When a client calls the <font color="#c64000">GetGuid</font> method it will get a new Guid everytime, because the <font color="#c64000">Service1</font> object is recreated after every reply.</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image42.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb42.png?w=312&#038;h=173" width="312" height="173" /></a> </p>
<p>&#160;&#160;&#160; b. <font color="#c64000">PerSession</font>: (default) A new service object is created for each new client session and maintained for the lifetime of the session (applies to bindings that supports session like <font color="#c64000">WSHttpBinsing</font>). For <font color="#c64000">BasicHttpBinding</font> which doesn’t support sessions, its the same as <font color="#c64000">PerCall</font>. To see this, connect multiple clients to the host and each client will get a new Guid, Thus some state is maintained between requests from the same client.</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image43.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb43.png?w=311&#038;h=188" width="311" height="188" /></a> </p>
<p>&#160;&#160;&#160; c. <font color="#c64000">Single</font>: A single service object handles <em>all clients and client requests </em>for the lifetime of the application. To see this. simply change the <font color="#c64000">InstanceContextMode</font> to <font color="#c64000"><font color="#c64000">InstanceContextMode</font>.Single</font>. Now every client and every client call will return the same Guid.</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image44.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb44.png?w=310&#038;h=177" width="310" height="177" /></a> </p>
<p>3. <font color="#c64000">Concurrency</font>: This refers to the number of threads executing at the same time in a service instance. </p>
<p>&#160;&#160;&#160; a. <font color="#c64000">Single</font>: (default) One thread at a time can access the service object. The service object queues additional calls in the order it receives them. When the first call finishes, the next call in the queue locks the service. The benefit to this approach is that there is no risk of two calls reading the same memory and changing the same data. To see this try the service,</p>
<pre class="code">[<span style="color:#2b91af;">ServiceBehavior</span>(InstanceContextMode=<span style="color:#2b91af;">InstanceContextMode</span>.Single, ConcurrencyMode = <span style="color:#2b91af;">ConcurrencyMode</span>.Single)]
<span style="color:blue;">public class </span><span style="color:#2b91af;">Service1 </span>: <span style="color:#2b91af;">IService1 </span>{

<span style="color:blue;">public void </span>TestConcurrency() {
    <span style="color:#2b91af;">Thread</span>.Sleep(10000);
    <span style="color:blue;">return</span>;
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>This says that there is a single service object and only one thread can access it. Running two clients against this host will result in,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image45.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb45.png?w=179&#038;h=116" width="179" height="116" /></a> </p>
<p>Note that after the first client took 10sec but the second took 20sec.</p>
<p>&#160; b. <font color="#c64000">Reentrant</font>. One thread at a time can access the service object but the thread can exit and <em>reenter</em>. This is useful if the service needs to make callbacks to the client.</p>
<p>&#160;&#160;&#160; c. <font color="#c64000">Multiple</font>. More than one thread at a time can access the service object. The WCF runtime assigns a thread to each client call and they execute simultaneously. Its up to you to make the service thread safe. To see this, simply change the ConcurrencyMode to Multiple in the example above, now running two clients will result in both taking 10sec,</p>
<p><a href="http://soumya.files.wordpress.com/2010/05/image46.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://soumya.files.wordpress.com/2010/05/image_thumb46.png?w=196&#038;h=101" width="196" height="101" /></a> </p>
<p>To see how sessions interact with instance management in more detail see <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.sessionmode.aspx">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/soumya.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/soumya.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/soumya.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/soumya.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/soumya.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/soumya.wordpress.com/485/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/soumya.wordpress.com/485/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/soumya.wordpress.com/485/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=soumya.wordpress.com&amp;blog=46568&amp;post=485&amp;subd=soumya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://soumya.wordpress.com/2010/05/26/wcf-simplified-part-8-sessions-instance-management-and-concurrency/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b9f5d428390c388aa7067e27ea856109?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">soumya</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb42.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb43.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb44.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb45.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://soumya.files.wordpress.com/2010/05/image_thumb46.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
