<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005"
	xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/">
  <channel xmlns:cfi="http://www.microsoft.com/schemas/rss/core/2005/internal" cfi:lastdownloaderror="None">
    <title cf:type="text">
		Hemanshu Bhojak - musings of a curious mind
    </title>
    <link>http://hemanshubhojak.com</link>
    <description cf:type="text">
		Hemanshu Bhojak, Personal Blog, ASP.net, C#, ASP.net MVC, SQL Server, Design Patterns, Software Architecture, Object Modelling
    </description>
    <dc:language>en-US</dc:language>
    <generator>ASP.net MVC RSS</generator>
    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				Asp.net Template based emails with image embedding
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=9
		</link>
		<pubDate>
			129078659993730000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				There are many instances where I wanted to send emails from my web application. The emails are generated from templates which can be changed later to&nbsp;accommodate&nbsp;changes and also to separate the markup from the data. There is a good article on achieving this in a Asp.net. It also embeds images inside your markup so that the recipient does not need to have a live internet connection to view the email properly.<div><br></div><div><a href="http://www.codegolem.com/post/Helper-Mailer-class-for-template-based-e-mails-with-embedded-images.aspx">Helper Mailer class for template-based e-mails with embedded images</a><br></div><div><br></div><div>Give it a try.</div>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				Wrap long lines using CSS and JavaScript
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=8
		</link>
		<pubDate>
			129077091161400000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				I had this annoying problem of long&nbsp;unwrap-able lines breaking my website layout. After experimenting many fixes I finally settled on the following fix.<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">&lt;script type="text/javascript"&gt;<br></span></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>$(function(){</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>$(".wrap").each(function(){</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>$(this).html(&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">				</span>$(this)</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>.text()</div><div><span class="Apple-tab-span" style="white-space:pre">					</span>.replace(/([^\s-]{5})/g, "$&amp;&amp;shy;")&nbsp;</div><div><span class="Apple-tab-span" style="white-space:pre">			</span>);</div><div><span class="Apple-tab-span" style="white-space:pre">		</span>});</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>});</div><div>&nbsp;&lt;/script&gt;</div><div><br></div><div>The above code uses <b>jQuery </b>and<b> Regular Expression</b> to wrap text in tags which have the class "<b>wrap</b>" by adding <b>&amp;shy;</b> after every 5 characters in a long word. For more information on <b>&amp;shy; </b>refer the references section below.</div><div><br></div><div><b>References:</b></div><div><a href="http://www.cs.tut.fi/~jkorpela/shy.html">http://www.cs.tut.fi/~jkorpela/shy.html</a><br></div><div><a href="http://www.quirksmode.org/oddsandends/wbr.html">http://www.quirksmode.org/oddsandends/wbr.html</a><br></div>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				HTML Encode Text in JavaScript
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=7
		</link>
		<pubDate>
			129038204923370000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				<div>There are many ways of HTML encoding text in JavaScript. You may use string replacement using RegEx or simply hardcode replacements. These approaches help solve the purpose but make the code bloated and difficult to maintain. There is one clean way of achieving this.</div><div><br></div><div><div>function HTMLEncode(value){</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var div = document.createElement(“DIV”);</div><div><span class="Apple-tab-span" style="white-space:pre">	</span>var textNode = document.createTextNode(value);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>div.appendChild(textNode);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">	</span>return div.innerHTML;</div><div>}</div><div><br></div><div>The above code will html encode your text in a cleaner and faster way.<br></div></div>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				Integrating google wave
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=5
		</link>
		<pubDate>
			129031120839670000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				Google wave is seemingly the next generation of online&nbsp;collaboration. If you are looking forward to integrating google wave in your applications the following resources are helpful.&nbsp;<div><br></div><div><a href="http://www.waveprotocol.org/">http://www.waveprotocol.org/</a></div><div><br></div><div>I am currently researching on ways to integrate google wave in one of my ASP.net application. I will be posting some tutorials when I have some tangible success.<br><div><br></div><div><b>P.S.: </b>It uses XMPP to send messages.</div></div>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				HTML 5 Intellisense in Visual Studio 2008
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=4
		</link>
		<pubDate>
			129031002336230000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				HTML 5 is about to come in the near future and Microsoft has provided the intellisense and markup validation support for the same in Visual Studio 2008 and VIsual Web Developer. The following link provides the way for adding HTML 5 support in VIsual Studio 2008.<div><br></div><div><a href="http://blogs.msdn.com/webdevtools/archive/2009/11/18/html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx">http://blogs.msdn.com/webdevtools/archive/2009/11/18/html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx</a><br></div><div><br></div><div>Check it out ;)</div>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				Iterators in C# - The yield return statement and deferred loading
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=3
		</link>
		<pubDate>
			129025847709600000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); font-family: 'Trebuchet MS'; line-height: 20px; "><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">Delayed loading or lazy loading or deferred loading is a very good technique to delay the loading of a set of data till the time we actually use it. It may happen sometimes that we actually don't use it and system is spared from the burden of loading that resource as it is loaded when actually used. There are many patterns which helps us in achieving deferred loading.&nbsp;LINQ&nbsp;also defers the loading or execution till the time it is actually used.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">There is a very useful feature built in C# which helps in achieving deferred loading without using any complex design pattern. This is the magical "yield" operator (Iterators in C#). The usage of the yield operator is straight forward.&nbsp;</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><br></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); "><b>MSDN</b>,</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><ul style="margin-top: 0px; margin-bottom: 0px; "><li style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="background-color: rgb(255, 255, 255); ">An iterator is a section of code that returns an ordered sequence of values of the same type.</span></p></li><li style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="background-color: rgb(255, 255, 255); ">An iterator can be used as the body of a method, an operator, or a&nbsp;</span><span class="input"><b><span style="background-color: rgb(255, 255, 255); ">get</span></b></span><span style="background-color: rgb(255, 255, 255); ">&nbsp;accessor.</span></p></li><li style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="background-color: rgb(255, 255, 255); ">The iterator code uses the&nbsp;</span><span class="input"><b><span style="background-color: rgb(255, 255, 255); ">yield return</span></b></span><span style="background-color: rgb(255, 255, 255); ">&nbsp;statement to return each element in turn.&nbsp;</span><span class="input"><b><span style="background-color: rgb(255, 255, 255); ">yield break</span></b></span><span style="background-color: rgb(255, 255, 255); ">&nbsp;ends the iteration.</span></p></li><li style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="background-color: rgb(255, 255, 255); ">Multiple iterators can be implemented on a class. Each iterator must have a unique name just like any class member, and can be invoked by client code in a&nbsp;</span><span class="input"><b><span style="background-color: rgb(255, 255, 255); ">foreach</span></b></span><span style="background-color: rgb(255, 255, 255); ">&nbsp;statement as follows:&nbsp;</span><span class="code"><font size="2"><span style="background-color: rgb(255, 255, 255); ">foreach(int x in&nbsp;SampleClass.Iterator2){}</span></font></span><span style="background-color: rgb(255, 255, 255); ">.</span></p></li><li style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="background-color: rgb(255, 255, 255); ">The return type of an iterator must be&nbsp;</span><a id="ctl00_MainContent_ctl44_ctl00_ctl00" href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable(VS.100).aspx" style="text-decoration: none; "><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">IEnumerable</span></font></a><span style="background-color: rgb(255, 255, 255); ">,&nbsp;</span><a id="ctl00_MainContent_ctl44_ctl00_ctl01" href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerator(VS.100).aspx" style="text-decoration: none; "><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">IEnumerator</span></font></a><span style="background-color: rgb(255, 255, 255); ">,&nbsp;</span><a id="ctl00_MainContent_ctl44_ctl00_ctl02" href="http://msdn.microsoft.com/en-us/library/9eekhta0(VS.100).aspx" style="text-decoration: none; "><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">IEnumerable</span></font><span class="vb"><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">(Of&nbsp;</span></font></span><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">T</span></font><span class="vb"><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">)</span></font></span></a><span style="background-color: rgb(255, 255, 255); ">, or&nbsp;</span><a id="ctl00_MainContent_ctl44_ctl00_ctl03" href="http://msdn.microsoft.com/en-us/library/78dfe2yb(VS.100).aspx" style="text-decoration: none; "><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">IEnumerator</span></font><span class="vb"><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">(Of&nbsp;</span></font></span><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">T</span></font><span class="vb"><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">)</span></font></span></a><span style="background-color: rgb(255, 255, 255); ">.</span></p></li><li style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="background-color: rgb(255, 255, 255); ">Iterators are the basis for the deferred execution behavior in&nbsp;LINQ&nbsp;queries.</span></p></li></ul></div><span style="background-color: rgb(255, 255, 255); "><br></span><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">A sample usage is illustrated below.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">public class&nbsp;SomeClass&nbsp;{</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;public&nbsp;<span style="background-color: rgb(243, 243, 243); "><a id="f:bx" href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable(VS.100).aspx" style="text-decoration: none; "><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">IEnumerable</span></font></a></span>&lt;int&gt;&nbsp;YieldSomeNumbers(){</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(int i=0; i&lt;100; i++){</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;yield return i;<br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;}</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">}</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">public class&nbsp;MainClass{</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;public static void Main(){</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span style="background-color: rgb(243, 243, 243); "><a id="g2hf" href="http://msdn.microsoft.com/en-us/library/system.collections.ienumerable(VS.100).aspx" style="text-decoration: none; "><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); ">IEnumerable</span></font></a></span>&lt;int&gt; numbers = new&nbsp;SomeClass().YieldSomeNumbers();</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;foreach(int number in numbers){</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Console.WriteLine(number);<br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">&nbsp;&nbsp; &nbsp;}<br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">}</span></div><span style="background-color: rgb(255, 255, 255); "><br></span><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">As you notice the keyword yield is used before the return statement. Also no other return statement can be used when using yield. You can use yield break to break from the iterations.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); ">Behind the scenes the compiler generates a class which implements the&nbsp;IEnumerable&nbsp;interface. On debugging we can observe that the method "YieldSomeNumbers" does not execute when we call it. It simple returns an instance of the class that the compiler generates. When we actually loop through the Enumerator the method is called once for each value. This is an efficient way of returning a set of values with the lazy load behavior.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><b><span style="background-color: rgb(255, 255, 255); ">References:</span></b></div><div style="margin-top: 0px; margin-bottom: 0px; "><b><span style="background-color: rgb(255, 255, 255); ">MSDN:</span></b><span style="background-color: rgb(255, 255, 255); ">&nbsp;</span><font class="Apple-style-span" color="#000000"><span style="background-color: rgb(255, 255, 255); "><a href="http://msdn.microsoft.com/en-us/library/dscyy5s0(VS.100).aspx" style="color: rgb(85, 26, 139); ">http://msdn.microsoft.com/en-us/library/dscyy5s0(VS.100).aspx</a></span></font></div><div><font class="Apple-style-span" color="#000000"><br></font></div></span>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				Separation of concerns in web applications
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=2
		</link>
		<pubDate>
			129025414452870000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				<span class="Apple-style-span" style="background-color: rgb(255, 255, 255); font-family: 'Trebuchet MS'; line-height: 20px; "><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Separation of concerns is one of the design principle which helps in creating components that are not interdependent and are more maintainable. The same principle can also be applied to the Html that we generate in web applications.&nbsp;As per Wikipedia (Separation of Concerns)</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span style="font-family: sans-serif; "><i><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">"The goal is to design systems so that functions can be optimized independently of other functions, so that failure of one function does not cause other functions to fail, and in general to make it easier to understand, design and manage complex interdependent systems."</span></i></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">There are three concerns in a web application</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><ol style="margin-top: 0px; margin-bottom: 0px; "><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Content - This consists of the HTML markup</span></li><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Presentation - This is the CSS (Inline as well as external)</span></li><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Behavior - This is defined by the JavaScript</span></li></ol><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">In order to have the separation of the above concerns, we should,</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div></div><blockquote class="webkit-indent-blockquote" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-width: initial; border-color: initial; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Avoid using inline CSS styling. Generate the markup with the appropriate tags, e.g. use h1 to h6 tags to specify a heading, use a fieldset tag to enclose a form, use a label tag for control labels.&nbsp;This also makes the page semantically correct. Specify all the styling in an external CSS file. This will also help in easily changing the look and feel of the application.<br><br></span><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Wrong</span></b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">&lt;div style="font-size: 18px; font-weight: bold; color: Black; margin: 5px 0;"&gt;This is a top level heading&lt;/div&gt;</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">&lt;div style="font-size: 12px; font-weight: bold; color: Black; margin: 5px 0;"&gt;This is a sub heading&lt;/div&gt;</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Right</span></b></div><div style="margin-top: 0px; margin-bottom: 0px; "><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Markup</span></b></div><div style="margin-top: 0px; margin-bottom: 0px; "><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">&lt;h1&gt;This is a top level heading&lt;/h1&gt;</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">&lt;h2&gt;This is a sub heading&lt;/h2&gt;</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">CSS</span></b></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">h1{font-size: 18px; font-weight: bold; color: Black; margin: 5px 0;}</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">h2{font-size: 12px; font-weight: bold; color: Black; margin: 5px 0;}</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div></div><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Likewise, Instead of specifying JavaScript inline in the tags, bind scripts dynamically to the HTML elements. JavaScript frameworks like jQuery are very useful in writing unobtrusive scripts.<br><br></span><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Wrong</span></b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br>&lt;input type="text" id="yourName" /&gt;<br>&lt;a onclick="alert('Welcome!' + getElementById('yourName').value);"&gt;Click Me!&lt;/a&gt;<br><br></span><b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Right</span></b><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br>&lt;input type="text" id="yourName" /&gt;<br>&lt;a id="aClickMe"&gt;Click Me!&lt;/a&gt;<br><br>&lt;script type="text/javascript"&gt;<br>&nbsp;&nbsp; &nbsp;$("#aClickMe").click(function(){<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;alert("Welcome!" + $("#yourName").val());<br>&nbsp;&nbsp; &nbsp;});<br>&lt;/script&gt;</span></blockquote>The points discussed above are some pointers in having a maintainable and loose coupled components in our web sites. The following are the general advantages in having loose coupled components in web or in that case any application.<br><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><ol style="margin-top: 0px; margin-bottom: 0px; "><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Easy to debug</span></li><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Customizable</span></li><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Reusable</span></li><li style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); ">Easy to expand</span></li></ol></div><div style="margin-top: 0px; margin-bottom: 0px; "><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="background-color: rgb(255, 255, 255); "><br></span></div></div>In my future articles I will discuss some client side design patterns including patterns for AJAX and how can a JavaScript framework like jQuery be used with Asp.net to create interactive applications. &nbsp;</span><br></div></span>
			]]>
		</description>
	</item>

    

	<item>
		<title xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="text">
			<![CDATA[
				My first post
			]]>
		</title>
		<link>
			http://hemanshubhojak.com/Home/Post?postId=1
		</link>
		<pubDate>
			129021230301400000
		</pubDate>
		<author>
			Hemanshu Bhojak
		</author>
		<description xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" cf:type="html">
			<![CDATA[
				<p>Finally I have started with my own blog, where I can share my adventures in coding and also my spiritual quest. Writing is a form of expression with which I am most comfortable.</p><p>I have been a keen coder since my school days. I have worked on technologies like visual basic, java and now .net. The journey so far has been enriching. I see this platform as an opportunity where I can share the knowledge that I have accumulated. I am sure it will also help me in sharpening my knowledge further.</p><p>I am looking forward for your response to make the journey ahead a great learning experience.</p><p><b>P.S.:</b>&nbsp;To all my friends who were regularly pinging my domain with a hope that I might have finally found sometime to setup this website. Sorry folks for the delay but I have finally setup my home in the second world. ;)</p>
			]]>
		</description>
	</item>

    
  </channel>
</rss>
