<?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/"
	>

<channel>
	<title>TechBubble</title>
	<atom:link href="http://www.kalyani.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kalyani.com</link>
	<description>Nik Kalyani&#039;s Irrationally Exuberant Musings on Technology</description>
	<lastBuildDate>Mon, 23 Jan 2012 08:16:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Druid Toolkit for DotNetNuke Released</title>
		<link>http://www.kalyani.com/2012/01/druid-toolkit-for-dotnetnuke-released/</link>
		<comments>http://www.kalyani.com/2012/01/druid-toolkit-for-dotnetnuke-released/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 08:16:02 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.kalyani.com/?p=1242</guid>
		<description><![CDATA[After many months of work, I am glad to release the first (beta) version of the HyperCrunch Druid Toolkit for DotNetNuke. It&#8217;s free, Open Source and cool (at least I think so). Hope you&#8217;ll agree. Check it out at http://druid.hypercrunch.com &#160;]]></description>
			<content:encoded><![CDATA[<p>After many months of work, I am glad to release the first (beta) version of the HyperCrunch Druid Toolkit for DotNetNuke. It&#8217;s free, Open Source and cool (at least I think so). Hope you&#8217;ll agree. Check it out at <a href="http://druid.hypercrunch.com">http://druid.hypercrunch.com</a></p>
<p><img class="aligncenter size-full wp-image-1243" title="Druid-Circle-Black-Large" src="http://www.kalyani.com/wp-content/uploads/2012/01/Druid-Circle-Black-Large.png" alt="" width="313" height="313" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2012/01/druid-toolkit-for-dotnetnuke-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIP Mr. Insanely Great</title>
		<link>http://www.kalyani.com/2011/10/rip-mr-insanely-great/</link>
		<comments>http://www.kalyani.com/2011/10/rip-mr-insanely-great/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 03:28:19 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.kalyani.com/?p=1238</guid>
		<description><![CDATA[Today was a day of profound sadness for me. The news of Steve Jobs&#8217; passing hit me hard. No single person has inspired my life more than Jobs. I can&#8217;t say anything about his incredible vision, charisma and achievements that hasn&#8217;t already been said. But I can say this&#8230;I will continue to follow his advice <a href='http://www.kalyani.com/2011/10/rip-mr-insanely-great/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Today was a day of profound sadness for me. The news of Steve Jobs&#8217; passing hit me hard. No single person has inspired my life more than Jobs. I can&#8217;t say anything about his incredible vision, charisma and achievements that hasn&#8217;t already been said. But I can say this&#8230;I will continue to follow his advice and always &#8220;stay hungry, stay foolish.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2011/10/rip-mr-insanely-great/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Recent DotNetNuke Developments</title>
		<link>http://www.kalyani.com/2011/03/sharper-dotnetnuke/</link>
		<comments>http://www.kalyani.com/2011/03/sharper-dotnetnuke/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 11:42:28 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>

		<guid isPermaLink="false">http://www.kalyani.com/?p=1203</guid>
		<description><![CDATA[A lot has been happening in the DotNetNuke ecosystem lately. Here are my thoughts on the developments.]]></description>
			<content:encoded><![CDATA[<p>Here are my thoughts on the recent DotNetNuke developments:</p>
<p><a href="http://www.kalyani.com/wp-content/uploads/2011/03/Sharper-DNN1.png"><img class="aligncenter size-full wp-image-1205" title="DotNetNuke Gets Sharper" src="http://www.kalyani.com/wp-content/uploads/2011/03/Sharper-DNN1.png" border="0" alt="DotNetNuke Gets Sharper" width="700" /></a></p>
<div style="text-align: center;"><small>Click for larger image</small></div>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2011/03/sharper-dotnetnuke/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subway Map Visualization jQuery Plugin</title>
		<link>http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/</link>
		<comments>http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 20:15:11 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.kalyani.com/?p=1144</guid>
		<description><![CDATA[I have always been fascinated by the visual clarity of the London Underground map. Given the number of cities that have adopted this mapping approach for their own subway systems, clearly this is a popular opinion. At a conference some years back, I saw a poster for the Yahoo! Developer Services. They had taken the <a href='http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I have always been fascinated by the visual clarity of the London Underground map. Given the number of cities that have adopted this mapping approach for their own subway systems, clearly this is a popular opinion. At a conference some years back, I saw a poster for the Yahoo! Developer Services. They had taken the concept of a subway map and applied it to create a <a href="http://www.flickr.com/photos/phploveme/2957594235/" target="_blank">YDN Metro Map</a>. Once again, I was in awe of the visual clarity of this map in helping one understand the various Yahoo! services and how they inter-related with each other. I thought it would be awesome if there were a pseudo-programmatic way in which to render such maps to convey real-world ecosystems. A few examples I can think of:</p>
<ul>
<li>University departments, offices, student groups</li>
<li>Government</li>
<li>Open Source projects</li>
<li>Internet startups by category</li>
</ul>
<p>More examples on this blog: <a href="http://blog.visualmotive.com/2009/ten-examples-of-the-subway-map-metaphor/" target="_blank">Ten Examples of the Subway Map Metaphor</a>.</p>
<p>Fast-forward to now. Finally, with the advent of HTML5 &lt;canvas&gt; element and jQuery, I felt it was now possible to implement this in a way that with a little bit of effort, anyone who knows HTML can easily create a subway map. I felt a jQuery plugin was the way to go as I had never created one before and also it seemed like the most well-suited for the task. My goals:</p>
<ul>
<li>Anyone should be able to create a beautiful, interactive subway map visualization for their website using HTML markup</li>
<li>The map should be as faithful as possible to the London Underground map style with smooth curves and interchange connectors and 45-degree diagonals</li>
<li>The map size, line width and colors should all be customizable</li>
<li>Stations, interchanges and linked interchanges should be distinguishable from each other</li>
<li>The markup used to create the map should be search engine friendly</li>
</ul>
<p>With these goals in mind, I started creating my jQuery plugin. A few days of concentrated effort later, I had a working <strong>subwayMap</strong> plugin and am quite pleased with the result. You can download the plugin below and documentation follows in this post. I hope you will give the plugin a try and find it useful.</p>
<h3>Demo</h3>
<p>I was the keynote speaker at a regional conference for the DotNetNuke Open Source Project and created a comprehensive subway map of the project ecosystem for my presentation using the subwayMap plugin. The map uses every feature of the plugin and is a good practical example of how to use the plugin. Click the image to view the map.</p>
<p><a href="http://dnnbook.com/Ecosystem.aspx" target="_blank"><img class="aligncenter size-full wp-image-1139" title="DotNetNuke Ecosystem Interactive Map" src="http://www.kalyani.com/wp-content/uploads/2010/10/dnnmap.png" alt="DotNetNuke Ecosystem Interactive Map" width="417" height="235" border="0" /></a></p>
<h3>Download</h3>
<p style="text-align: left;">Note: There is a file embedded within this post, please visit this post to download the file.</p>
<h3>Step-by-Step Guide</h3>
<p>Here is a guide to using the Subway Map Visualization jQuery Plugin. Before you get started, there&#8217;s one thing you&#8217;ll want to keep in mind &#8212; beautiful subway maps are never automatic; they are almost always the result of care in design and placement to ensure that the resulting map is functional, legible and beautiful. This plugin is just a tool&#8230;you will still need to plan and design your map in order to produce a good result.</p>
<p><strong>Referencing the Plugin</strong></p>
<p>The subwayMap plugin is referenced similar to other jQuery plugins by adding a script element to the HTML markup.</p>
<pre class="brush: html">&lt;script src=&quot;http://code.jquery.com/jquery-1.4.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jquery.subwayMap-0.5.0.js&quot; type=&quot;text/javascript&quot;&gt;</pre>
<p><strong>Using the Plugin</strong></p>
<p>The subwayMap plugin is called using a jQuery selector as follows:</p>
<pre class="brush: javascript">$(&quot;#sampleselector&quot;).subwayMap({ debug: true });</pre>
<p>The only supported option (at present) is &#8220;debug&#8221; which has a default value of &#8220;false&#8221;. Setting it to true will display some debug statements in the JS console.</p>
<p><strong>HTML Markup for Plugin<br />
</strong></p>
<p>Like most navigation plugins, subwayMap uses an unordered list. The basic markup consists of the following:</p>
<ul>
<li>An outer DIV element to control general placement, background etc.</li>
<li>One UL element for each &#8220;line&#8221; desired in the map.</li>
<li>For each UL element, one or more LI elements with either plain text or an A element with plain text. An LI element provides coordinates for drawing lines and/or markers on the map.</li>
</ul>
<p>Each of the DIV, UL and LI elements make use of custom attributes to convey how the map should be rendered. These are explained in the Step-by-Step section below.</p>
<p><strong>Map Rendering</strong></p>
<p>The subwayMap plugin renders the map on a grid with the origin at top left (i.e. X coordinates extend from left to right and Y coordinates extend from top to bottom). The size of this grid depends on a value you define called &#8220;cellSize.&#8221; For example, if you define a cellSize of 50 and specify a grid of 20 columns by 10 rows, then you will have a map that is 1000 pixels wide and 500 pixels high. For each UL element, a &lt;canvas&gt; element that is the size of the grid is created and positioned at (0,0). Subsequent &lt;canvas&gt; elements are stacked on top of the prior &lt;canvas&gt; elements. Station and interchange markers for each line are also created in separate, stacked &lt;canvas&gt; elements, however their z-Index is always higher than that of the &lt;canvas&gt; elements containing the lines. Finally, all labels are added as <span> elements with the highest z-Index of all the elements in the map.</span></p>
<p><strong>Creating a SubwayMap Step-by-Step</strong></p>
<p>Now that the basics are out of the way, let&#8217;s step through the process of creating a subway map from scratch. I am using jQuery UI as my mapping subject, creating a line for Widgets, Interactions and Effects. Here&#8217;s a map and the markup used to create it:</p>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap011.png"><img class="aligncenter size-full wp-image-1163" title="Subway Map Step-by-Step 01" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap011.png" alt="" width="490" height="432" border="0" /></a></p>
<pre class="brush: html">&lt;div data-columns=&quot;12&quot; data-rows=&quot;10&quot; data-cellSize=&quot;40&quot; data-legendId=&quot;legend&quot; data-textClass=&quot;text&quot; data-gridNumbers=&quot;true&quot; data-grid=&quot;true&quot; data-lineWidth=&quot;8&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;li data-coords=&quot;2,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Autocomplete&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id=&quot;legend&quot;&gt;&lt;/div&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
$(&quot;.subway-map&quot;).subwayMap({ debug: true });
&lt;/script&gt;</pre>
<p>This code looks way more complicated than it actually is. Most of the verbosity comes from the many &#8220;data-*&#8221; attributes that the plugin uses for all customizations. Here are the attributes being used in the code above:</p>
<p><strong>(DIV) data-columns:</strong> The number of columns the map will display (12 in this example)</p>
<p><strong>(DIV) </strong><strong>data-rows:</strong> The number of rows the map will display (10 in this example)</p>
<p><strong>(DIV) </strong><strong>data-cellSize:</strong> The width and height of each cell in pixels (40 in this example, resulting in a grid that is 480px wide by 400px tall)</p>
<p><strong>(DIV) </strong><strong>data-legendId:</strong> The ID of an HTML element into which the map legend will be appended (&#8220;legend&#8221; in this example)</p>
<p><strong>(DIV) </strong><strong>data-textClass:</strong> The CSS class to use for text labels in the map (&#8220;text&#8221; in this example)</p>
<p><strong>(DIV) </strong><strong>data-grid:</strong> True or false, to show or hide a grid that is useful during map construction. The default is false (&#8220;true&#8221; in this example)</p>
<p><strong>(DIV) </strong><strong>data-gridNumbers:</strong> True or false, to show or hide numbers on the grid. Only applies if data-grid=&#8221;true&#8221; (&#8220;true&#8221; in this example)</p>
<p><strong>(DIV) </strong><strong>data-lineWidth:</strong> The width in pixels for each line. The default is 10 pixels. (8 in this example)</p>
<p><strong>(UL) data-color:</strong> The color of the line in standard CSS RGB notation (#ff4db2 in this example)</p>
<p><strong>(UL) data-label:</strong> The label for the line that will be displayed in the legend (&#8220;jQuery Widgets&#8221; in this example)</p>
<p><strong>(LI) data-coords:</strong> The X,Y coordinate pair where the line should be drawn to from its last location (or the starting location if it&#8217;s the first LI element)</p>
<p>As you can see from the illustration, the result of the sample markup was a grid with numbers, a line drawn from (2,2) to (4,2) and finally markers at both coordinate locations. The markers are automatically added whenever you have any content in your LI element and later, we&#8217;ll see how you can override the marker type.</p>
<p>Now, let&#8217;s extend this line a bit, by adding a few more LI elements. For brevity, I will omit the overall definition and just show the LI elements here:</p>
<pre class="brush: html">&lt;li data-coords=&quot;2,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Autocomplete&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;</pre>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap02.png"><img class="aligncenter size-full wp-image-1167" style="border: 0pt none;" title="subwayMap02" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap02.png" alt="SubwayMap Step-by-Step 02" width="492" height="436" /></a></p>
<p>The resulting image is as you would expect. However, it is not very pretty to look at. To make it nicer, we need to add some curves. The plugin provides four directional curves that can be used anytime the difference between both X and Y start and end coordinates is exactly 1. Think of it like plumbing pipes&#8230;in order to make a right angle, you introduce an elbow joint. This is somewhat similar. In order to make a smooth, 90-degree curve, you use one cell for the curve as illustrated below:</p>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap031.png"><img class="aligncenter size-full wp-image-1169" style="border: 0pt none;" title="subwayMap03" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap031.png" alt="" width="334" height="291" /></a></p>
<p>To make a curve, you add a &#8220;data-dir&#8221; attribute to the LI element that defines the coordinates for the end of the curve. The value of this attribute is directional &#8211; E, W, N or S &#8211; indicating the direction in which the line will <strong>first</strong> go before making a right-angle to the coordinate referenced by that LI element. Let&#8217;s continue with our example to see this in action:</p>
<p>&nbsp;</p>
<pre class="brush: html">&lt;li data-coords=&quot;2,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Autocomplete&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;6,4&quot; data-dir=&quot;S&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;</pre>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap04.png"><img class="aligncenter size-full wp-image-1170" style="border: 0pt none;" title="subwayMap04" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap04.png" alt="Subway Map Step-by-Step 04" width="494" height="433" /></a></p>
<p>To get the curves, some of the coordinates had to be changed in order to achieve the X and Y coordinate difference of exactly &#8220;1&#8243;. Note the additional &#8220;data-dir&#8221; attribute that determines the direction of the curve. The final result is a line that is similar, but not the same as the original and definitely more pleasing to the eye.</p>
<p>Let&#8217;s make the line loop around a bit and then go south on a diagonal run.</p>
<pre class="brush: html">&lt;li data-coords=&quot;2,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Autocomplete&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;6,4&quot; data-dir=&quot;S&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;
</pre>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap05.png"><img class="aligncenter size-full wp-image-1172" style="border: 0pt none;" title="subwayMap05" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap05.png" alt="Subway Map Step-by-Step 05" width="490" height="436" /></a></p>
<p>The diagonal line was drawn correctly, but notice the small curves at the beginning and end. These are automatically added when the difference between the X and Y coordinates of the start and end are equal and greater than 1 (i.e. a diagonal). Unfortunately, this isn&#8217;t pretty to look at. To correct this we have to reduce our diagonal by one row and one column and introduce a curve like this:</p>
<pre class="brush: html">
&lt;li data-coords=&quot;2,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Autocomplete&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;6,4&quot; data-dir=&quot;S&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;
</pre>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap06.png"><img class="aligncenter size-full wp-image-1173" style="border: 0pt none;" title="subwayMap06" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap06.png" alt="" width="491" height="432" /></a></p>
<p>And there we have it, nice curves again and no sharp turns. Let&#8217;s wrap-up this line (no pun intended) and move on to multiple lines, markers and labels. I have now updated the markup to extend the first line a little and then added a second line shown in green labeled &#8220;jQuery Interactions.&#8221;</p>
<pre class="brush: html">
&lt;div data-columns=&quot;12&quot; data-rows=&quot;10&quot; data-cellsize=&quot;40&quot; data-legendid=&quot;legend&quot; data-textclass=&quot;text&quot; data-gridnumbers=&quot;true&quot; data-grid=&quot;true&quot; data-linewidth=&quot;8&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;2,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Autocomplete&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;5,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;6,4&quot; data-dir=&quot;S&quot;&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;8,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap071.png"><img class="aligncenter size-full wp-image-1177" style="border: 0pt none;" title="subwayMap07" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap071.png" alt="" width="491" height="467" /></a></p>
<p>In this map, there is a portion where both lines overlap. This is a fairly common situation and if you do nothing, the line that is drawn last will be at the top. This is less than ideal for communicating information, let alone train routes. To solve this problem, the plugin allows you to &#8220;shift&#8221; a line in X and/or Y directions by a multiple of the chosen line thickness.</p>
<p><strong>(UL) data-shiftCoords:</strong> The number of line-widths by which line should be shifted in any direction specified as an X,Y pair with negative values indicating shift closer to the origin (0,0). You could manually do the shift by specifying precise coordinates, however this can make the line more complicated to define.  (Example: data-shiftCoords=&#8221;-1,0&#8243; means move the line to the left by 1 line width.)</p>
<pre class="brush: html">
&lt;ul data-color=&quot;#00ff00&quot; data-label=&quot;jQuery Interactions&quot; data-shiftCoords=&quot;0,-1&quot;&gt;</pre>
<p>With the above change, our map now looks like this:</p>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap08.png"><img class="aligncenter size-full wp-image-1179" style="border: 0pt none;" title="subwayMap08" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap08.png" alt="" width="490" height="462" /></a></p>
<p>Much nicer and simpler since we did not have to make any changes to the individual  line coordinates. Next, let&#8217;s add some markers. The plugin supports three types of markers: stations, interchanges and extended interchanges. These are always black-and-white (or white-and-black) and can be placed anywhere on a line. The attributes for markers are:</p>
<p><strong>(UL) data-reverseMarkers:</strong> If the markers should be rendered white on black instead of the default, black on white. The default is &#8220;false&#8221;.</p>
<p><strong>(LI) data-marker:</strong> Can be either &#8220;station&#8221; or &#8220;interchange.&#8221; Will produce a different marker for each. Value may be prefixed by &#8220;@&#8221; to indicate that the LI element is solely for indicating the position of the marker and should not be used as a coordinate defining the path of the line. (Examples: data-marker=&#8221;station&#8221; or data-marker=&#8221;@interchange&#8221;)</p>
<p>IMPORTANT:  Markers are displayed only if the LI element contains content. Interchange markers ignore any coordinate shift values specified for the line.</p>
<p><strong>(LI) data-markerInfo:</strong> For &#8220;interchange&#8221; or &#8220;@interchange&#8221; markers, this attribute is used to define scenarios in which the interchange marker has to &#8220;stretch&#8221; across multiple lines or connect lines that are not next to each other. The attribute value consists of a letter &#8220;v&#8221; for vertical or &#8220;h&#8221; for horizontal, followed by a number representing the number of line widths to stretch (example: v3 or h4). The marker is rendered at the coordinate position specified and extends either vertically upwards or horizontally to the right.</p>
<p>While it is easy and convenient to use the LI elements that define line coordinates to also define markers, sometimes this does not yield the best result. The marker may appear off by a few pixels. In these cases, it is best to add an LI element for the marker, use the &#8220;@&#8221; prefix and provide precise coordinates with decimal places (Example: 1.5,2.25).</p>
<p>Here is the markup and map again, updated with station and interchange markers.</p>
<pre class="brush: html">&lt;div data-columns=&quot;12&quot; data-rows=&quot;10&quot; data-cellSize=&quot;40&quot; data-legendId=&quot;legend&quot; data-textClass=&quot;text&quot; data-gridNumbers=&quot;true&quot; data-grid=&quot;false&quot; data-lineWidth=&quot;8&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;li data-coords=&quot;2,2&quot; data-marker=&quot;interchange&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;X&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,7&quot; data-marker=&quot;@station&quot;&gt;X&lt;/li&gt; &lt;!-- marker-only node --&gt;
&lt;li data-coords=&quot;6,4&quot; data-dir=&quot;S&quot; data-marker=&quot;interchange&quot; data-markerInfo=&quot;h5&quot;&gt;X&lt;/li&gt;
&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7.15,8&quot; data-marker=&quot;@station&quot;&gt;X&lt;/li&gt;  &lt;!-- marker-only node, moved to the right by 0.15 --&gt;
&lt;li data-coords=&quot;8,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;9,1&quot; data-dir=&quot;N&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;10,2&quot; data-dir=&quot;E&quot; data-marker=&quot;interchange&quot;&gt;X&lt;/li&gt;
&lt;li data-coords=&quot;10,5&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;9,6&quot; data-dir=&quot;S&quot; data-marker=&quot;station&quot;&gt;X&lt;/li&gt;
&lt;li data-coords=&quot;6,9&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,8&quot; data-dir=&quot;W&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,7&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,6&quot; data-dir=&quot;N&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;2,6&quot;&gt;Tabs&lt;/li&gt;
&lt;/ul&gt;

&lt;ul data-color=&quot;#00ff00&quot; data-label=&quot;jQuery Interactions&quot; data-shiftCoords=&quot;0,-1&quot;&gt;
&lt;li data-coords=&quot;2,6&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;2,5.9&quot; data-marker=&quot;@interchange&quot;&gt; &lt;/li&gt; &lt;!-- marker-only node, moved up by 0.10 --&gt;
&lt;li data-coords=&quot;5,6&quot; data-marker=&quot;@station&quot;&gt;X&lt;/li&gt;
&lt;li data-coords=&quot;6,6&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7,3&quot; data-marker=&quot;@station&quot;&gt;X&lt;/li&gt;
&lt;li data-coords=&quot;7,5&quot; data-dir=&quot;E&quot; data-marker=&quot;station&quot;&gt;X&lt;/li&gt;
&lt;li data-coords=&quot;7,1&quot; data-marker=&quot;interchange&quot;&gt;X&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;div id=&quot;legend&quot;&gt;&lt;/div&gt;</pre>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap09.png"><img class="aligncenter size-full wp-image-1188" title="subwayMap09" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap09.png" alt="" width="491" height="464" border="0" /></a></p>
<p>I used the label &#8220;X&#8221; for all the station or interchange names. The only thing left to do is change the labels and also position them so they don&#8217;t appear on top of the line. The attribute used for positioning the labels is:</p>
<p><strong>(LI) data-labelPos:</strong> Specifies where the label should be displayed using a directional abbreviation. Supported values are N, E, S, W, NE, NW, SE, SW. (Default is &#8220;S&#8221;). Sometimes your label may be too long and text-wrap may be needed. To do this, you can use &#8220;\n&#8221; within the text of the label (&lt;br /&gt;will not work since the only markup supported for a label is the &lt;a&gt; element).</p>
<p>Labels are added as absolutely positioned &lt;span&gt; elements and when the map is added inside a DOM element with a complex, CSS layout, they may not always appear in the right place.</p>
<p>Let&#8217;s set the label text and position, turn off the grid and look at the final markup and rendered map.</p>
<pre class="brush: html">&lt;div data-columns=&quot;12&quot; data-rows=&quot;10&quot; data-cellSize=&quot;40&quot; data-legendId=&quot;legend&quot; data-textClass=&quot;text&quot; data-gridNumbers=&quot;true&quot; data-grid=&quot;false&quot; data-lineWidth=&quot;8&quot;&gt;
&lt;ul data-color=&quot;#ff4db2&quot; data-label=&quot;jQuery Widgets&quot;&gt;
&lt;li data-coords=&quot;2,2&quot; data-marker=&quot;interchange&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/accordion/&quot;&gt;Accordion&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,2&quot;&gt;&lt;a href=&quot;http://jqueryui.com/demos/autocomplete/&quot;&gt;Auto\ncomplete&lt;/a&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,7&quot; data-marker=&quot;@station&quot; data-labelPos=&quot;W&quot;&gt;Slider&lt;/li&gt; &lt;!-- marker-only node --&gt;
&lt;li data-coords=&quot;6,4&quot; data-dir=&quot;S&quot; data-marker=&quot;interchange&quot; data-markerInfo=&quot;h5&quot;&gt;Date\npicker&lt;/li&gt;
&lt;li data-coords=&quot;7,4&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7.15,8&quot; data-marker=&quot;@station&quot; data-labelPos=&quot;E&quot;&gt;Dialog&lt;/li&gt;  &lt;!-- marker-only node, moved to the right by 0.15 --&gt;
&lt;li data-coords=&quot;8,3&quot; data-dir=&quot;E&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;8,2&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;9,1&quot; data-dir=&quot;N&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;10,2&quot; data-dir=&quot;E&quot; data-marker=&quot;interchange&quot; data-labelPos=&quot;E&quot;&gt;Button&lt;/li&gt;
&lt;li data-coords=&quot;10,5&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;9,6&quot; data-dir=&quot;S&quot; data-marker=&quot;station&quot;&gt;Progress\nbar&lt;/li&gt;
&lt;li data-coords=&quot;6,9&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,8&quot; data-dir=&quot;W&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;5,7&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;4,6&quot; data-dir=&quot;N&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;2,6&quot;&gt;Tabs&lt;/li&gt;
&lt;/ul&gt;

&lt;ul data-color=&quot;#00ff00&quot; data-label=&quot;jQuery Interactions&quot; data-shiftCoords=&quot;0,-1&quot;&gt;
&lt;li data-coords=&quot;2,6&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;2,5.9&quot; data-marker=&quot;@interchange&quot;&gt; &lt;/li&gt; &lt;!-- marker-only node, moved up by 0.10 --&gt;
&lt;li data-coords=&quot;5,6&quot; data-marker=&quot;@station&quot; data-labelPos=&quot;N&quot;&gt;Selectable&lt;/li&gt;
&lt;li data-coords=&quot;6,6&quot;&gt;&lt;/li&gt;
&lt;li data-coords=&quot;7,3&quot; data-marker=&quot;@station&quot; data-labelPos=&quot;W&quot;&gt;Resizeable&lt;/li&gt;
&lt;li data-coords=&quot;7,5&quot; data-dir=&quot;E&quot; data-marker=&quot;station&quot; data-labelPos=&quot;E&quot;&gt;Droppable&lt;/li&gt;
&lt;li data-coords=&quot;7,1&quot; data-marker=&quot;interchange&quot; data-labelPos=&quot;W&quot;&gt;Draggable&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;div id=&quot;legend&quot;&gt;&lt;/div&gt;</pre>
<p><strong>There you have it&#8230;a map that faithfully reproduces the style of the London Underground map, but hopefully, is not too difficult for you to create once you get familiar with the custom attributes required in the HTML markup to render the map. Enjoy!</strong></p>
<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap10.png"><img class="aligncenter size-full wp-image-1191" style="border: 0pt none;" title="subwayMap10" src="http://www.kalyani.com/wp-content/uploads/2010/10/subwayMap10.png" alt="" width="458" height="459" /></a></p>
<p>&nbsp;</p>
<h3>Reference</h3>
<p><strong>(DIV) data-columns:</strong> The number of columns the map will display (default=10)</p>
<p><strong>(DIV) </strong><strong>data-rows:</strong> The number of rows the map will display (default=10)</p>
<p><strong>(DIV) </strong><strong>data-cellSize:</strong> The width and height of each cell in pixels (default=100)</p>
<p><strong>(DIV) </strong><strong>data-legendId:</strong> The ID of an HTML element into which the map legend will be appended</p>
<p><strong>(DIV) </strong><strong>data-textClass:</strong> The CSS class to use for text labels in the map</p>
<p><strong>(DIV) </strong><strong>data-grid:</strong> True or false, to show or hide a grid that is useful during map construction (default=false)</p>
<p><strong>(DIV) </strong><strong>data-gridNumbers:</strong> True or false, to show or hide numbers on the grid. Only applies if data-grid=&#8221;true&#8221; (default=true)</p>
<p><strong>(DIV) </strong><strong>data-lineWidth:</strong> The width in pixels for each line (default=10)</p>
<p><strong>(UL) data-color:</strong> The color of the line in standard CSS RGB notation</p>
<p><strong>(UL) data-label:</strong> The label for the line that will be displayed in the legend</p>
<p><strong>(UL) data-shiftCoords:</strong> The number of line-widths by which line should be shifted in any direction specified as an X,Y pair with negative values indicating shift closer to the origin (default=0,0)</p>
<p><strong>(UL) data-reverseMarkers:</strong> If the markers should be rendered white on black instead of the default, black on white (default=false)</p>
<p><strong>(LI) data-coords:</strong> The X,Y coordinate pair where the line should be drawn to from its last location (or the starting location if it&#8217;s the first LI element)</p>
<p><strong>(LI) data-marker:</strong> Can be either &#8220;station&#8221; or &#8220;interchange.&#8221; Will produce a different marker for each. Value may be prefixed by &#8220;@&#8221; to indicate that the LI element is solely for indicating the position of the marker and should not be used as a coordinate defining the path of the line</p>
<p><strong>(LI) data-markerInfo:</strong> For &#8220;interchange&#8221; or &#8220;@interchange&#8221; markers, this attribute is used to define scenarios in which the interchange marker has to &#8220;stretch&#8221; across multiple lines or connect lines that are not next to each other. The attribute value consists of a letter &#8220;v&#8221; for vertical or &#8220;h&#8221; for horizontal, followed by a number representing the number of line widths to stretch (example: v3 or h4). The marker is rendered at the coordinate position specified and extends either vertically upwards or horizontally to the right.</p>
<p><strong>(LI) data-labelPos:</strong> Specifies where the label should be displayed using a directional abbreviation. Supported values are N, E, S, W, NE, NW, SE, SW (default=S)</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/10/subway-map-visualization-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Day of DotNetNuke Chicago Keynote</title>
		<link>http://www.kalyani.com/2010/10/day-of-dotnetnuke-chicago-keynote/</link>
		<comments>http://www.kalyani.com/2010/10/day-of-dotnetnuke-chicago-keynote/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 15:47:54 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[DotNetNuke]]></category>

		<guid isPermaLink="false">http://www.kalyani.com/?p=1133</guid>
		<description><![CDATA[My keynote address at the Day of DotNetNuke conference in Chicago today was community-focused. Download the PDF version of the presentation here: Day of DNN Chicago Keynote.pdf (10.2 MB) Download the PPTX version of the presentation here: Day of DNN Chicago Keynote.pptx (162.8 MB &#8212; includes embedded videos) Here&#8217;s the DotNetNuke Ecosystem Interactive Map I <a href='http://www.kalyani.com/2010/10/day-of-dotnetnuke-chicago-keynote/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kalyani.com/wp-content/uploads/2010/10/iStock_000010520303Small.jpg"><img class="size-thumbnail wp-image-1137 alignright" title="All About U" src="http://www.kalyani.com/wp-content/uploads/2010/10/iStock_000010520303Small-150x150.jpg" border="0" alt="All About Us" width="150" height="150" /></a>My keynote address at the Day of DotNetNuke conference in Chicago today was community-focused. </p>
<p>Download the PDF version of the presentation here: <a href="http://kalyani-blog.s3.amazonaws.com/Day of DNN Chicago Keynote.pdf">Day of DNN Chicago Keynote.pdf</a> (10.2 MB)<br />
Download the PPTX version of the presentation here: <a href="http://kalyani-blog.s3.amazonaws.com/Day of DNN Chicago Keynote.pptx">Day of DNN Chicago Keynote.pptx</a> (162.8 MB &#8212; includes embedded videos)</p>
<p>Here&#8217;s the <a href="http://dnnbook.com">DotNetNuke Ecosystem Interactive Map</a> I presented during the session. (You can view source and download the jQuery plugin to create your own map&#8230;blog post with technical details to follow.)</p>
<p><a href="http://dnnbook.com" target="_new"><img class="aligncenter size-medium wp-image-1139" title="DotNetNuke Ecosystem Interactive Map" src="http://www.kalyani.com/wp-content/uploads/2010/10/dnnmap-300x169.png" alt="DotNetNuke Ecosystem Interactive Map" width="300" height="169" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/10/day-of-dotnetnuke-chicago-keynote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backwards Compatible HTML5 on ASP.NET</title>
		<link>http://www.kalyani.com/2010/08/backwards-compatible-html5-on-asp-net/</link>
		<comments>http://www.kalyani.com/2010/08/backwards-compatible-html5-on-asp-net/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 13:55:59 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://www.kalyani.com/?p=1122</guid>
		<description><![CDATA[My session today at the St. Louis Day of .NET conference was on the topic "Backwards Compatible HTML5 on ASP.NET." Here is the slide deck and source code from the session.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kalyani.com/wp-content/uploads/2010/08/st-louis-day-of-dot-net-logo.png"><img class="alignleft size-full wp-image-1130" title="st-louis-day-of-dot-net-logo" src="http://www.kalyani.com/wp-content/uploads/2010/08/st-louis-day-of-dot-net-logo.png" alt="St. Louis Day of .NET" width="160" height="168" /></a>My session today at the St. Louis Day of .NET conference was on the topic &#8220;Backwards Compatible HTML5 on ASP.NET.&#8221; Here is the slide deck and source code from the session.</p>
Note: There is a file embedded within this post, please visit this post to download the file.
Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/08/backwards-compatible-html5-on-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Seven Sins of DotNetNuke Module Developers</title>
		<link>http://www.kalyani.com/2010/01/the-seven-sins-of-dotnetnuke-module-developers/</link>
		<comments>http://www.kalyani.com/2010/01/the-seven-sins-of-dotnetnuke-module-developers/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 00:29:14 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=1093</guid>
		<description><![CDATA[In an average week, I communicate on the phone, by email, through webinars and in person, with some 100 DotNetNuke business customers, prospects and partners. A majority of them use DotNetNuke in some mission-critical way. I enjoy these conversations and get many insights on their real-world experience with DotNetNuke. I have noticed that there are <a href='http://www.kalyani.com/2010/01/the-seven-sins-of-dotnetnuke-module-developers/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kalyani.com/wp-content/uploads/2010/01/Fall-of-Man.jpg"><img class="alignright size-medium wp-image-1104" style="border: 0pt none; margin: 10px;" title="Fall-of-Man" src="http://kalyani.com/wp-content/uploads/2010/01/Fall-of-Man-225x300.jpg" alt="Adam and Eve in Fall of Man" width="225" height="300" /></a>In an average week, I communicate on the phone, by email, through webinars and in person, with some 100 DotNetNuke business customers, prospects and partners. A majority of them use DotNetNuke in some mission-critical way. I enjoy these conversations and get many insights on their real-world experience with DotNetNuke. I have noticed that there are some common things that end-users find problematic with Core and/or third-party extensions they use with DotNetNuke. It occurred to me that it would be good to share this information since not all extension builders may be aware of the issues that sometimes arise due to the way a particular extension is built. In order to make the information easy to digest (and because lists are cool), I am going to present these observations using a &#8220;Seven Sins&#8230;&#8221; theme.</p>
<p>Let&#8217;s start with the <strong>Seven Sins of DotNetNuke Module Developers</strong>:</p>
<div class="SubHead">Inline Style Attributes</div>
<p><strong>Sin:</strong> Using inline style attrbutes in your HTML markup is probably the single, biggest problem you can create for your end-users. Since such attributes cannot be overridden with CSS, users are forced to edit the markup, use Javascript or the <a href="http://kalyani.com/2009/12/dotnetnuke-widgets-guide-part-2-of-4/">StyleScrubber Widget</a> to neutralize the impact of a module&#8217;s inline style attribute on other elements of a page.</p>
<p><strong>Sin Level:</strong> Annoyance</p>
<p><strong>Absolution:</strong> Avoid using in-line style attributes in your module&#8217;s static and dynamic HTML markup. Instead, create style definitions in your module.css file that target your module&#8217;s markup. While you can use &#8220;class&#8221; and &#8220;ID&#8221; attributes throughout your markup, it is best to keep your markup clean and use the various <a href="http://www.w3.org/TR/CSS2/selector.html" target="_blank">CSS selectors</a> to achieve the desired styles. An approach that works well is to create a &#8220;wrapper&#8221; DIV for your module&#8217;s markup with a &#8220;class&#8221; attribute value that closely matches your module name (for example: &lt;div class=&#8221;Acme-Survey-Module&#8221;&gt;). You can then have styles in your module.css like this:</p>
<pre class="brush: css">
.Acme-Survey-Module div  {
       padding-bottom: 10px;
}
</pre>
<p>And since we are on the topic of style-related sins, please do not specify any font-related style attributes in your style definitions. Let the page skin&#8217;s font definitions rule. If you absolutely must change the text size, at least use &#8220;em&#8221; units instead of pixel or point units so that the text size is relative instead of absolute.</p>
<div class="SubHead">Unfiltered User Input</div>
<p><strong>Sin:</strong> Assuming that user input is safe and processing or persisting it without filtering, potentially compromising security and making a user&#8217;s DotNetNuke installation, server and network vulnerable to attacks.</p>
<p><strong>Sin Level: </strong>Deadly</p>
<p><strong>Absolution:</strong> DotNetNuke has built-in features, including an input filter that is incredibly easy to use for filtering strings. Use it to <a href="http://www.willstrohl.com/Blog/tabid/66/EntryId/377/DotNetNuke-Module-Security-Filtering-User-Entered-Text.aspx" target="_blank">filter user input</a> and make your modules more secure.</p>
<div class="SubHead">Hard-coded Text</div>
<p><strong>Sin:</strong> Hard-coding user interface text in HTML markup or in code, preventing localization and customization of text.</p>
<p><strong>Sin Level: </strong>Aggravating</p>
<p><strong>Absolution:</strong> Do not assume that everyone speaks the same language as you, and even if so, that they like the error prompt &#8220;Yo&#8230;you messed-up, fix it already.&#8221; Ensure that all user interface text follows well-established best-practices for <a href="http://www.dotnetnuke.com/LinkClick.aspx?fileticket=dbwenZbhC1Q%3d&amp;tabid=879&amp;mid=2701" target="_blank">DotNetNuke Localization</a>.</p>
<div class="SubHead">UpdatePanel</div>
<p><strong>Sin:</strong> Using an UpdatePanel instead of writing the code necessary to properly implement AJAX functionality. If your module is doing something trivial, by all means, use UpdatePanel. But for a module that is potentially going to be used in high-traffic scenarios, UpdatePanel is a no-go. UpdatePanel was intended to be a quick and easy way to implement AJAX functionality &#8212; it would not be a stretch to call the UpdatePanel solution LAJAX (lazy AJAX). Unfortunately, it has become the standard way in which most ASP.NET developers implement AJAX functionality. For every AJAX request, UpdatePanel causes the <a href="http://encosia.com/2007/10/24/are-you-making-these-3-common-aspnet-ajax-mistakes/" target="_blank">entire page life-cycle to be repeated on the server</a>. As a result, a module that has lots of AJAX functionality implemented using UpdatePanel is going to cause significant performance issues and unnecessary resource utilization when used in a high-traffic environment.</p>
<p><strong>Sin Level:</strong> Aggravating</p>
<p><strong>Absolution:</strong> As I mentioned, if your module is doing something trivial, UpdatePanel is a reasonable solution. For anything else, it&#8217;s better to use ASP.NET AJAX or jQuery on the client-side making requests to an HttpHandler or Webservice to obtain the needed information for the UI in JSON or XML format. Here&#8217;s an <a href="http://www.bitethebullet.co.uk/DNN_Module_and_jQuery.aspx" target="_blank">example</a> of how this can be done in a DotNetNuke module.</p>
<div class="SubHead">Non-Semantic Markup</div>
<p><strong>Sin:</strong> Using HTML markup for layout, instead of CSS, provides no semantic cues to user agents (browsers) as to the intended purpose of content. Most online discussions about semantic HTML markup degrade very quickly into near-religious arguments about TABLE versus DIV element. Such discussions are akin to throwing the baby out with the bath-water. Semantic markup is not solely about using tables for layout. The bigger issue is that HTML was never intended to convey presentation fidelity to the degree seen on modern web pages. Its primary purpose was to give semantic meaning to text so that user agents could then render the text in the most appropriate way for that agent. When markup is created with an emphasis on layout, it strays from this purpose. For instance, if your module markup uses an H1 element for content that is not the primary headline on the page, your markup is non-semantic and is misguiding user agents such as screen readers.</p>
<p><strong>Sin Level</strong>: Annoyance</p>
<p><strong>Absolution:</strong> I don&#8217;t view the issue of <a href="http://blue-anvil.com/archives/guide-to-semantic-mark-up/" target="_blank">semantic HTML markup</a> as a black-and-white one. I think it&#8217;s OK to take occasional liberties with markup to save time, after all time is money. But every developer should make a good-faith attempt to produce more semantic markup. Take a look at your module code and see if there are opportunities to replace HTML markup used for layout with CSS (without giving yourself a case of DIVitis). Low hanging fruit includes H*, B and I tags and input forms. For forms, try ditching the all-too-common TABLE found in most DotNetNuke module forms and replacing it with the <a href="http://htmlhelp.com/reference/html40/forms/fieldset.html" target="_blank">FIELDSET</a> element along with some CSS. For a good example of this, refer to the <a href="http://dnnblueprint.codeplex.com/" target="_blank">DotNetNuke Blueprint</a> project.</p>
<div class="SubHead">Custom Settings</div>
<p><strong>Sin:</strong> Using a custom, non-standard user interface for managing module settings.</p>
<p><strong>Sin Level: </strong>Aggravating</p>
<p><strong>Absolution:</strong> DotNetNuke provides a simple and automatic mechanism for module developers to implement a <a href="http://knol.google.com/k/introduction-to-dotnetnuke-module-development#Settings_Control" target="_blank">user interface for managing module settings</a>. Developers should not circumvent it as it adversely impacts usability of the platform. It takes time for users to get familiar and comfortable with standard behaviors. Each time a user encounters a module that ignores the standard and does something custom with the user interface, it causes the user to get frustrated with the platform (i.e. DotNetNuke). This is because, contextually, he/she has no knowledge of the separation between the platform and the module. As far as the user is concerned, DotNetNuke appears to have an inconsistent user interface (which it well might, but that&#8217;s another discussion). Why force the user to click on a custom link or button to configure your module&#8217;s settings? Let the framework do its thing and inject your settings control at the end of the standard module settings so that the user can customize module settings in the same way, no matter which module they are using.</p>
<div class="SubHead">No script tokens</div>
<p><strong>Sin:</strong> Using &#8220;dbo&#8221; in module SQL scripts instead of {objectQualifier} and {databaseOwner}. If your module SQL scripts use &#8220;dbo&#8221; for the object owner your module cannot be easily installed in environments where the SQL connection uses a different database owner. If your module SQL scripts do not use the {objectQualifier} prefix for database objects, your module cannot be used in shared database scenarios.</p>
<p><strong>Sin Level: </strong>Aggravating</p>
<p><strong>Absolution: </strong>Follow <a href="http://www.apptheory.com/dotnetnuke/dotnetnuke_blogs/articletype/articleview/articleid/180/best_practices_development_team_collaboration_and_dotnetnuke_part_2_the_sqldataprovider_files.aspx" target="_blank">DotNetNuke best practices for SQL scripts</a> by using {objectQualifier} and {databaseOwner} prefixes in your module&#8217;s SQL scripts to ensure that your module can be installed in any environment where DotNetNuke is able to function.</p>
<p>There you have it&#8230;the seven sins of DotNetNuke module developers. What other cringe-worthy things have you seen in DotNetNuke modules?</p>
<p>Next up, the seven sins of DotNetNuke Skin Designers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/01/the-seven-sins-of-dotnetnuke-module-developers/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Visual: DotNetNuke Enterprise Deployment Scenario</title>
		<link>http://www.kalyani.com/2010/01/visual-dotnetnuke-enterprise-deployment-scenario/</link>
		<comments>http://www.kalyani.com/2010/01/visual-dotnetnuke-enterprise-deployment-scenario/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 00:13:59 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=1083</guid>
		<description><![CDATA[Here&#8217;s an illustration depicting a common scenario for DotNetNuke Deployment in the Enterprise. Click the image for a higher-res version. If you find the image helpful, feel free to use it as needed without any restrictions or attribution requirements.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an illustration depicting a common scenario for DotNetNuke Deployment in the Enterprise. Click the image for a higher-res version. If you find the image helpful, feel free to use it as needed without any restrictions or attribution requirements.</p>
<p><a href="http://kalyani.com/wp-content/uploads/2010/01/DNN-Deployment-Scenario.png"><img class="size-full wp-image-1085  aligncenter" style="border: 0pt none; margin: 10px;" title="DNN-Deployment-Scenario" src="http://kalyani.com/wp-content/uploads/2010/01/DNN-Deployment-Scenario-500.png" alt="DNN-Deployment-Scenario" width="500" height="679" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/01/visual-dotnetnuke-enterprise-deployment-scenario/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Redirecting to Canonical URL in IIS7</title>
		<link>http://www.kalyani.com/2010/01/redirecting-to-canonical-url-in-iis7/</link>
		<comments>http://www.kalyani.com/2010/01/redirecting-to-canonical-url-in-iis7/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 04:42:50 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=1072</guid>
		<description><![CDATA[If you are using IIS7, it&#8217;s very easy to ensure that all requests always go to your preferred canonical URL. It&#8217;s a two step process: Step 1: Install the UrlRewrite module for IIS: http://www.iis.net/expand/URLRewrite Step 2: Add the following rule to your applications web.config file: &#38;lt;configuration&#38;gt; &#38;lt;system.webServer&#38;gt; &#38;lt;rewrite&#38;gt; &#38;lt;rules&#38;gt; &#38;lt;clear /&#38;gt; &#38;lt;rule name=&#38;quot;Redirect from www&#38;quot; <a href='http://www.kalyani.com/2010/01/redirecting-to-canonical-url-in-iis7/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">If you are using IIS7, it&#8217;s very easy to ensure that all requests always go to your preferred canonical URL. It&#8217;s a two step process:</p>
<p style="text-align: left;"><strong>Step 1:</strong> Install the UrlRewrite module for IIS: <a href="http://www.iis.net/expand/URLRewrite" target="_blank">http://www.iis.net/expand/URLRewrite</a><a href="http://www.iis.net/expand/URLRewrite"><img class="size-full wp-image-1074 aligncenter" style="border: 0pt none; margin-top: 10px; margin-bottom: 10px;" title="IIS Rewrite" src="http://kalyani.com/wp-content/uploads/2010/01/iisrewrite.png" alt="IIS Rewrite" width="335" height="251" /></a></p>
<p><strong>Step 2:</strong> Add the following rule to your applications web.config file:</p>
<pre class="brush: xml">&amp;lt;configuration&amp;gt;
 &amp;lt;system.webServer&amp;gt;
    &amp;lt;rewrite&amp;gt;
      &amp;lt;rules&amp;gt;
        &amp;lt;clear /&amp;gt;
        &amp;lt;rule name=&amp;quot;Redirect from www&amp;quot; stopProcessing=&amp;quot;true&amp;quot;&amp;gt;
           &amp;lt;match url=&amp;quot;.*&amp;quot; /&amp;gt;
           &amp;lt;conditions&amp;gt;
              &amp;lt;add input=&amp;quot;{HTTP_HOST}&amp;quot; pattern=&amp;quot;^www.yoursite.com$&amp;quot; /&amp;gt;
           &amp;lt;/conditions&amp;gt;
           &amp;lt;action type=&amp;quot;Redirect&amp;quot; url=&amp;quot;http://yoursite.com/{R:0}&amp;quot; redirectType=&amp;quot;Permanent&amp;quot; /&amp;gt;
        &amp;lt;/rule&amp;gt;
     &amp;lt;/rules&amp;gt;
   &amp;lt;/rewrite&amp;gt;
 &amp;lt;/system.webServer&amp;gt;
&amp;lt;/configuration&amp;gt;</pre>
<p><strong>IMPORTANT: </strong>When using the above code, take care to merge it with your existing web.config without duplicating any existing elements.</p>
<p>I like my URL&#8217;s to be in the format http://mysite.com. If you prefer http://www.mysite.com, simply remove &#8220;www.&#8221; from the &lt;add&gt; element and add it to the &lt;action&gt; element&#8217;s &#8220;url&#8221; attribute.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/01/redirecting-to-canonical-url-in-iis7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Widgets Guide (Part 4 of 4)</title>
		<link>http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-4-of-4/</link>
		<comments>http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-4-of-4/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 09:07:00 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Skins]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=1039</guid>
		<description><![CDATA[This is the last post in my four-part series on DotNetNuke Widgets. Here&#8217;s a review of the other posts in this series: Part 1 &#8211; Overview of DotNetNuke Widgets Part 2 &#8211; DotNetNuke Widgets reference Part 3 &#8211; Insights into how you can develop your own Widgets for DotNetNuke In this post, I&#8217;ll walk you <a href='http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-4-of-4/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>This is the last post in my four-part series on DotNetNuke Widgets. Here&#8217;s a review of the other posts in this series:</p>
<ul>
<li><a href="/2009/12/dotnetnuke-widgets-guide-part-1-of-4/">Part 1</a> &#8211; Overview of DotNetNuke Widgets</li>
<li><a href="/2009/12/dotnetnuke-widgets-guide-part-2-of-4/">Part 2</a> &#8211; DotNetNuke Widgets reference</li>
<li><a href="/2010/01/dotnetnuke-widgets-guide-part-3-of-4/">Part 3</a> &#8211; Insights into how you can develop your own Widgets for DotNetNuke</li>
</ul>
<p>In this post, I&#8217;ll walk you through the code of the TechBubble CatalogWidget. This Widget displays a carousel of Product thumbnail images. You can click on any thumbnail to see a larger version of the image. You can then move your cursor over any portion of the larger image to see a zoomed in image of the area below the cursor. I created this Widget to convey multiple concepts:</p>
<ul>
<li>Passing data through Widget markup parameters</li>
<li>Using a Widget to integrate multiple jQuery plugins seamlessly</li>
<li>Using behavior injection to dynamically add event-handling to UI elements</li>
<li>Dynamically injecting stylesheets and scripts into the page</li>
<li>Using jQuery UI themes</li>
</ul>
<p>Let&#8217;s start by looking at a mockup of the Widget (created using my favorite mockup tool &#8211; <a href="http://balsamiq.com" target="_blank">Balsamiq</a>).</p>
<p style="text-align: center;"><a href="http://kalyani.com/wp-content/uploads/2010/01/mockup2.png"><img class="aligncenter size-full wp-image-1057" style="border: 0pt none;" title="CatalogWidget Mockup" src="http://kalyani.com/wp-content/uploads/2010/01/mockup2.png" alt="CatalogWidget Mockup" width="569" height="491" /></a></p>
<p style="text-align: center;">
<p>In order to implement this UI, I decided to use two jQuery plugins:</p>
<ul>
<li><a href="http://www.ferretarmy.com/files/jQuery/ImageCarousel/ImageCarousel.html" target="_blank">ImageCarousel</a></li>
<li><a href="http://www.mind-projects.it/projects/jqzoom/" target="_blank">jqZoom</a></li>
</ul>
<p>(These are arbitrary choices&#8230;I am sure that there are other plugins that would work equally well or better.)</p>
<p>I have setup two live demos of the Widget so you can get a feel for the Widget&#8217;s UI:</p>
<ul>
<li><a href="http://demo.kalyani.com/Widgets/CatalogWidgetDemo1.aspx" target="_blank">Demo with default data</a> (Ducati bikes)</li>
<li><a href="http://demo.kalyani.com/Widgets/CatalogWidgetDemo2.aspx" target="_blank">Demo with custom data</a> (Maxim&#8217;s 10 Hottest Women)</li>
</ul>
<p>You can download the Widget at the link below and follow along with the technical discussion that follows. I have also included a short slideshow that shows a screen grab of the installation process and the two demos.</p>
Note: There is a file embedded within this post, please visit this post to download the file.
<p>[smooth=id:1;]</p>
<p>Here are the properties that supported by the CatalogWidget:</p>
<p><em><strong>photoUrl</strong> (required) &#8211; </em>A URL to the location where the images for the Widget will be found. The Widget uses the following convention for image names: {label}.{extension} for hi-res image displayed in zoom area, {label}_thumb.{extension} for thumbnail image and {label}_small.{extension} for small image displayed when thumbnail is clicked. {label} and {extension} are explained in the description for other parameters.</p>
<p><em><strong>theme</strong> (optional, default=ui-lightness)</em> &#8211; Name of the jQuery UI theme that should be loaded from Google&#8217;s CDN for jQuery themes. The list of supported themes can be found on the <a href="http://jqueryui.com/themeroller/" target="_blank">jQuery Themeroller</a> page. The theme name should match the defined name on the Themeroller page, with spaces in the name replaced with the hyphen character.</p>
<p><em><strong>carouselWidth</strong> (optional, default=500)</em> &#8211; Width of the carousel used to display the thumbnails in pixels. The number of thumbnails displayed will depend on the width of each thumbnail and the value of this parameter.</p>
<p><em><strong>zoomWidth</strong> (optional, default=250)</em> &#8211; Width of the zoomed image area in pixels.</p>
<p><em><strong>zoomHeight</strong> (optional, default=250)</em> &#8211; Height of the zoomed image area in pixels.</p>
<p><em><strong>moreInfoHandler</strong> (optional) </em>- Name of a function that will be called with a parameter of {label} when the information icon that appears to the right of the product name link is clicked. If this parameter is not specified, the information icon will not be displayed.</p>
<p><em><strong>extension</strong> (optional, default=jpg)</em> &#8211; The file extension for all images.</p>
<p><em><strong>Product Data</strong></em> &#8211; In addition to these parameters, the Widget supports an unlimited number of additional product data parameters. Any parameter specified other than the above, is treated as product data. The value of the &#8220;name&#8221; attribute of the parameter will be used for the product {label} and the value of the &#8220;value&#8221; attribute will be used for the product&#8217;s descriptive name. Example: &lt;param name=&#8221;ABC1000&#8243; value=&#8221;ABC 1000 Super Duper Product&#8221; /&gt;.</p>
<p>OK, now we have that out of the way, let&#8217;s get started with building the Widget. The Widget is going to exist in the namespace &#8220;<strong>TechBubble.Widgets</strong>,&#8221; so by convention, the Widget file will be named &#8220;<strong>TechBubble.Widgets.CatalogWidget.js</strong>&#8221; and it will be located in <strong>~/Resources/Widgets/User/TechBubble</strong>. All resources for this Widget will be in <strong>~/Resources/Widgets/User/TechBubble/CatalogWidgetResources</strong>. Here&#8217;s the code for namespace registration and the Widget constructor:</p>
<pre class="brush: javascript">Type.registerNamespace(&amp;quot;TechBubble.Widgets&amp;quot;);
TechBubble.Widgets.CatalogWidget = function(widget)
{
    TechBubble.Widgets.CatalogWidget.initializeBase(this, [widget]);
    this.catalogResourcesUrl =
                    $dnn.baseResourcesUrl +
                    &amp;quot;Widgets/User/TechBubble/CatalogWidgetResources/&amp;quot;;
    this.photoUrl = &amp;quot;&amp;quot;;
    this.theme = &amp;quot;ui-lightness&amp;quot;;
    this.carouselWidth = &amp;quot;800&amp;quot;;
    this.zoomWidth = &amp;quot;250&amp;quot;;
    this.zoomHeight = &amp;quot;250&amp;quot;;
    this.moreInfoHandler = &amp;quot;&amp;quot;;
    this.extension = &amp;quot;jpg&amp;quot;;
    this.products = [];
    this.hasProducts = false;

    if (!TechBubble.Widgets.CatalogWidget.Initialized)
    {
        $.getScript(this.catalogResourcesUrl +
                    &amp;quot;scripts/jQuery-ui-1.7.2.custom.min.js&amp;quot;);

        $.getScript(this.catalogResourcesUrl +
                    &amp;quot;scripts/jquery.metadata.js&amp;quot;);

        TechBubble.Widgets.CatalogWidget.Initialized = true;
    }
}
TechBubble.Widgets.CatalogWidget.inheritsFrom(
            DotNetNuke.UI.WebControls.Widgets.BaseWidget);
TechBubble.Widgets.CatalogWidget.registerClass(
            &amp;quot;TechBubble.Widgets.CatalogWidget&amp;quot;,
            DotNetNuke.UI.WebControls.Widgets.BaseWidget);</pre>
<p>In the constructor, we define default values for the various properties (parameters) that the Widget supports. In addition the variable <strong>TechBubble.Widgets.CatalogWidget.Initialized</strong> is used as a flag to prevent the jQuery UI and jQuery metadata plugin from being loaded. A nice optimization for this code would be to check for the actual existence of the plugin, instead of using a flag. In addition to the constructor, the calls to <strong>inheritsFrom()</strong> and <strong>registerClass()</strong> are standard calls for every Widget for setting inheritance and registering the class.</p>
<pre class="brush: javascript">TechBubble.Widgets.CatalogWidget.prototype =
{
    render:
        function()
        {
            // Parse widget parameters
            this._getParams();

            // Load some sample data to display if none
            // has been specified
            if (!this.hasProducts)
                this._getSampleData();

            // Create a DIV element and swap out the Widget&#039;s
            // defining &amp;lt;object&amp;gt; element with it by calling
            // the base render() method (can&#039;t use jQuery
            // shortcut to create element)
            var div =document.createElement(&amp;quot;div&amp;quot;);
            div.setAttribute(&amp;quot;style&amp;quot;,&amp;quot;width:&amp;quot; + this.carouselWidth + &amp;quot;px&amp;quot;);
            TechBubble.Widgets.CatalogWidget.callBaseMethod(this, &amp;quot;render&amp;quot;, [div]);

            this._renderCarousel();

            this._renderZoomer();
        },

        _getParams:
        function()
        {
		// Enumerate and retrieve parameters
		// . . . code omitted
        },

        _renderCarousel:
        function()
        {
		// Render the Carousel plugin
		// . . . code omitted
        },

        _renderZoomer:
        function()
        {
		// Render the Zoomer plugin
		// . . . code omitted
        },

        _injectStyleSheet:
        function(name, isTheme)
        {
		// Inject a stylesheet into the page
		// . . . code omitted
        },

        _getThumbnailList:
        function(list, photoUrl)
        {
            return(productList);
        },

         _getSampleData:
         function()
         {
		// Use and display Widget with sample data
		// . . . code omitted
         }
}</pre>
<p>Next, let&#8217;s review the code for the Widget&#8217;s prototype where the required method <strong>render()</strong> is declared along with various private methods (prefixed with underscore). In the <strong>render()</strong> method, we start by getting the parameters. Then, if no products are defined, we use some sample product information. Next, we swap out the &lt;object&gt; element defining the Widget with a &lt;div&gt; element. This &lt;div&gt; element will become the parent container for the rest of the Widget which is rendered in the <strong>_renderCarousel()</strong> and the <strong>_renderZoomer()</strong> methods. Next in the code are a number of helper methods. I won&#8217;t go into a line-by-line explanation, but highlight a few things I think are noteworthy:</p>
<p><strong>Script Injection:</strong> I use the jQuery method <strong>$.getScript(</strong>scriptUrl, anonymous function<strong>)</strong> in several places. This is a useful method when you want to inject a script into the DOM and want to ensure that any dependent code is not executed until the asynchronous loading of the script is completed. By putting all the dependent code in an anonymous function defined in the second parameter of this method I could achieve this goal.</p>
<p><strong>Behavior Injection:</strong> In <strong>_renderZoomer()</strong>, I iterate through each thumbnail in the carousel and use the shortcut for the jQuery <strong>bind() </strong>method <strong>$(this).click()</strong> to inject a click handler for each of the thumbnail images. This is cleaner and more efficient than adding an <strong>onClick</strong> attribute when defining the HTML markup for each thumbnail.</p>
<pre class="brush: javascript">DotNetNuke.UI.WebControls.Widgets.renderWidgetType(&amp;quot;TechBubble.Widgets.CatalogWidget&amp;quot;);</pre>
<p>We wrap-up the Widget code by telling the Widget framework to render all Widgets of the type <strong>TechBubble.Widgets.CatalogWidget</strong>.</p>
<p>This also wraps-up my series on DotNetNuke Widgets. I hope you found the content and examples useful and are inspired to build your own DotNetNuke Widgets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-4-of-4/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Widgets Guide (Part 3 of 4)</title>
		<link>http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-3-of-4/</link>
		<comments>http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-3-of-4/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:52:00 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Skins]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=1021</guid>
		<description><![CDATA[Continuing my series on DotNetNuke Widgets, here is Part 3 where I provide insights into how you can develop your own Widgets for DotNetNuke. If you haven&#8217;t already done so, read Part 1 (overview of DotNetNuke Widgets) and Part 2 (DotNetNuke Widgets reference) to better understand the concepts explored in this post. Let&#8217;s get started. <a href='http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-3-of-4/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kalyani.com/wp-content/uploads/2009/12/Widgets.png"><img class="alignright size-full wp-image-1017" style="border: 0pt none; margin: 5px;" title="Widgets" src="http://kalyani.com/wp-content/uploads/2009/12/Widgets.png" alt="Widgets" width="200" height="199" /></a></p>
<p>Continuing my series on DotNetNuke Widgets, here is Part 3 where I provide insights into how you can develop your own Widgets for DotNetNuke. If you haven&#8217;t already done so, read <a href="http://kalyani.com/2009/12/dotnetnuke-widgets-guide-part-1-of-4/">Part 1</a> (overview of DotNetNuke Widgets) and <a href="http://kalyani.com/2009/12/dotnetnuke-widgets-guide-part-2-of-4/">Part 2</a> (DotNetNuke Widgets reference) to better understand the concepts explored in this post. Let&#8217;s get started.</p>
<div class="SubHead">Location and Naming Conventions</div>
<p>Widgets are located in two places: <strong>~/Resources/Widgets/DNN</strong> for Core Widgets and <strong>~/Resources/Widgets/User/&lt;CompanyName&gt;</strong> for user Widgets. The Widget file names are <strong>&lt;WidgetName&gt;.js</strong> for Core Widgets and <strong>&lt;CompanyName&gt;.Widgets.&lt;WidgetName&gt;.js</strong> for user Widgets.</p>
<div class="SubHead">Widget Anatomy</div>
<p>Let&#8217;s walk through the three basic sections of code that constitute a Widget:</p>
<p><strong>Namespace, Inheritance and Constructor</strong></p>
<p>Using the ASP.NET AJAX library, we register the namespace for our widget and define its inheritance from the BaseWidget class. Finally, we define the constructor.</p>
<pre class="brush: javascript">
Type.registerNamespace(&amp;quot;YourCompany.Widgets&amp;quot;);
YourCompany.Widgets.SampleWidget.inheritsFrom(DotNetNuke.UI.WebControls.Widgets.BaseWidget);
YourCompany.Widgets.SampleWidget = function(widget)
{
    YourCompany.Widgets.SampleWidget.initializeBase(this, [widget]);
}
</pre>
<p><strong>Render Method<br />
</strong></p>
<p>Every Widget must implement the render() method. Typically, this method will follow a pattern consisting of two steps: (1) enumerate the parameters specified in the Widget declaration (i.e. &lt;param&gt; elements) and assign them to local variables, (2) do some processing based on the parameters and call the render() method. When you call the render() method in Step 2, you pass in a DOM element that you create. The framework will replace the &lt;object&gt; element with which the Widget was defined with your DOM element and assign it the original ID that the &lt;object&gt; element was given. What your code does during Step #2 in order to populate the contents of the DOM element you create or manipulate other elements of the page is entirely up to you. Your Widget has access to any DOM element and can make calls to any other custom scripts, ASP.NET AJAX library functions, jQuery plugins etc.</p>
<pre class="brush: javascript">
YourCompany.Widgets.SampleWidget.prototype =
{
   render:
   function()
   {
      var params = this._widget.childNodes;
      if (params != null)
      {
          // Do something
      }

      var div = document.createElement(&amp;quot;div&amp;quot;);
      // Do some work here to add content to the div
      YourCompany.Widgets.SampleWidget.callBaseMethod(this, &amp;quot;render&amp;quot;, [div]);
   }
}
</pre>
<p><strong>Registration and Rendering</strong></p>
<p>The last thing you have to do in your Widget is to register its class and tell the Widget framework that it can render all instances of your Widget present on the page.</p>
<pre class="brush: javascript">
YourCompany.Widgets.SampleWidget.registerClass(&amp;quot;YourCompany.Widgets.SampleWidget&amp;quot;, DotNetNuke.UI.WebControls.Widgets.BaseWidget);
DotNetNuke.UI.WebControls.Widgets.renderWidgetType(&amp;quot;YourCompany.Widgets.SampleWidget&amp;quot;);
</pre>
<p>The above is all you need in order to create the basic scaffolding for a Widget. Add your custom code, save the file following the expected name and location conventions and you can start using your Widget right away (you&#8217;ll have to do some more work to package the Widget if you want it to be installable using the DotNetNuke Extension Wizard).</p>
<p>If you would like to see the code for a functional user Widget, you can download and install the <a href="../2009/12/module-print-widget-for-dotnetnuke/">Module Print Widget</a>. The module displays a dropdown that allows a page viewer to select from a list of modules on the page and print any single module thus eliminating the need to display a print icon on every module.</p>
<p>Stay tuned for the last part in this series where I take you step-by-step through the process of building a Product Catalog Widget that makes use of third-party jQuery plugins, injects stylesheets dynamically and renders a nice UI using the jQuery UI extensions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2010/01/dotnetnuke-widgets-guide-part-3-of-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Module Print Widget for DotNetNuke</title>
		<link>http://www.kalyani.com/2009/12/module-print-widget-for-dotnetnuke/</link>
		<comments>http://www.kalyani.com/2009/12/module-print-widget-for-dotnetnuke/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 01:50:09 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=1003</guid>
		<description><![CDATA[If you are like me and want your websites to have a clean, unblemished look, then most likely you have either turned off the Print functionality in your DotNetNuke module settings or just use containers that don&#8217;t display the icon. While this does make the site look cleaner, it also takes away the functionality. I <a href='http://www.kalyani.com/2009/12/module-print-widget-for-dotnetnuke/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>If you are like me and want your websites to have a clean, unblemished look, then most likely you have either turned off the Print functionality in your DotNetNuke module settings or just use containers that don&#8217;t display the icon. While this does make the site look cleaner, it also takes away the functionality. I gave this some thought and concluded that a Widget would be a great way to provide the functionality for printing the content of modules on a page. I envisioned a selector that the user would click on that would allow them to print the content for a single module. A skin designer could embed the Widget directly into the skin, or a site administrator could selectively add it to pages using an HTML module.</p>
<p><a href="http://kalyani.com/wp-content/uploads/2009/12/ModulePrintWidget.png"><img class="aligncenter size-full wp-image-1007" title="Module Print Widget" src="http://kalyani.com/wp-content/uploads/2009/12/ModulePrintWidget.png" alt="Module Print Widget" width="529" height="390" /></a></p>
<p>A couple hours of hacking later I present to you the ModulePrintWidget for DotNetNuke. It&#8217;s simple and easy to use. When added to a page, it creates a drop-down list of each module on the page. A user can select a module from the list to see a preview, then click a Print icon to print the contents of that module. Here&#8217;s a short 45-second YouTube video that demonstrates the Widget in action: <strong><a href="http://www.youtube.com/watch?v=hCMTbqcstIM&amp;fmt=22" target="_blank">TechBubble ModulePrintWidget</a></strong></p>
<p>You can download the Widget package at the link below (install as Superuser from the Extensions page):</p>
Note: There is a file embedded within this post, please visit this post to download the file.
<p>You can also see a <a title="ModulePrintWidget Demo" href="http://demo.kalyani.com/widgets/moduleprintwidget.aspx" target="_blank">live demo of the ModulePrintWidget</a>.</p>
<p>To use the Widget, add the following HTML so that it appears once on a page. You can add the markup anywhere that HTML is supported (module, skin, skin object, container):</p>
<pre class="brush: html">&amp;lt;object id=&amp;quot;MyWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; codebase=&amp;quot;TechBubble.Widgets.ModulePrintWidget&amp;quot;&amp;gt;&amp;lt;/object&amp;gt;</pre>
<p>If you want to customize the appearance and language, use the optional parameters:</p>
<pre class="brush: html">&amp;lt;object id=&amp;quot;MyWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; codebase=&amp;quot;TechBubble.Widgets.ModulePrintWidget&amp;quot;&amp;gt;
 &amp;lt;param name=&amp;quot;selectorCssClass&amp;quot; value=&amp;quot;Class-to-style-dropdown&amp;quot; /&amp;gt;
 &amp;lt;param name=&amp;quot;selectText&amp;quot; value=&amp;quot;Default-text-for-dropdown&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/12/module-print-widget-for-dotnetnuke/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Widgets Guide (Part 2 of 4)</title>
		<link>http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-2-of-4/</link>
		<comments>http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-2-of-4/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 00:33:17 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Skins]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=974</guid>
		<description><![CDATA[This is Part 2 of my four-part series on DotNetNuke Widgets. In Part 1 of the series, I covered some fundamental concepts related to DotNetNuke Widgets. In this post, I will introduce you to a few of the Widgets that are included with the DotNetNuke distribution. Before getting started I&#8217;d like to make one observation&#8230;these <a href='http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-2-of-4/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kalyani.com/wp-content/uploads/2009/12/Widgets.png"><img class="alignright size-full wp-image-1017" style="border: 0pt none; margin: 5px;" title="Widgets" src="http://kalyani.com/wp-content/uploads/2009/12/Widgets.png" alt="Widgets" width="200" height="199" /></a>This is Part 2 of my four-part series on DotNetNuke Widgets. In <a href="http://kalyani.com/2009/12/dotnetnuke-widgets-guide-part-1-of-4/">Part 1 of the series</a>, I covered some fundamental concepts related to DotNetNuke Widgets. In this post, I will introduce you to a few of the Widgets that are included with the DotNetNuke distribution. Before getting started I&#8217;d like to make one observation&#8230;these widgets were created prior to the inclusion of jQuery within the DotNetNuke Core. While the Widgets are production-ready, they could use some refactoring to take advantage of jQuery&#8217;s efficient engine for selecting and manipulating DOM elements.</p>
<p>All Widgets follow the same format for embedding in any extension (module, skin, skin object, container)</p>
<pre class="brush: html">&amp;lt;object codebase=&amp;quot;{WidgetType}&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;{WidgetId}&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;{WidgetParameterName}&amp;quot; value=&amp;quot;{WidgetParameterValue}&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
<p>{WidgetType} (required) = fully qualified Type name of the Widget<br />
{WidgetId} (required) = arbitrary ID for the Widget&#8217;s DOM element (must be unique on the page)</p>
<p>A Widget can have zero or more child elements, each with a &#8220;name&#8221; and &#8220;value&#8221; attribute with corresponding {WidgetParameterName} and {WidgetParameterValue} values. Widget parameter names are case-insensitive. Widget parameter values are always case-sensitive.</p>
<div class="SubHead">StyleScrubberWidget</div>
<p>The purpose of this Widget is to &#8220;scrub&#8221; the appearance of a DotNetNuke page by removing undesirable attributes from specific elements on the page. For example, you may have a module that has a hard-coded &#8220;style&#8221; or &#8220;width&#8221; attribute that is disrupting the appearance of a page. You don&#8217;t really want to change the source code for the module (if it&#8217;s available) and you really want to use the module. This is where StyleScrubber Widget comes to the rescue. It enumerates a series of rules you provide and removes the undesirable attributes allowing elements to be fully styled with CSS. This Widget may appear any number of times on a page.</p>
<h3>Parameters</h3>
<p><strong><em>classNames</em></strong> (required) &#8211; A list of class names separated by semi-colons. The Widget will only act on elements with a matching &#8220;class&#8221; attribute. At least one value must be specified. Example: <em>head; normal; topic</em></p>
<p><strong><em>tag</em></strong> (optional) &#8211; A HTML element tag name which acts as a filter in selecting elements. The default value is <em>*</em> which implies all elements. Example: <em>div</em></p>
<p><strong><em>removeAttribute</em></strong> (optional) &#8211; The name of the attribute which should be stripped from all elements that match the <em>classNames</em> and <em>tag</em> conditions. The removeAttribute parameter may be repeated multiple times to specify more than one attribute that should be removed. Example: <em>style</em> (strips the &#8220;style&#8221; attribute)</p>
<p><strong><em>recursive</em></strong> (optional) &#8211; Value of <em>true</em> or <em>false</em> to indicate if the scrubbing cascades indiscriminately through all child elements of a matched element. Default is <em>false.</em></p>
<h3>Example</h3>
<p>Remove all &#8220;width&#8221; and &#8220;style&#8221; attributes from TABLE elements that have a class value of &#8220;Normal&#8221; or &#8220;NormalBold&#8221;</p>
<pre class="brush: html">&amp;lt;object codebase=&amp;quot;StyleScrubberWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;ScrubTable&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;classNames&amp;quot; value=&amp;quot;Normal;NormalBold&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;tag&amp;quot; value=&amp;quot;table&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;removeAttribute&amp;quot; value=&amp;quot;width&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;removeAttribute&amp;quot; value=&amp;quot;style&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
<div class="SubHead">RelocationWidget</div>
<p>The purpose of this Widget is to move or &#8220;relocate&#8221; content so that they visual location of the content differs from the physical location of the content in the page. The primary use-case is SEO. Using the RelocationWidget it is possible to have content as close to the top of the page as possible while moving the navigation lower down on the page. Since search bots do not run scripts, this arrangement is optimal for them. Users with script-enabled browsers will see the navigation in its intended location. This Widget may appear any number of times on a page.</p>
<h3>Parameters</h3>
<p><strong><em>sourceId</em></strong> (required) &#8211; ID of the DOM element that contains the HTML content that will be relocated. It is recommended that you apply a CSS style of &#8220;display:none&#8221; to this element so it is not initially visible in the user&#8217;s browser.</p>
<p><strong><em>targetId</em></strong> (required) &#8211; ID of the DOM element where the HTML content from the <em>sourceId </em>element will be moved. It is recommended that you apply a CSS style for &#8220;width&#8221; and &#8220;height&#8221; matching the dimensions that the relocated content will occupy. Doing so prevents other elements on the page from visually moving around when the Widget performs its action.<em> </em></p>
<h3>Example</h3>
<p>Move all content from element &#8220;NavTemp&#8221; to &#8220;Nav&#8221;</p>
<pre class="brush: html">&amp;lt;object codebase=&amp;quot;RelocationWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;MoveIt&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;sourceId&amp;quot; value=&amp;quot;NavTemp&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;targetId&amp;quot; value=&amp;quot;Nav&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
<div class="SubHead">RotatorWidget</div>
<p>Changes content within an element at a pre-defined interval. The content can be sourced from a location on the page, an RSS feed or sequentially numbered images. This widget is ideal for scenarios in which the content to be rotated is not known ahead of time and no interactivity is desired from the end-user. This Widget may appear any number of times on a page.</p>
<h3>Parameters</h3>
<p><strong><em>elementId</em></strong> (required) &#8211; ID of the DOM element where the rotating content will be rendered.</p>
<p><strong><em>height</em></strong> (required) &#8211; Height of the rotated content in pixels.</p>
<p><strong><em>width</em></strong> (required) &#8211; Width of the rotated content in pixels</p>
<p><strong><em>interval</em></strong> (optional) &#8211; Time interval in milliseconds for content rotation. Default is 2500 milliseconds.</p>
<p><strong><em>direction</em></strong> (optional) &#8211; Direction in which new content slides. Values are <em>UP</em>, <em>DOWN</em>, <em>RIGHT</em>, <em>LEFT </em>(default), <em>BLEND</em></p>
<p><strong><em>transition</em></strong> (optional, experimental) &#8211; Transition effect for new content. Values are <em>SLIDE</em>, <em>SNAP</em> (default)</p>
<p>The RotatorWidget can rotate content from three sources. Content from all the sources is aggregated, then displayed so you can combine multiple sources in the same RotatorWidget instance if desired.</p>
<p><span style="text-decoration: underline;"><strong>RSS Feed Source</strong><br />
</span></p>
<p><strong><em>feedUrl </em></strong>(required for RSS feeds)<em> </em>- URL of the RSS 2.0 feed from which content will be sourced</p>
<p><strong><em>feedAttribute</em></strong><em> </em>(required for RSS feeds) -<strong> </strong>Name of the element that contains the content to be rotated. Yahoo Pipes is used to retrieve the feed.</p>
<p><span style="text-decoration: underline;"><strong>Sequential Image Source</strong><br />
</span></p>
<p><strong><em>imageUrl</em></strong><em> </em>(required for images) &#8211; The base URL where the images to be rotated are located. Must end in slash (&#8220;/&#8221;).</p>
<p><strong><em>imageTemplate</em></strong> (required for images) &#8211; The file name template for each image. The token {INDEX} may be used to indicate where the sequence number will be injected. The sequence begins at 1. Example: <em>portrait{INDEX}.jpg </em>for images names portrait1.jpg, portrait2.jpg, portrait3.jpg etc.</p>
<p><strong><em>imageCount</em> </strong>(required for images) &#8211; The number of images available for rotation.</p>
<p><strong><em>imageScale</em></strong> (optional) &#8211; Indicates if images should be scaled by width or by height. Values are <em>WIDTH</em> and <em>HEIGHT </em>or blank (default) for no scaling.</p>
<p><span style="text-decoration: underline;"><strong>Page Content Source</strong></span></p>
<p><strong><em>contentElementId</em></strong> (required for content) &#8211; ID of the DOM element that contains the content to be rotated. The Widget expects the DOM element to have zero or more child elements. The content of each child element is treated as a separate rotation item. Example: A &lt;UL&gt; element with multiple &lt;LI&gt; elements where each &lt;LI&gt; element contains one item of content.</p>
<p><strong>Example</strong></p>
<p>Rotate 10 images stored in a folder at an interval of 5 seconds.</p>
<pre class="brush: html">&amp;lt;object codebase=&amp;quot;RotatorWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;Animate&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;elementId&amp;quot; value=&amp;quot;PageHeader&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;height&amp;quot; value=&amp;quot;100&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;width&amp;quot; value=&amp;quot;400&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;interval&amp;quot; value=&amp;quot;5000&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;imageUrl&amp;quot; value=&amp;quot;/Portals/0/HeaderImages/&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;imageTemplate&amp;quot; value=&amp;quot;header{INDEX}.png&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;imageCount&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
<div class="SubHead">StyleSheetWidget</div>
<p>The purpose of this Widget is to provide a user interface that enables users to switch stylesheets in order to customize their browsing experience. This Widget may appear any number of times on a page.</p>
<h3>Parameters</h3>
<p><strong><em>template</em></strong> (required) &#8211; The StyleSheetWidget renders an interface element for each stylesheet that the user can select from. The <em>template</em> parameter is used to specify the HTML markup that will be rendered for each stylesheet in the set. The HTML markup must be encoded and can use the tokens {TEXT} (replaced with the name of each stylesheet as specified in other parameters), {ID} (replaced with a unique identifier for each interface element that is rendered) and {CLASS} (replaced with &#8220;class&#8221; attribute and value). Example: <em>&lt;div title=&#8221;{TEXT}&#8221; {ID} {CLASS}&gt;&lt;/div&gt;</em></p>
<p><strong><em>default</em></strong> (required) &#8211; The value of the stylesheet that should be selected by default.</p>
<p><strong><em>baseUrl</em></strong> (required) &#8211; The URL where the stylesheets are located.</p>
<p><strong><em>cssClass</em></strong> (required) &#8211; The CSS class value to be used on interface elements corresponding to a stylesheet that is not selected.</p>
<p><strong><em>selectedCssClass</em></strong> (required) &#8211; The CSS class value to be used on the interface element corresponding to the selected stylesheet.</p>
<p>In addition to the above, one parameter (name and value) is required for each stylesheet. The &#8220;name&#8221; attribute should contain the stylesheet filename and the &#8220;value&#8221; attribute should contain the human-friendly label associated with the stylesheet.</p>
<h3>Example</h3>
<p>Allow the user to select from five different color palettes.</p>
<pre class="brush: html">&amp;lt;object codebase=&amp;quot;StyleSheetWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;ColorSelector&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;template&amp;quot; value=&amp;quot;&amp;amp;lt;div title=&amp;quot;{TEXT}&amp;quot; {ID} {CLASS}&amp;amp;gt;&amp;amp;lt;/div&amp;amp;gt;&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;default&amp;quot; value=&amp;quot;blue&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;baseUrl&amp;quot; value=&amp;quot;&amp;lt;%= SkinPath %&amp;gt;css/&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;cssClass&amp;quot; value=&amp;quot;Icon&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;selectedCssClass&amp;quot; value=&amp;quot;Icon-Selected&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;red&amp;quot; value=&amp;quot;Fire-engine Red&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;blue&amp;quot; value=&amp;quot;Midnight Blue&amp;quot; /&amp;gt;
	&amp;lt;param name=&amp;quot;yellow&amp;quot; value=&amp;quot;Sunflower Yellow&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
<div class="SubHead">EmbedWidget</div>
<p>This Widget is somewhat unique in that its purpose is to provide a standard way for embedding any embeddable content from other websites. Using this Widget, you create a &#8220;snippet&#8221; for any such content once using whatever unique requirements the source site may have. Once the snippet is created, you can then use the embeddable content multiple times within DotNetNuke using the standard Widget embedding syntax.</p>
<h3>Parameters</h3>
<p><strong><em>publisher</em></strong> (required for user content) &#8211; This parameter tells the EmbedWidget where to look for the embeddable content. If it is not specified, the Widget looks for content in the folder &#8220;~/Resources/Widgets/DNN/EmbedWidgetResources/{type parameter value}/&#8221; If this parameter is specified, the Widget looks for content in the folder &#8220;~/Resources/Widgets/User/{publisher parameter value}/EmbedWidgetResources/{type parameter value}/&#8221;</p>
<p><strong><em>type</em></strong> (required) &#8211; The type of content to embed. This value must correspond to a file named &#8220;{lowercase type parameter value}.snippet.htm&#8221; in the folder location specified above. The file must be a plain-text file containing solely the HTML markup necessary for rendering the content.</p>
<p>In addition to the above parameters, you can specify and arbitrary number of name/value parameters that are passed to the content snippet file when the content is rendered by the Widget. The value may be a single value or multiple values concatenated using a delimiter character. The default delimiter is &#8220;;&#8221;. You can overrride the delimiter by specifying the &#8220;multiValueDelimiter&#8221; parameter described below. Review the individual snippet file for each type of embeddable content for supported parameters specific to that content type.</p>
<p><strong><em>multiValueDelimiter</em></strong> (optional) &#8211; Character used to delimit multi-value parameters.</p>
<p>When the Widget is rendered, the snippet file is parsed and token substitution is performed using values specified in the parameters. The syntax for tokens is:</p>
<p><strong> { parameter name :   token template : default template  }</strong></p>
<p>For each token, the Widget checks to see if a corresponding named parameter is available. If so, it replaces the token with the token template otherwise it uses the default template. In order to substitute parameter values in the token template, placeholders are used. Placeholders are numeric and in the format {0}, {1}, {2} etc. The Widget substitutes values in the order they are specified.</p>
<p>For example: { width : width=&#8221;{0}&#8221; : width=&#8221;500&#8243; }  OR { coordinates : x={0},y={1} : x=100,y=100 }</p>
<h3>Example</h3>
<p>Embed a Flickr slideshow</p>
<pre class="brush: html">&amp;lt;object codebase=&amp;quot;EmbedWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;Flickr&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;type&amp;quot; value=&amp;quot;Flickr&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;</pre>
<div class="SubHead">VisibilityWidget</div>
<p>The purpose of this Widget is to enable an HTML element on a page to toggle the visibility of a container element located elsewhere on the page. The Widget included with DotNetNuke is now deprecated. Joe Brinkman has updated the Widget&#8217;s code and the updated one will be available in a future DotNetNuke release. You can read all about Joe&#8217;s enhancements in his blog post <a href="http://blog.theaccidentalgeek.com/post/2009/12/29/DotNetNuke-Tips-and-Tricks-15-DotNetNuke-Visibility-Widget.aspx" target="_blank"><strong>DotNetNuke Tips and Tricks #15: DotNetNuke Visibility Widget</strong></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-2-of-4/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Skin Proxy Re-visited</title>
		<link>http://www.kalyani.com/2009/12/dotnetnuke-skin-proxy-re-visited/</link>
		<comments>http://www.kalyani.com/2009/12/dotnetnuke-skin-proxy-re-visited/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 19:52:28 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Skins]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=959</guid>
		<description><![CDATA[Some years ago, I had presented a solution for dynamically loading a skin layout based on the user&#8217;s browser type. Fast-forward to the present &#8212; at the Fall 2009 OpenForce Conference in Amsterdam I had a chance to speak to Armand Datema (@nokiko) on the same topic. The conversation occurred following my session on Advanced <a href='http://www.kalyani.com/2009/12/dotnetnuke-skin-proxy-re-visited/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Some years ago, I had presented a <a href="http://kalyani.com/2005/04/ask-nik-switching-a-dnn-skin-based-on-the-users-browser/">solution</a> for dynamically loading a skin layout based on the user&#8217;s browser type. Fast-forward to the present &#8212; at the Fall 2009 OpenForce Conference in Amsterdam I had a chance to speak to Armand Datema (@nokiko) on the same topic. The conversation occurred following my session on <strong><a href="http://kalyani.com/2009/10/advanced-skinning-with-dotnetnuke/">Advanced Skinning with DotNetNuke</a> </strong>where I presented an early prototype of &#8220;Skinfigurator,&#8221; my module for rule-based skin loading. Armand was looking for a solution to dynamically choose a skin at run-time while overcoming the pesky ContentPane issue. If you are unfamiliar with the issue, here&#8217;s a quick synopsis&#8230;</p>
<p>DotNetNuke skins require the presence of a container HTML element with an ID of &#8220;ContentPane&#8221; and a <em>runat=&#8221;Server&#8221;</em> attribute. This is fine for most skins as it&#8217;s no big deal to define an area that serves as the default location for content (i.e. ContentPane). In the case of dynamic skin proxies (i.e. skins that load a layout based on some arbitrary set of conditions) this requirement is a problem since different layouts may want the ContentPane to be located in different places within the layout HTML.</p>
<p>In any event, as a result of my tinkering with skin proxies I found a clean solution for this problem. Ultimately I decided not to use it for Skinfigurator (more about the how/why in another post), however the technique is still quite useful. I promised Armand I would share it with him, and although I have been slow in making this post, it&#8217;s better late than never <img src='http://www.kalyani.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>The solution is trivially simple and involves just one file &#8212; the skin proxy layout. Basically what this proxy does is tap into the<strong> Init</strong> event in the page life-cycle to dynamically load the skin layout control. Since this event happens prior to the point where the DotNetNuke framework skin loader does its thing, you don&#8217;t have to bother with creating ContentPane elements in the skin proxy layout. All you need is the logic for dynamically selecting which layout to display to the user. Your Here&#8217;s the code for the skin proxy layout (I called mine LayoutSelector.ascx)</p>
<pre class="brush: vbnet">&amp;lt;%@ Control language=&amp;quot;vb&amp;quot; AutoEventWireup=&amp;quot;false&amp;quot; Explicit=&amp;quot;True&amp;quot; Inherits=&amp;quot;DotNetNuke.UI.Skins.Skin&amp;quot; %&amp;gt;
&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;
	Protected Overrides Sub OnInit(ByVal e As System.EventArgs)

		Dim layout = &amp;quot;Portal.ascx&amp;quot;
		If (Request.Querystring(&amp;quot;layout&amp;quot;) &amp;lt;&amp;gt; &amp;quot;&amp;quot;) Then
			layout = Request.Querystring(&amp;quot;layout&amp;quot;) + &amp;quot;.ascx&amp;quot;
		End If
		Controls.Add(LoadControl(TemplateSourceDirectory + &amp;quot;/layouts/&amp;quot; + layout))
	End Sub
&amp;lt;/script&amp;gt;
</pre>
<p>In my example, I have the code checking for a querystring variable and loading a control based on the value provided. Of course, this is not something you will want to do in production use. More likely you will want to have conditional logic based on the user, portal, browser, tab or some other controlling factor that determines which skin layout will be loaded.</p>
<p>There is one other thing to be aware of that is related to usability. By default, DotNetNuke lists all layouts (i.e. user controls) it finds in a skin folder in any skin layout selector in the UI. To ensure that your proxy logic is used, you will want your proxy layout control to be the only control in the skin&#8217;s root folder. All the dynamically selectable layouts should be in a sub-folder. In my example, I use a sub-folder called &#8220;layouts.&#8221; The folder structure for your skin will look something like this:</p>
<p>[MyCoolSkin]<br />
&#8211; LayoutSelector.ascx<br />
&#8211; skin.css<br />
&#8211; [layouts]<br />
&#8212;&#8211; Portal.ascx<br />
&#8212;&#8211; Portal2.ascx<br />
&#8212;&#8211; Portal3.ascx</p>
<p>Using this approach, the user will only be able to choose &#8220;LayoutSelector&#8221; and the Portal, Portal2 and Portal3 layouts will be hidden from the skin layout selector UI.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/12/dotnetnuke-skin-proxy-re-visited/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Widgets Guide (Part 1 of 4)</title>
		<link>http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-1-of-4/</link>
		<comments>http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-1-of-4/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 05:00:43 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Skins]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=898</guid>
		<description><![CDATA[Starting with Release 5.x, the DotNetNuke platform has included a Javascript-based Widgets framework for dynamically injecting client-side interactivity into skins and modules. Like most Open Source developers, I thoroughly enjoyed coding the Widget framework but neglected to document it properly. In this four-part series I hope to correct this shortcoming. In Part 1, I will <a href='http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-1-of-4/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kalyani.com/wp-content/uploads/2009/12/Widgets.png"><img class="alignright size-full wp-image-1017" style="border: 0pt none; margin: 5px;" title="Widgets" src="http://kalyani.com/wp-content/uploads/2009/12/Widgets.png" alt="Widgets" width="200" height="199" /></a>Starting with Release 5.x, the DotNetNuke platform has included a Javascript-based Widgets framework for dynamically injecting client-side interactivity into skins and modules. Like most <a class="zem_slink" title="Open Source" rel="wikinvest" href="http://www.wikinvest.com/concept/Open_Source">Open Source</a> developers, I thoroughly enjoyed coding the Widget framework but neglected to document it properly. In this four-part series I hope to correct this shortcoming. In Part 1, I will introduce some fundamental concepts of the DotNetNuke Widget Framework. In Part 2, I will provide a reference for existing widgets that are included with DotNetNuke. In Part 3, I will step through the process of developing a Widget. Finally, in Part 4 I will create a working Widget that you can download and use to increase your understanding of the framework and to build your own Widgets.</p>
<h3>Widget Fundamentals</h3>
<p>Just as you can add modules to a DotNetNuke page to add application functionality, so also can you add Widgets to DotNetNuke skins and modules to add interactivity. For example, in a skin, Widgets may enable a user to dynamically switch a stylesheet to change page appearance, add a photo gallery, embed a video etc. In a module, Widgets can provide interface elements for navigation, drag-and-drop sorting capabilities etc. Widgets are first-class citizens of DotNetNuke&#8217;s extensibility model and can therefore be packaged individually or in combination with DotNetNuke modules and skins using the familiar DotNetNuke manifest and zip file model. Widgets are created using Javascript code that builds on the Microsoft ASP.NET AJAX client-side library and can leverage jQuery or any other client-side framework for additional capabilities. They can be embedded into any extension type that manifests itself in the client browser (module, skin, skin object, container) and use a syntax that should be familiar to skin designers. Here&#8217;s an example of a Flickr Widget:</p>
<pre class="brush: html">
&amp;lt;object codebase=&amp;quot;EmbedWidget&amp;quot; codetype=&amp;quot;dotnetnuke/client&amp;quot; id=&amp;quot;MyWidget&amp;quot;&amp;gt;
    &amp;lt;param value=&amp;quot;Flickr&amp;quot; name=&amp;quot;type&amp;quot; /&amp;gt;
&amp;lt;/object&amp;gt;
</pre>
<p>That&#8217;s it&#8230;three lines of HTML markup to embed a Flickr slideshow like the image below instantly into a DotNetNuke page. Go ahead&#8230;try it out by adding the above markup in an HTML module (in source)&#8230;I&#8217;ll wait.</p>
<p><a href="http://kalyani.com/wp-content/uploads/2009/12/EmbedWidget-Flickr.png"><img class="aligncenter size-medium wp-image-906" title="EmbedWidget-Flickr" src="http://kalyani.com/wp-content/uploads/2009/12/EmbedWidget-Flickr-300x250.png" alt="Flickr slideshow using EmbedWidget" width="300" height="250" /></a></p>
<p>At this point you are probably wondering what the benefit of Widgets is if they are coded in Javascript and make use of pre-existing client-side libraries. After all it&#8217;s not that difficult to embed a simple &lt;script&gt; element into your skin or module and add any code that you desire directly at the appropriate location. And using my simplistic example of a Flickr slideshow, you could just as easily get the embed code for the slideshow and use it directly.</p>
<h3>Five Reasons for using the Widget framework</h3>
<p>Let&#8217;s address these questions by reviewing the five primary reasons for using the Widgets framework:</p>
<p><strong>Clean Markup:</strong> Using Widgets enables you to keep the HTML markup for your skin or module clean and script-free. Since Widgets are embedded using the standard &lt;object&gt; element, you can add functionality without sacrificing readability. In fact, Widgets lend themselves to more semantic markup as the intent of the markup is usually evident from the name of the Widget and the parameter name/value pairs. Embedding script directly or referencing an external script makes your markup harder to read and maintain.</p>
<p><strong>Reusability:</strong> If you have some Javascript code that needs to be used in multiple skins or modules, wrapping it into a Widget makes it easy for you to re-use the code while taking advantage of DotNetNuke&#8217;s packaging and versioning capabilities. Sure, you could store a script file in a central location and reference it, but Widgets afford you greater control in using, deploying and maintaining the code. Furthermore, by implementing the code as a Widget, you now have the ability to easily pass parameters without messing around with querystring parameters to script file references or in-line Javascript variable declarations. Such reusability does come at a small price in terms of time and effort required, so it&#8217;s probably not a good idea to create a Widget for a single-use script.</p>
<p><strong>Testability and Maintainability:</strong> Unlike context-less Javascript files or embedded script, Widgets are stand-alone, contextual entities. Therefore they can be tested and debugged in a variety of scenarios quickly and easily with minimal effort. If you just add a &lt;script&gt; reference to a Javascript file in your HTML markup, you have no way of knowing if the dependencies for the script are being loaded or not. You have no idea if any variable necessary to pass parameters to the script are already on the page or not. These issues are eliminated using Widgets. When you use a Widget, you know that its dependencies will be correctly loaded and its parameters are available in the Widget&#8217;s HTML markup itself.</p>
<p><strong>Performance:</strong> Browsers execute inline script and fetch scripts referenced using the &lt;script&gt; element synchronously while rendering a page (you could use the &#8220;defer&#8221; attribute, but browser support for this is not consistent). This puts an unnecessary wait penalty on the site visitor. Using jQuery&#8217;s document.ready() method mitigates this somewhat, but remember, the browser still has to switch context from HTML to Javascript, parse the script and then switch context back to HTML. Widgets provide a cleaner way to add client-side interactivity as they are loaded at the end of a page when the DOM is ready. Thus, the visitor will have a better user experience as HTML, CSS and images will already have been rendered. If you would like to learn more about how browsers handle script, read <a href="http://dev.opera.com/articles/view/timing-and-synchronization-in-javascript/" target="_blank">Timing and Synchronization in JavaScript</a>.</p>
<p><strong>Behavior Injection and Modification:</strong> It&#8217;s quite easy to add &#8220;onclick&#8221; and &#8220;onmouseover&#8221; attributes to HTML elements to add client-side interactivity. Unfortunately, this results in horrible markup that is difficult to maintain and difficult to debug. Widgets force you to use behavior injection and modification in order to attach events to DOM elements. This keeps all behavioral code in one location and makes it incredibly easy to maintain through good use of jQuery selectors. It&#8217;s also results in a cleaner separation between the markup and the script.</p>
<p>Hopefully this information has provided you with enough knowledge to understand when Widgets are a good idea and when they are not. Now let&#8217;s take a deeper look at the client-side page life-cycle to understand the Widget rendering process.</p>
<h3>Widget Rendering Process</h3>
<p>Widgets are rendered only if the Site Setting &#8220;Enable Skin Widgets&#8221; is checked. This value is checked by default, so you can be assured that Widgets will render on most DotNetNuke sites. (We should probably re-name this setting to &#8220;Enable Client-side Widgets&#8221;&#8230;when I was first coding the Widget framework, I was focused on usage scenarios involving skins and used the term &#8220;skin widgets.&#8221; The term stuck even though Widgets can be used in any DotNetNuke extension that renders code to the browser.) By enabling this setting, a single reference to a Javascript file is injected into the very end of the page:</p>
<pre class="brush: html">&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;/Resources/Shared/scripts/initWidgets.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;</pre>
<p>When the script loads, it initiates a four-step process: Framework Initialization, Widget Detection, Widget Instantiation and Widget Rendering. This process is illustrated below:</p>
<p><a href="http://kalyani.com/wp-content/uploads/2009/12/Widget-Process.png"><img class="aligncenter size-full wp-image-928" title="Widget-Process" src="http://kalyani.com/wp-content/uploads/2009/12/Widget-Process.png" alt="Widget Rendering Process" width="473" height="498" /></a></p>
<p>The Widget framework uses jQuery to load all required scripts in an asynchronous manner. When a script is done loading, an event is fired to carry out the next step in the rendering process. All of this happens pretty fast, and most notably, after the page is already rendered in the browser. If you view the HTML source for the page, you will see no difference in the markup from what was originally sent by the server (i.e. &lt;object&gt; elements). However, if you query the DOM using FireBug or a similar tool, you will see that each &lt;object&gt; Widget element has been replaced with a &lt;div&gt; or similar element with the same ID as originally given to the &lt;object&gt; element. This enables you to use CSS for styling the Widget using an ID selector (i.e. #MyWidget).</p>
<p>In this post, I provided an introduction to the DotNetNuke Widget Framework. In the next post in this series, I will introduce you to the Widgets included with DotNetNuke and provide a usage reference for each Widget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/12/dotnetnuke-widgets-guide-part-1-of-4/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>DotNetNuke Visual Overview</title>
		<link>http://www.kalyani.com/2009/12/dotnetnuke-visual-overview/</link>
		<comments>http://www.kalyani.com/2009/12/dotnetnuke-visual-overview/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 08:20:45 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=885</guid>
		<description><![CDATA[A visual overview of DotNetNuke intended to give newcomers to the platform a quick understanding of DotNetNuke. (Click for larger image)]]></description>
			<content:encoded><![CDATA[<p>A visual overview of DotNetNuke intended to give newcomers to the platform a quick understanding of DotNetNuke.</p>
<p><a href="http://kalyani.com/wp-content/uploads/2009/12/DNN-Architecture-NK20091201.png"><img class="aligncenter size-medium wp-image-886" title="DotNetNuke Architecture" src="http://kalyani.com/wp-content/uploads/2009/12/DNN-Architecture-NK20091201-300x249.png" alt="DotNetNuke Architecture" width="300" height="249" /></a></p>
<p>(Click for larger image)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/12/dotnetnuke-visual-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Skinning With DotNetNuke</title>
		<link>http://www.kalyani.com/2009/10/advanced-skinning-with-dotnetnuke/</link>
		<comments>http://www.kalyani.com/2009/10/advanced-skinning-with-dotnetnuke/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 20:20:32 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Skins]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=971</guid>
		<description><![CDATA[Slide deck from my session on advanced skinning with DotNetNuke at SDN/OpenForce in Fall 2009. Advanced Skinning With DotNetNuke View more presentations from Nik Kalyani.]]></description>
			<content:encoded><![CDATA[<div>Slide deck from my session on advanced skinning with DotNetNuke at SDN/OpenForce in Fall 2009.</div>
<div style="width: 425px; text-align: left;"><a style="font: 14px Helvetica,Arial,Sans-serif; display: block; margin: 12px 0 3px 0; text-decoration: underline;" title="Advanced Skinning With DotNetNuke" href="http://www.slideshare.net/techbubble/advanced-skinning-with-dotnetnuke">Advanced Skinning With DotNetNuke</a><object style="margin: 0px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=nn-10advancedskinningwithdotnetnuke5-091228135657-phpapp01&amp;stripped_title=advanced-skinning-with-dotnetnuke" /><param name="allowfullscreen" value="true" /><embed style="margin: 0px;" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=nn-10advancedskinningwithdotnetnuke5-091228135657-phpapp01&amp;stripped_title=advanced-skinning-with-dotnetnuke" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div id="__ss_2785628" style="width: 425px; text-align: left;">
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration: underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline;" href="http://www.slideshare.net/techbubble">Nik Kalyani</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/10/advanced-skinning-with-dotnetnuke/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using And Extending The DotNetNuke Widget Framework</title>
		<link>http://www.kalyani.com/2009/10/using-and-extending-the-dotnetnuke-widget-framework/</link>
		<comments>http://www.kalyani.com/2009/10/using-and-extending-the-dotnetnuke-widget-framework/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 06:52:18 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=940</guid>
		<description><![CDATA[This is the slide deck from my talk at OpenForce Europe (Amsterdam). Using And Extending The DotNetNuke Widget Framework View more presentations from Nik Kalyani.]]></description>
			<content:encoded><![CDATA[<p>This is the slide deck from my talk at OpenForce Europe (Amsterdam).</p>
<div id="__ss_2782782" style="width: 425px; text-align: left;"><a style="font: 14px Helvetica,Arial,Sans-serif; display: block; margin: 12px 0 3px 0; text-decoration: underline;" title="Using And Extending The DotNetNuke Widget Framework" href="http://www.slideshare.net/techbubble/nn11-using-and-extending-the-dot-net-nuke-widget-framework">Using And Extending The DotNetNuke Widget Framework</a><object style="margin: 0px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=nn-11usingandextendingthedotnetnukewidgetframework-091228004206-phpapp01&amp;stripped_title=nn11-using-and-extending-the-dot-net-nuke-widget-framework" /><param name="allowfullscreen" value="true" /><embed style="margin: 0px;" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=nn-11usingandextendingthedotnetnukewidgetframework-091228004206-phpapp01&amp;stripped_title=nn11-using-and-extending-the-dot-net-nuke-widget-framework" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration: underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline;" href="http://www.slideshare.net/techbubble">Nik Kalyani</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/10/using-and-extending-the-dotnetnuke-widget-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hands On Windows Azure:  Building A Twitter Clone</title>
		<link>http://www.kalyani.com/2009/10/hands-on-windows-azure-building-a-twitter-clone/</link>
		<comments>http://www.kalyani.com/2009/10/hands-on-windows-azure-building-a-twitter-clone/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 06:47:39 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://kalyani.com/?p=935</guid>
		<description><![CDATA[This is the slide deck from my talk at SDN Europe (Amsterdam). Hands On Windows Azure Building A Twitter Clone View more presentations from Nik Kalyani.]]></description>
			<content:encoded><![CDATA[<p>This is the slide deck from my talk at SDN Europe (Amsterdam).</p>
<div id="__ss_2782775" style="width: 425px; text-align: left;"><a style="font: 14px Helvetica,Arial,Sans-serif; display: block; margin: 12px 0 3px 0; text-decoration: underline;" title="Hands On Windows Azure  Building A Twitter Clone" href="http://www.slideshare.net/techbubble/ne09-hands-on-windows-azure-building-a-twitter-clone">Hands On Windows Azure  Building A Twitter Clone</a><object style="margin: 0px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ne-09hands-onwindowsazure-buildingatwitterclone-091228004028-phpapp02&amp;stripped_title=ne09-hands-on-windows-azure-building-a-twitter-clone" /><param name="allowfullscreen" value="true" /><embed style="margin: 0px;" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ne-09hands-onwindowsazure-buildingatwitterclone-091228004028-phpapp02&amp;stripped_title=ne09-hands-on-windows-azure-building-a-twitter-clone" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration: underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline;" href="http://www.slideshare.net/techbubble">Nik Kalyani</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/10/hands-on-windows-azure-building-a-twitter-clone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customer-driven Business Innovation with DotNetNuke</title>
		<link>http://www.kalyani.com/2009/08/customer-driven-business-innovation-with-dotnetnuke/</link>
		<comments>http://www.kalyani.com/2009/08/customer-driven-business-innovation-with-dotnetnuke/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 00:37:00 +0000</pubDate>
		<dc:creator>nik</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.techbubble.net/Blog/tabid/57/EntryId/222/Customer-driven-Business-Innovation-with-DotNetNuke.aspx</guid>
		<description><![CDATA[In an increasingly hyper-competitive world, businesses look for every possible opportunity that can give them an edge over their competition. It’s no secret &#8212; businesses that innovate survive and win, and those that don’t either die, don’t grow or become the walking dead. But innovation isn’t easy. In fact, it is a challenge for most <a href='http://www.kalyani.com/2009/08/customer-driven-business-innovation-with-dotnetnuke/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">
<p style="text-align: left;">In an increasingly hyper-competitive world, businesses look for every possible opportunity that can give them an edge over their competition. It’s no secret &#8212; businesses that <cite>innovate</cite> survive and win, and those that don’t either die, don’t grow or become the walking dead.</p>
<p>But innovation isn’t easy. In fact, it is a challenge for most companies. There are many reasons for this – corporate culture, inertia, risk-aversion – but I think the biggest reason is “expertise.” The quote I have on my desktop wallpaper sums it up nicely:</p>
<p><strong><span style="font-size: larger;"><em>“In the beginner’s mind there are many possibilities, in the expert’s mind there are few.” </em></span></strong></p>
<p><span style="font-size: larger;"><em>– Shunryu Suzuki</em></span></p>
<p>I have this quote on my desktop because it’s a constant reminder that as I become more familiar with a technology or business skill, my ability to come up with innovative ideas about that technology or business area decreases. This is my totally unscientific thesis at a personal level; your experience may differ, but I suspect not by much. Since businesses are primarily just people doing stuff, the corollary is that businesses face the same issue – dearth of innovation due to expertise.</p>
<p>So if a business can’t look internally to its employees, where should it look for those innovative ideas that will propel it to the next level? (NO, the answer is definitely not consultants.) The best source of innovative ideas for your business is your <strong>customers</strong> and the best place to engage them for these ideas is <strong>online</strong>.</p>
<p><a href="http://kalyani.com/wp-content/uploads/2009/08/onlinecustomerequation.png"><img class="alignnone size-full wp-image-873" title="onlinecustomerequation" src="http://kalyani.com/wp-content/uploads/2009/08/onlinecustomerequation.png" alt="" width="450" height="117" /></a></p>
<p>Many companies have discovered that the same concepts that work amazingly well on a personal and social level with FaceBook and MySpace, work equally well for business (albeit without any sheep being thrown about in the process). Creating an online community for your business is an effective way to engage your customers online and provide a direct channel to them, bereft of the hierarchical and departmental boundaries that stifle discussion and open dialog offline. This should not come as a surprise, after all “people want to connect with people; people want to help and be helped” (Study: <a href="http://www.slideshare.net/fgossieaux/2008-tribalization-of-business-study-447040" target="_blank">Tribalization of Business</a>). Chances are that if you follow some basic guidelines, you can very quickly and easily engage your customers and make innovation an open and collaborative process.</p>
<p><a href="http://kalyani.com/wp-content/uploads/2009/08/IdeaNetwork.jpg"><img class="alignnone size-full wp-image-874" title="IdeaNetwork" src="http://kalyani.com/wp-content/uploads/2009/08/IdeaNetwork.jpg" alt="" width="450" height="424" /></a></p>
<p>One company that has been successful in creating such an online customer community is <a href="http://www.exacttarget.com" target="_blank">ExactTarget</a>. The company has been a long-time sponsor of the DotNetNuke project (thanks!). The “3sixty”<cite> community</cite> site it created for its customers using <a href="http://www.dotnetnuke.com/Products/ProfessionalEdition/tabid/1209/Default.aspx" target="_blank">DotNetNuke Professional Edition</a> is a prime example of best practices for creating online communities recommended by <a href="http://www.hivelive.com" target="_blank">HiveLive</a>, a SAAS provider of enterprise online customer communities. Since 3sixty was created, the site has become a key competitive differentiator for <cite>ExactTarget</cite> resulting in over 100 customer-suggested feature innovations into its product. You can get the straight scoop on how ExactTarget achieved this by attending the free webinar “<a href="http://www.dotnetnuke.com/Products/Webinars.aspx">ExactTarget: Using DotNetNuke to Build an Interactive Business Community</a>” on Aug. 26, 2009 (download a recording of the video by following the link if you are reading this after Aug. 26).<img src="http://kalyani.com/wp-content/uploads/2009/08/ET3sixty.png" border="0" alt="ExactTarget 3sixty" hspace="10" vspace="10" width="159" height="124" align="right" /></p>
<p>While ExactTarget could have developed a custom ASP.NET solution for this site, it selected <cite>DotNetNuke</cite> because of its ability to easily integrate with existing web-based business applications while providing a robust platform for rapid application development. Let me stop myself right here and not get carried away discussing the merits of DotNetNuke as an excellent platform for building online communities. It is very tempting to look at creating such communities as a technology problem and delve into a discussion about features, API’s and such. But as <a href="http://blogs.zdnet.com/bio.php?id=hinchcliffe" target="_blank">Dion Hinchcliffe</a> accurately points out in <a href="http://blogs.zdnet.com/Hinchcliffe/?p=190" target="_blank">Twelve Best Practices for Online Customer Communities</a>, “community is mostly not a technology problem.” Indeed, as he points out, platforms like DotNetNuke make it easy to create compelling communities. (If you are reading this on <a href="http://www.dotnetnuke.com" target="_blank">DotNetNuke.com</a>, you are looking at the best evidence to support this claim.) Creating successful online business communities is more an exercise in adapting your business to a new form of customer engagement and creating the social architecture for such a community.</p>
<p>In order to succeed, here is a summation of HiveLive’s recommendations:</p>
<table border="0" cellspacing="0" cellpadding="10">
<tbody>
<tr>
<td align="center" valign="top"><img src="http://kalyani.com/wp-content/uploads/2009/08/ClearGoals.png" border="0" alt="Clear Goals" /></td>
<td align="left" valign="top"><span class="Head">Best Practice #1: Build a community with clear goals in mind</span></p>
<p>Start with a narrow and tightly defined scope and develop the community structure from there. This is essential for rallying members and motivating them to contribute. Be prepared to expand the scope quickly as the community evolves.</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="10">
<tbody>
<tr>
<td align="left" valign="top"><span class="Head">Best Practice #2: Motivate your members</span></p>
<p>Online community members are power users, participants or spectators. Explore ways to keep power users engaged to ensure a steady stream of relevant and authentic content. This in turn will motivate others to play a more active role. Also, think of ways in which you can compensate participants. Compensation, does not have to be monetary – insider status, avatars, recognition, they all work.</td>
<td align="center" valign="top"><img src="http://kalyani.com/wp-content/uploads/2009/08/TightScope.png" border="0" alt="Tight Scope" /></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="10">
<tbody>
<tr>
<td align="center" valign="top"><img src="http://kalyani.com/wp-content/uploads/2009/08/DesignThinking.png" border="0" alt="Design Thinking" /></td>
<td align="left" valign="top"><span class="Head">Best Practice #3: Use Design Thinking Principles</span></p>
<p><a href="http://en.wikipedia.org/wiki/Design_thinking" target="_blank">Design Thinking</a> is a process for practical, creative resolution of problems or issues that looks for an improved future result. Using this approach can establish ground rules and foster a culture of crowd-sourced innovation in an online community.</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="10">
<tbody>
<tr>
<td align="left" valign="top"><span class="Head">Best Practice #4: Build a Culture of Openness</span></p>
<p>Direct engagement through genuine interactions will yield significant benefits and convince more members to participate in the innovation process. Don’t try to control the conversation, listen more than you talk, and make sure the culture of openness is not just a façade. Although painful at first, such a culture is critical to the success of an online community.</td>
<td align="center" valign="top"><img src="http://kalyani.com/wp-content/uploads/2009/08/OpenCulture.png" border="0" alt="Open Culture" /></td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="10">
<tbody>
<tr>
<td align="center" valign="top"><img src="http://kalyani.com/wp-content/uploads/2009/08/ContinuousImprovement.png" border="0" alt="Continuous Improvement" /></td>
<td align="left" valign="top"><span class="Head">Best Practice #5: Remain Dedicated to Continuous Improvement</span></p>
<p>View your online community as a journey, instead of a technology initiative with a defined end-point. Committing to a posture of cultivation will yield tangible results in the form of a steady flow of innovative ideas from the community. This also builds trust and gives members a greater sense of ownership as their ideas and suggestions are realized.</td>
</tr>
</tbody>
</table>
<p>Has your company created an online business community? Do share! What were the challenges you faced? What did you learn from the experience?</p>
<p>If you have not created an online business community yet, hopefully this post and the <a href="http://www.dotnetnuke.com/products/webinars.aspx">webinar</a> will give you some ideas that will help guide you in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kalyani.com/2009/08/customer-driven-business-innovation-with-dotnetnuke/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

