<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Ronald Widha</title>
	
	<link>http://www.ronaldwidha.net</link>
	<description>podcast addict, believes in occam razor, software consultant</description>
	<lastBuildDate>Tue, 31 Aug 2010 12:38:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RonaldWidha" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="ronaldwidha" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Can’t access public properties of registered User Controls inside a Sharepoint 2010 Visual Web Part</title>
		<link>http://www.ronaldwidha.net/2010/08/31/cant-access-public-properties-of-registered-user-controls-inside-a-sharepoint-2010-visual-web-part/</link>
		<comments>http://www.ronaldwidha.net/2010/08/31/cant-access-public-properties-of-registered-user-controls-inside-a-sharepoint-2010-visual-web-part/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:33:41 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Problem]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>
		<category><![CDATA[User controls]]></category>
		<category><![CDATA[visual studio 2010]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/08/31/cant-access-public-properties-of-registered-user-controls-inside-a-sharepoint-2010-visual-web-part/</guid>
		<description><![CDATA[Problem
I was trying to use a user control within a Sharepoint 2010 Visual Web Part and can’t seem to access any of the public properties of the user controls.

Casting the user control explicitly seem to do the trick. But I don’t want to do that every time!

What’s really happening
When I created the dependant user control [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>I was trying to use a user control within a Sharepoint 2010 Visual Web Part and can’t seem to access any of the public properties of the user controls.</p>
<p><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image5.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image5_thumb.png" width="400" height="19" /></a></p>
<p>Casting the user control explicitly seem to do the trick. But I don’t want to do that every time!</p>
<p><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image1.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image_thumb1.png" width="564" height="21" /></a></p>
<h2>What’s really happening</h2>
<p>When I created the dependant user control that the visual web part require, VS2010 automatically create a special Sharepoint’s Control Template folder for me – which is kinda neat.</p>
<p><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image15.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image15_thumb.png" width="198" height="56" /></a></p>
<p>Worth pointing out that the User control has a ‘deployment location’ property where it says to which folder it’s going to be deployed to.</p>
<p>In the Visual Webpart, I’ve registered the user control as such. </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:8aeb9b35-a988-4316-beb9-eb2c97419704" class="wlWriterEditableSmartContent">
<pre class="brush: csharp; gutter: false; first-line: 1; tab-size: 2;  toolbar: true; ">&lt;%@ Register Tagprefix=&quot;UserControl&quot; TagName=&quot;NotificationList&quot; Src=&quot;~/_ControlTemplates/WebParts/NotificationList.ascx&quot; %&gt;</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<blockquote>
<p>Note that the source is _ControlTemplates rather than ControlTemplates. If I had omitted the underscore it wouldn’t work as there isn’t such folder in Sharepoint. I worked this out by looking at the path which the generated Visual Web Part bootstrapper point to .</p>
</blockquote>
<p>If you look closer, Visual Studio 2010 doesn’t seem to like our user control registration. </p>
<p><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image3.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image_thumb3.png" width="645" height="69" /></a></p>
<p>It’s suggesting that it can’t find the control and decided to put the base class System.Web.UI.UserControl in our Visual Web Part designer class (*.ascx.design.cs). This is the culprit of why we can’t get the public properties/methods without explicit cast.</p>
<p>Seems the problem is caused by Visual Studio 2010 not having the same assumptions with the Sharepoint 2010 runtime. It’s really a VS2010 Bug.</p>
<p>VS2010 should’ve generated \_ControlTemplates\ in the first place when I create user controls. Alternatively, VS2010 should simply accept that ControlTemplates is a merely string token that will be converted to _ControlTemplates by Sharepoint 2010 runtime and take this account when generating the designer classes.</p>
<h2>Solution</h2>
<p>The solution is very simple:</p>
<ol>
<li>Register the user control as above – i.e point src to ~/_ControlTemplates/ … </li>
<li>Simply rename the ControlTemplate solution folder in VS2010 to _ControlTemplate </li>
</ol>
<p><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image37.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/08/image37_thumb.png" width="193" height="57" /></a></p>
<p>As soon as I did this, VS2010 T4 template (which generates the designer classes) behaves properly and casts my user controls to the proper types.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/08/31/cant-access-public-properties-of-registered-user-controls-inside-a-sharepoint-2010-visual-web-part/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Azure Appliance: Cloud in a box</title>
		<link>http://www.ronaldwidha.net/2010/08/29/azure-appliance-cloud-in-a-box/</link>
		<comments>http://www.ronaldwidha.net/2010/08/29/azure-appliance-cloud-in-a-box/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 14:00:00 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Azure Appliance]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Roles]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/08/29/azure-appliance-cloud-in-a-box/</guid>
		<description><![CDATA[When Microsoft announced Azure, a lot of people (including myself) wondered if the Azure platform is going to be available locally &#8211; in my own datacenter. 
Enterprises are concerned about the security and liability aspects of putting valuable information off-premise. How can we be sure that there are/wont be any no naughty codes from other [...]]]></description>
			<content:encoded><![CDATA[<p>When Microsoft announced Azure, a lot of people (including myself) wondered if the Azure platform is going to be available locally &#8211; in my own datacenter. </p>
<p>Enterprises are concerned about the security and liability aspects of putting valuable information off-premise. How can we be sure that there are/wont be any no naughty codes from other accounts snipping through the cracks and stealing data. Enterprises want isolation. For the longest time, this isn’t possible (without using Azure Service Bus and hosting some parts of the services in a private <em>cloud</em>).</p>
<p>My motivation for the interest was slightly different and geared more towards being able to start developing in the Azure paradigms (roles) without being locked in into the Microsoft hosted Azure infrastructure. I wanted to be able to develop roles on the development fabric, put it into production on a Windows Server stack and when I need a lot more scalability, I’ll then put it up on the Microsoft hosted Azure infrastructure. For the longest time, this isn’t possible either.</p>
<p>In July 2010, <a href="http://www.microsoft.com/presspass/press/2010/jul10/07-12cloudcomputingpr.mspx" target="_blank">Microsoft announced Azure Appliance</a>. Something that Microsoft have said they would never do. Azure is going to be available on premise through the Azure appliance!</p>
<h2>Private Cloud: Set affinity to local!</h2>
<h2><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/08/azureappliance.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="azure-appliance" border="0" alt="azure-appliance" src="http://www.ronaldwidha.net/wp-content/uploads/2010/08/azureappliance_thumb.png" width="450" height="215" /></a></h2>
<p>The Azure Appliance is essentially a private cloud solution from Microsoft. It’s going to consist of a full software, hardware including all the network stack. This is important to guarantee compatibility across different deployments. By the sound of things, when you’re buying one what you’ll get is a container full of servers just like the ones serving on the public cloud.</p>
<p>This, in essence, will give companies that extra comfort by letting them “<em>own”</em> (and pay for) the whole stack. It’s a true local affinity! </p>
<h2>IT as a service</h2>
<p>Microsoft have been pretty secretive to the details of how Azure work under the hood and it seems this announcement doesn’t change anything. It will come with a full service from Microsoft – which is a good thing; we don’t want the exponential growth of Azure to be impeded by the complexity of rolling out service packs to different Azure private data centers, which will be expensive for both Microsoft and their clients. </p>
<p>By the end of the day what you’re getting is a freakin’ huge computer(s) and a IT team to go along with it. Ebay is apparently one of the company who will get a taste of this sooner than other companies.</p>
<h2>“Opening up” to scale out</h2>
<p>Amazon and Google had a lot of advantages when it comes to building new datacentres. They start off by selling surplus computing time! Microsoft didn’t share the same advantages as they built Azure from the ground up. It’s expensive to expand and open up new datacenters. However through Azure Appliance, companies like <a href="http://rcpmag.com/articles/2010/09/01/microsofts-cloud-in-a-box.aspx" target="_blank">Dell, Fujitsu, HP</a> can order one, pay for it, add a few value-add offerings and start reselling azure cloud service offering.</p>
<h2>What I really ’d like to see: Azure on the Windows Server App Fabric</h2>
<p>I’m truly excited by this. However, I’m more excited about making sure that the role paradigm which I love is available to me without necessarily paying it based on usage. I’m skeptical whether the existence of Azure Appliance will change this (side note: <a href="http://www.microsoft.com/windowsazure/offers/default.aspx" target="_blank">the Development acellerator core</a> package sounds promising but still too limiting).</p>
<p>What I really like to see is for Microsoft to bring Azure onto the App Fabric offering. When I say Azure here I do not necessarily mean the whole stack of hardware, network, virtualized environments, CDN, table storage and all that. I just mean the development paradigm with Web Roles and Worker Roles. When that happens, we can all forget about virtual directories or even IIS for that matter. All we care about is managing the different Roles and being able to move them in/out of different clouds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/08/29/azure-appliance-cloud-in-a-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Employer support</title>
		<link>http://www.ronaldwidha.net/2010/07/06/employer-support/</link>
		<comments>http://www.ronaldwidha.net/2010/07/06/employer-support/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 04:39:40 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[employee]]></category>
		<category><![CDATA[non technical]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/?p=576</guid>
		<description><![CDATA[
In the few years I’ve been working as a software engineer, I have had the chance to be a part of different types of companies; From the small startup in the creative space, to the more corporate large-ish public facing .com company.
I remember a few months into working at the small startup, I told everyone [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.infusion.com/News-Item.aspx?id=96" target="_blank"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="Interview with Ronald Widha from TemanMacet.com" border="0" alt="Interview with Ronald Widha from TemanMacet.com" src="http://www.ronaldwidha.net/wp-content/uploads/2010/07/image.png" width="400" height="262" /></a></p>
<p>In the few years I’ve been working as a software engineer, I have had the chance to be a part of different types of companies; From the small startup in the creative space, to the more corporate large-ish public facing .com company.</p>
<p>I remember a few months into working at the small startup, I told everyone that I was applying for a job in consulting. They happily offer to write me a letter of recommendation, despite the little value it might have had since the company was just starting out. In the end, I stayed there for 2 years before I feel it was really the time for me to move on.</p>
<p>Another job was not as supportive; I had the idea of starting a public facing blog for the development team. The response was rather cold, “what good could it bring? first, we potentially will share knowledge to competitors, and second, other company might steal our smartest devs!”. This tells so much about the company’s vision towards personal development. “Keep them from growing [externally], otherwise people will leave!” </p>
<p>This view is definitely not shared across the industry. Take <a href="http://www.twitter.com" target="_blank">Twitter</a>, <a href="http://www.plancast.com" target="_blank">PlanCast</a>, <a href="http://www.klout.com" target="_blank">Klout</a> as an example. The dev teams are helping each other out to overcome technical challenges. Or companies like <a href="http://www.facebook.com/" target="_blank">Facebook</a> who open sourced most of their underlying technologies. Or even companies like <a href="http://www.microsoft.com" target="_blank">Microsoft</a> which promoted the use of public blogs, podcasts, videos to share knowledge.</p>
<p>Call me naive, but I feel those days when employees work 40 years with only one company are over. Employment is now about sharing mutual respect, growing together and potentially –at some point- moving on to the next bigger better things. </p>
<p>I truly believe in these day and age, any one company could only be a part of one’s career for so far. There’s going to be a time where the employee will outgrow (or be outgrown) by the company. At that point in time, he/ she will&#160; find themselves in a position where they will bring so much more value to a different company.</p>
<p>Good companies, however, will grow organically with the employees. These companies understand that the only way for them to be successful is to grow their people both from an internal career ladder and external; encouraging their people to bring impact to the public, gaining the community respect and reputation in the process. </p>
<p>Companies have to remember that to be great, one has to be surrounded by other great people.</p>
<p><em>NB: the picture above is showing my employer is highlighting one of my personal web venture on their news page.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/07/06/employer-support/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Running Cassandra on Windows: first attempt</title>
		<link>http://www.ronaldwidha.net/2010/06/23/running-cassandra-on-windows-first-attempt/</link>
		<comments>http://www.ronaldwidha.net/2010/06/23/running-cassandra-on-windows-first-attempt/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 04:43:29 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Fluent Cassandra]]></category>
		<category><![CDATA[Thrift]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/06/23/running-cassandra-on-windows-first-attempt/</guid>
		<description><![CDATA[Yesterday I was reading up on some resources on Apache Cassandra for the .Net devs. I decided to try it out. 
A little problem on Windows
I found one potential stumbling block, which is in order to talk to Cassandra I will need to build a ‘proxy class’ to handle the de/serialization for me. Cassandra uses [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was reading up on some resources on <a href="http://www.ronaldwidha.net/2010/06/22/resources-on-apache-cassandra-for-net-devs/" target="_blank">Apache Cassandra for the .Net devs</a>. I decided to try it out. </p>
<h3>A little problem on Windows</h3>
<p>I found one potential stumbling block, which is in order to talk to Cassandra I will need to build a ‘proxy class’ to handle the de/serialization for me. Cassandra uses a protocol called Thrift. So I will need a proxy class that can serialize my objects to something that fits into the Thrift protocol. This can be done by using the Thrift executable. One little catch: currently there isn’t a version built for Windows.</p>
<h3>Side note: What is Thrift and does it really not run on Windows?</h3>
<p>I was slightly unsure if Thrift was a separate executable that needs to be run on the server and acts as a mediator between my .Net app and Cassandra. But soon I found out it is just a protocol that Cassandra make use of.</p>
<p>As you see below, Cassandra is running on Windows and binding Thrift successfully to localhost.</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/image_thumb1.png" width="553" height="48" /></p>
<p>The Thrift executable, however, is a code generator of some sort that produce a language specific proxy class/driver/client/interface code that handles the communication between our app and cassandra. This is the bit that currently not available in Windows.</p>
<h3>Solution: Generated Cassandra interface</h3>
<p>There’s already a generated Cassandra interface for C# on <a href="https://code.google.com/p/coderjournal/source/browse/trunk/Posts/2010/03/gen-csharp#gen-csharp/Apache/Cassandra" target="_blank">Google Code</a>, however using it feels pretty clunky as shown <a href="https://code.google.com/p/coderjournal/source/browse/trunk/Posts/2010/03/CassandraDemo.cs" target="_blank">here</a>:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:dcf3983b-5d5c-47c1-9a38-87d2f1c6530c" class="wlWriterEditableSmartContent">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; ">System.Text.Encoding utf8Encoding = System.Text.Encoding.UTF8;
long timeStamp = DateTime.Now.Millisecond; 

ColumnPath nameColumnPath = new ColumnPath()
	{
		Column_family = &quot;Posts&quot;,
		Column = utf8Encoding.GetBytes(&quot;name&quot;)
	}; 

//Insert the data into the column 'name'
client.insert(&quot;Blog&quot;,
	&quot;first-blog-post&quot;,
	nameColumnPath,
	utf8Encoding.GetBytes(&quot;Ronald Widha&quot;),
	timeStamp,
	ConsistencyLevel.ONE); </pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<h3>A cleaner solution: FluentCassandra</h3>
<p>Alternatively, one could use <a href="http://github.com/managedfusion/fluentcassandra" target="_blank">FluentCassandra</a>. This eliminates the need of using the generated Cassandra interface (which may become obsolete should the a new version of Cassandra is released and using a newer version of Thrift protocol), or even the need to run Thrift executable.</p>
<p><em>I haven’t looked at the implementation of FluentCassandra yet, so I don’t know how easy it would be to support future versions of the Thrift protocol.</em></p>
<p>The same code above could then be re-implemented like the following:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:d43b5500-3978-406e-9fcc-ae784c754236" class="wlWriterEditableSmartContent">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; ">var family = db.GetColumnFamily&lt;UTF8Type, UTF8Type&gt;(&quot;Posts&quot;);

dynamic post = family.CreateRecord(key: &quot;first-blog-post&quot;);

// create post details
dynamic postDetails = post.CreateSuperColumn();
postDetails.name = &quot;Ronald Widha&quot;;

db.Attach(post);
db.SaveChanges();</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>I got the sample code working using Apache Cassandra 0.6.2 and FluentCassandra 2010-06-22.</p>
<p>*All code shown here are modified from <a href="http://twitter.com/nberardi/" target="_blank">Nick Berardi’s</a> example posted in <a href="http://coderjournal.com/" target="_blank">coderjournal</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/06/23/running-cassandra-on-windows-first-attempt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resources on Apache Cassandra for the .Net devs</title>
		<link>http://www.ronaldwidha.net/2010/06/22/resources-on-apache-cassandra-for-net-devs/</link>
		<comments>http://www.ronaldwidha.net/2010/06/22/resources-on-apache-cassandra-for-net-devs/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 12:37:43 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[Nick Berardi]]></category>
		<category><![CDATA[Thrift]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/06/22/resources-on-apache-cassandra-for-net-devs/</guid>
		<description><![CDATA[ 
I’ve been playing around with MongoDB, a no SQL database just like Facebook’s Cassandra. This morning I heard about Nick Berardi’s posts about running Cassandra on Windows and decided to do some reading on it.
In the process I’ve found some useful links

Download latest stable release of Apache Cassandra
Cassandra jump start for the Windows developer, [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/image8.png" width="300" height="89" /> </p>
<p>I’ve been playing around with <a href="http://www.mongodb.org/" target="_blank">MongoDB</a>, a no SQL database just like Facebook’s <a href="http://cassandra.apache.org/" target="_blank">Cassandra</a>. <a href="http://channel9.msdn.com/shows/This+Week+On+Channel+9/TWC9-Kinect-OData-Cassandra-library--TechEd-Sessions-now-available/" target="_blank">This morning</a> I heard about <a href="http://twitter.com/nberardi" target="_blank">Nick Berardi</a>’s posts about running Cassandra on Windows and decided to do some reading on it.</p>
<p>In the process I’ve found some useful links</p>
<ul>
<li>Download <a href="http://cassandra.apache.org/download/" target="_blank">latest stable release of Apache Cassandra</a></li>
<li><a href="http://coderjournal.com/2010/03/cassandra-jump-start-for-the-windows-developer/" target="_blank">Cassandra jump start for the Windows developer</a>, which covers the installation and configuration steps</li>
</ul>
<p>At this point I realize “yikes, do I have to have the terminal window open to run Cassandra”. Upon quick search I found another Nick’s excellent post:</p>
<ul>
<li><a href="http://coderjournal.com/2010/06/run-cassandra-as-a-windows-service/" target="_blank">Running Cassandra as a Windows service</a></li>
</ul>
<p>While I’ve got those 2 projects downloading on the background, I just realize the <a href="https://code.google.com/p/coderjournal/source/browse/trunk/Posts/2010/03/CassandraDemo.cs" target="_blank">C# code needed to connect to Cassandra (through an intermediary service called Thrift)</a>looks quite ugly.</p>
<p>And I found Nick’s Fluent Cassandra project:</p>
<ul>
<li><a href="http://coderjournal.com/2010/06/your-first-fluent-cassandra-application/" target="_blank">First Fluent Cassandra Application part 1</a></li>
<li><a href="http://coderjournal.com/2010/06/your-first-fluent-cassandra-application-part-2/" target="_blank">First Fluent Cassandra Application part 2</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/06/22/resources-on-apache-cassandra-for-net-devs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iOS4 or WP7 ’live tile’?</title>
		<link>http://www.ronaldwidha.net/2010/06/08/ios4-or-wp7-live-tile/</link>
		<comments>http://www.ronaldwidha.net/2010/06/08/ios4-or-wp7-live-tile/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 09:00:00 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iOS4]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[metro UI]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/06/08/ios4-or-wp7-live-tile/</guid>
		<description><![CDATA[ 
Which one do you like better the iOS4 icons or WP7 Metro UI &#8211; panoramic ‘live tile’?
]]></description>
			<content:encoded><![CDATA[<p align="center"><a href="http://www.ronaldwidha.net/wp-content/uploads/2010/06/iphone4livetile.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="iphone4-livetile" border="0" alt="iphone4-livetile" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/iphone4livetile_thumb.jpg" width="370" height="391" /></a> </p>
<p align="center">Which one do you like better the <em>iOS4</em> icons or <em>WP7 Metro UI &#8211; </em>panoramic ‘live tile’?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/06/08/ios4-or-wp7-live-tile/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My thoughts on Facebook privacy issue</title>
		<link>http://www.ronaldwidha.net/2010/06/02/my-thoughts-on-facebook-privacy-issue/</link>
		<comments>http://www.ronaldwidha.net/2010/06/02/my-thoughts-on-facebook-privacy-issue/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 09:00:00 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[opengraph]]></category>
		<category><![CDATA[pandora]]></category>
		<category><![CDATA[privacy concerns]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/06/02/my-thoughts-on-facebook-privacy-issue/</guid>
		<description><![CDATA[
These last couple of days, I feel like I’ve been bombarded with editorial content pressuring people on becoming a Ghost user, deactivating and even quitting Facebook altogether.
The general concern seem to be at 2 levels: firstly, privacy settings on facebook is getting complicated, leaving most people in the dark. Combined with the fact that the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="facebook_ghost" border="0" alt="facebook_ghost" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/facebook_ghost.jpg" width="200" height="229" /></p>
<p>These last couple of days, I feel like I’ve been bombarded with editorial content pressuring people on becoming a <a href="http://calacanis.com/2010/05/21/my-facebook-profile-is-now-a-protest-encouraging-you-to-become-a-facebook-ghost/" target="_blank">Ghost user</a>, deactivating and even <a href="http://www.quitfacebookday.com/" target="_blank">quitting Facebook</a> altogether.</p>
<p>The general concern seem to be at 2 levels: firstly, privacy settings on facebook is getting complicated, leaving most people in the dark. Combined with the fact that the default value is so open to the public, most people don’t know anymore what they’re sharing publicly.</p>
<p>Secondly, there’s a growing privacy concern about the fact that Facebook is starting to share its data through the OpenGraph API and also partnership like <a href="http://www.pandora.com/" target="_blank">Pandora</a> and <a href="http://docs.com/" target="_blank">Docs</a>.</p>
<h2>I <em>heart</em> knobs</h2>
<p>I actually thought the granular privacy settings was awesome, <a href="http://www.ronaldwidha.net/2009/09/23/open-letter-to-facebook-fb-should-support-selective-status-update/" target="_blank">and left wanting more</a>. Being able to set up what you want to share per person, list, network, is like an IT admin way of configuring role/group based authorization and permissions. These are the thing that us as developers have to deal day in day out: data normalization, categorization, tagging and how we use it.</p>
<p>Imagine having the control of configuring to share my private statuses with the people I care about, my ‘Family’ list and ‘Close Friends’ list, unless if these people are also listed under ‘Work’.</p>
<p>I love having the ability to configure to share photos from work to everyone, including people from the office’s network.</p>
<p>I love it and I want more control!</p>
<p align="center"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/image4.png" width="302" height="188" /> don’t know about you, but I actually like having all these knobs to tweak!</p>
<h2></h2>
<h2>OpenGraph and sharing Social Data</h2>
<p>The same applies to the OpenGraph initiative and FB’s vision on sharing social data. I agree with FB’s vision to leverage all my <em>investment </em>on Facebook. I’ve added people that I know personally, curated the ones that I know online, tag, categorize them into lists, and set up shares and permissions around them. Not a small investment to make!</p>
<p>Applications like <a href="http://foursquare.com" target="_blank">Foursquare</a> should stick to location based services, <a href="http://flickr.com" target="_blank">Flickr</a> should stick to organizing photos. These apps should leverage all my lists, my behaviors, my likes to create a better experience for me.</p>
<p>What I care though is control and ownership. I want to be clear what I’m sharing with each one of these services. I want to also make sure that I own these data and can choose to opt out if I no longer feel comfortable for one reason or the other. This is something that Facebook doesn’t do well (at least…yet).</p>
<p align="center"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/image5.png" width="302" height="191" /></p>
<p align="center">My My profile preview as seen by Dad&#160; <br />I want this kind of preview with data shared with other sites</p>
<h2></h2>
<h2>Facebook still need to listen ..</h2>
<p>I won’t quit Facebook, but I still wish Facebook would listen the outcry.</p>
<p>I appreciate the fact that not everyone has an IT flare in them. Try to do a search on <a href="http://youropenbook.org/?q=%22skipping+work%22&amp;x=0&amp;y=0&amp;gender=any" target="_blank">YourOpenBook.org “skipping work”</a> and you will know what I mean. Facebook need to cater to these people. They’re (<em>probably</em> ) the majority of FB users.</p>
<p align="center"><a href="http://youropenbook.org/proposal.html#1"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/06/image6.png" width="242" height="231" /></a><a href="http://youropenbook.org/proposal.html#1" target="_blank">YourOpenBook.org proposal how privacy settings should be.</a>&#160;</p>
<p><strong>I want Facebook to be simple to most users, and continue on providing the high degree of controls for the likes of me.</strong></p>
<p>However, Facebook need to always put the casual users interest at best, because <em>some </em>of these people are the reason to why I use facebook in the first place.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/06/02/my-thoughts-on-facebook-privacy-issue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>a simple example of the WebFormsMVP Cross Presenter Messaging</title>
		<link>http://www.ronaldwidha.net/2010/05/31/a-simple-example-of-the-webformsmvp-cross-presenter-messaging/</link>
		<comments>http://www.ronaldwidha.net/2010/05/31/a-simple-example-of-the-webformsmvp-cross-presenter-messaging/#comments</comments>
		<pubDate>Mon, 31 May 2010 10:31:14 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[asp.net webform]]></category>
		<category><![CDATA[cross presenter messaging]]></category>
		<category><![CDATA[message bus]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[WebForms MVP]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/?p=528</guid>
		<description><![CDATA[In my last post, I covered the basics of WebFormsMVP framework. On this post, I want to talk about a feature of the framework that I really really fall in love with: Cross Presenter Messaging.
The Problem: communications between controls

Because of the compositional nature of WebForm, we tend to build functionalities in web/custom controls. All are [...]]]></description>
			<content:encoded><![CDATA[<p>In my last post, I covered <a href="http://www.ronaldwidha.net/2010/05/30/model-view-presenter-on-asp-net-using-webformsmvp-framework/" target="_blank">the basics of WebFormsMVP framework</a>. On this post, I want to talk about a feature of the framework that I really really fall in love with: Cross Presenter Messaging.</p>
<h2>The Problem: communications between controls</h2>
<p style="text-align: center;"><img class="aligncenter" style="display: inline; border-width: 0px;" title="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/05/image11.png" border="0" alt="image" width="400" height="288" /></p>
<p>Because of the compositional nature of WebForm, we tend to build functionalities in web/custom controls. All are nice and well until some of these controls need to pass data between each other, then it gets complicated really fast.</p>
<p>The complexities come from the fact that we often rely on some piece of data fetched by some control at some point in time in the past to be used by another control at a different point in time. May not be too hard, but it’s really not a nice problem to solve, and often leave us scratching our head “do we put this onPreInit, PageLoad, onDataBind or where??”.</p>
<h2>The Solution: Message Bus</h2>
<p style="text-align: center;"><img class="aligncenter" style="display: inline; border-width: 0px;" title="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/05/image12.png" border="0" alt="image" width="380" height="256" /></p>
<p>The Webforms MVP framework introduce a concept of Message Bus which allows each of the Presenters (thus Controls) to publish and subscribe messages.</p>
<p>You may ask “okay, you can publish and subscribe. What difference does it make between storing the message in the viewstate, query strings or even doing a direct set on to the property of a control. You’d still need to work out the order to which the message can be passed, right?”.</p>
<p>No. The beauty of the message bus is it coordinates the publishing of the messages quite efficiently. The algorithm is simple:</p>
<blockquote><p>Anytime a message is published, the message will be sent to all its subscribers.<br />
If a new subscriber just joined in, it will get all the previous messages.</p></blockquote>
<p>Simple but very effective! By using the message bus we decouple each of the presenters and all communication will go through the message bus.</p>
<h2>Example: Ultimate Fighting Controls</h2>
<p align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="451" height="338" 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://vimeo.com/moogaloop.swf?clip_id=12194304&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="451" height="338" src="http://vimeo.com/moogaloop.swf?clip_id=12194304&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The example shows two controls sending messages between each other through the message bus. The essence of the examples are really just these two lines:</p>
<div id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:29a53eaa-0123-40a2-b4d6-ed41afe5b737" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; ">Messages.Subscribe&lt;PunchMessage&gt;(punch =&gt; View.Model.Status = GetStatus(punch));</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>This line shows that the Presenter subscribes to any messages of type ‘PunchMessage’ and execute a callback function for every message that fits the criteria.</p>
<div id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:7c5df3a4-4ac8-42ad-9f87-f2d422c01927" class="wlWriterEditableSmartContent" style="margin: 0px; display: inline; float: none; padding: 0px;">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; ">Messages.Publish(new PunchMessage(e.Puncher));</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>This line is to publish a message with some parameters read from the button click eventargs.</p>
<p>Isn’t that awesome?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/05/31/a-simple-example-of-the-webformsmvp-cross-presenter-messaging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Model View Presenter on Asp.Net using WebFormsMVP framework</title>
		<link>http://www.ronaldwidha.net/2010/05/30/model-view-presenter-on-asp-net-using-webformsmvp-framework/</link>
		<comments>http://www.ronaldwidha.net/2010/05/30/model-view-presenter-on-asp-net-using-webformsmvp-framework/#comments</comments>
		<pubDate>Sun, 30 May 2010 15:53:28 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Model View Controller]]></category>
		<category><![CDATA[Model View Presenter]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVP]]></category>
		<category><![CDATA[WebForms MVP]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/?p=518</guid>
		<description><![CDATA[
Slightly more than a year ago, I wrote two posts on opting for MVC pattern on Asp.net Webform (Asp.Net MVC without using ‘the framework part1 and part 2: a good example of unit testing). A few months ago, I heard about Tatham Oddie’s project WebForms MVP, which until yesterday I totally forgot about. All thanks [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/05/image9.png" width="400" height="133" /></p>
<p>Slightly more than a year ago, I wrote two posts on opting for MVC pattern on Asp.net Webform (<a href="http://www.ronaldwidha.net/2008/06/11/aspnet-mvc-without-using-the-framework-part-1/" target="_blank">Asp.Net MVC without using ‘the framework part1</a> and <a href="http://www.ronaldwidha.net/2009/03/22/aspnet-mvc-without-the-framework-part-2-a-good-example-of-unit-testing/" target="_blank">part 2: a good example of unit testing</a>). A few months ago, I heard about Tatham Oddie’s project <a href="http://webformsmvp.com" target="_blank">WebForms MVP</a>, which until yesterday I totally forgot about. All thanks to <a href="http://twitter.com/mosessaur" target="_blank">@mosessaur</a>’s tweet, I decided to have a quick look at it and really loving it!</p>
<h2>The View: Webform as a template engine</h2>
<p>Asp.Net Webform is designed to be a Smart UI platform. What that means, it more than just layout engine&#8230;alot more! Just look at controls such as <em>ObjectDataSource</em>, <em>UpdatePanel </em>or any other <em>Asp.Net Ajax Control Toolkit controls, </em>they are much richer than just UI elements but also dictate behaviors.</p>
<p>In the WebFormsMVP framework, Asp.Net Webform is meant to be used as just a templating engine. I’m not saying that you can’t, but better not to unless if you have strong reasons (such as using ready made controls etc). The goal is to push as much smartness to the presenters.</p>
<p>The view then becomes really simple.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:793bc938-9061-4826-b769-30f0f078bd36" class="wlWriterSmartContent">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; ">&lt;form id=&quot;Form1&quot; runat=&quot;server&quot;&gt;
  &lt;% // Model is a strong type property bag for the data binded to the view %&gt;
  &lt;%= Model.Owner %&gt;
  &lt;%= Model.Description %&gt;
&lt;/form&gt;</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p>If you look at the Default.aspx code above, it looks similar to what classic Asp or Asp.Net MVC view would look like. What’s worth noting is the property <em>Model </em>which is a property bag to access the model binded to this view (popularly known as View Model).</p>
<p>The type of the property <em>Model </em>is defined through Generics in the base class of the page. So in the code behind we will have the following:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:0e631405-8ec8-429e-a2cf-df8334b9a6f5" class="wlWriterSmartContent">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; "> public partial class Default : MvpPage&lt;WorkModel&gt;
 {
     protected void Page_Load(object sender, EventArgs e)
     {
     }
 }</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<p><em>MvpPage</em> and <em>MvpUserControl</em> base classes are a part of the WebFormsMVP framework and takes a type of T.&#160; The WorkModel&#160; in this case contains the <em>.Owner </em>and <em>.Description </em>properties.</p>
<p>Also note that the code behind is practically empty (in a slightly more complex – real life scenario, code behind will contains event propagation: button has just been clicked, etc)</p>
<h2>The Presenter listens to the View</h2>
<p><a href="http://www.ronaldwidha.net/2009/03/19/difference-between-model-view-presenter-and-model-view-controller/" target="_blank"><img alt="" src="http://www.ronaldwidha.net/wp-content/uploads/2009/06/mvc-mvp-difference-mvp.gif" width="347" height="223" /></a></p>
<p>Model View Controller prescribes that the controller should be the first class citizen in responding to any requests.&#160; However, in Model View Presenter, the <strong>View </strong>takes on this responsibility. The view propagates the events to the Presenter. Presenter will decide what need to happen next (read more: <a href="http://www.ronaldwidha.net/2009/03/19/difference-between-model-view-presenter-and-model-view-controller/" target="_blank">Difference between MVP and MVC</a>).</p>
<p>Therefore you will have the following Presenter class. Notice how in the constructor we subscribe to the View’s Load event and react upon it.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:5406be1f-8c6f-4382-885c-0b654706580f" class="wlWriterSmartContent">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; "> // notice the base class which takes the T of the view
 public class DefaultPresenter : Presenter&lt;IView&lt;WorkModel&gt;&gt;
 {
     // required constructor by the base class
     public DefaultPresenter(IView&lt;WorkModel&gt; view) : base(view)
     {
         // subscribe to the view's events :
         // in this case the Load event
         View.Load += View_Load;
     }

     // required method by the base class
     public override void ReleaseView()
     {
         // clean up the delegate by detaching it
         View.Load -= View_Load;
     }

     // the core logic of the app where the Model is instantiated, fetched
     // and binded to the view
     private void View_Load(object sender, EventArgs e)
     {
         View.Model.Owner = &quot;Ron&quot;;
         View.Model.Description = &quot;to blog about WebFormMVP&quot;;
     }
 }</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<h2>Presenter and View binding</h2>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/05/image10.png" width="400" height="193" /></p>
<p>There are 4 different ways of binding, 2 of which I have little knowledge about. So let me explain to you the two that I know:</p>
<ol>
<li><strong>Convention &#8211; </strong>By default, the WebFormsMVP framework look for the Presenter class with the same type name as the View (with the word ‘Presenter’ as the suffix). <a href="http://wiki.webformsmvp.com/index.php?title=Presenter_Discovery" target="_blank">It also tries to find it in different namespaces</a>.
<p>for e.g view with type <em>Default</em> will be looking for a class called <em>DefaultPresenter</em></p>
</li>
<li><strong>Attributes &#8211; </strong>I could also explicitly map the View to the Presenter by using an attribute like so: </li>
</ol>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:DFDE9937-D816-47f4-A306-7B60D5CE5AC0:325e9212-83f7-4ba6-95d0-8a5e394a537d" class="wlWriterSmartContent">
<pre class="brush: csharp; gutter: true; first-line: 1; tab-size: 2;  toolbar: true; ">[PresenterBinding(typeof(DefaultPresenter), ViewType = typeof(IView&lt;WorkModel&gt;))]</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></p>
</div>
<h2>Conclusion</h2>
<p>WebFormMVP framework allows nice clean separation just like Asp.Net MVC without necessarily throwing away all our investment on web controls. We get the productivity from the compositional nature of web controls when we need it, and still get the clean separation of the MVP pattern – without as much work as doing everything yourself.</p>
<p>Once we start looking into Cross Presenter Messaging, things will get even more interesting. I bet you that this very feature will get rid of the complexity of the usual page life cycle.</p>
<p>Let me support that argument: alot of times, asp.net page lifecycle becomes an issue when we’re dealing with controls having to rely on data that is fetched by another control and not being ready at a particular stage in a page lifecycle. Cross Presenter Messaging will eliminate the problem by providing a publisher/subscriber mechanism to pass around data between all these web controls without having too much knowledge of the inner mechanics of how they individually work. More on that later.</p>
<p>I used Asp.Net 4.0 with WebFormsMVP CTP 7</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/05/30/model-view-presenter-on-asp-net-using-webformsmvp-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What’s eating up my harddrive space?</title>
		<link>http://www.ronaldwidha.net/2010/05/27/whats-eating-up-my-harddrive-space/</link>
		<comments>http://www.ronaldwidha.net/2010/05/27/whats-eating-up-my-harddrive-space/#comments</comments>
		<pubDate>Thu, 27 May 2010 19:13:03 +0000</pubDate>
		<dc:creator>Ronald Widha</dc:creator>
				<category><![CDATA[Opinions]]></category>
		<category><![CDATA[DiskPie2]]></category>
		<category><![CDATA[Harddrive]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windirstat]]></category>

		<guid isPermaLink="false">http://www.ronaldwidha.net/2010/05/27/whats-eating-up-my-harddrive-space/</guid>
		<description><![CDATA[Windirstat
 The thing with Vista and Win7; it seems the free amount of harddrive space left exponentially&#160; depleting as soon as it reaches less than 5% of its overall capacity. Not sure if it’s because of superfetch, or some other app that’s causing it. But I have this issue more than once now. 
Anyways, I [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="windirstat" border="0" alt="windirstat" src="http://www.ronaldwidha.net/wp-content/uploads/2010/05/windirstat.jpg" width="452" height="274" /><a href="http://windirstat.info/" target="_blank">Windirstat</a></p>
<p align="left"> The thing with Vista and Win7; it seems the free amount of harddrive space left exponentially&#160; depleting as soon as it reaches less than 5% of its overall capacity. Not sure if it’s because of superfetch, or some other app that’s causing it. But I have this issue more than once now. </p>
<p align="left">Anyways, I need to free up my harddrive and not just by 10s GB. I need serious cleaning up! I’ve been always using my trusty PC Mag DiskPie2 to check which folder worth the attention. What I don’t realize, this pre ntfs disk tool does not recognize &gt;4GB file.</p>
<p align="center"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.ronaldwidha.net/wp-content/uploads/2010/05/image8.png" width="202" height="106" /><a href="http://www.pcmag.com/article2/0,2817,1614586,00.asp" target="_blank">DiskPie2</a></p>
<p>Here comes Windirstat. With data visualization that looks like NDepend, it comes and save the day. Upon loading up I suddenly realize that <a href="http://calibre-ebook.com/" target="_blank">Calibre</a> produced a 150GB html file while trying to convert a pdf to an epub file so I can read it on the IPad.</p>
<p>Similar app is also available on the Mac OSX: <a href="http://www.derlien.com/" target="_blank">Disk Inventory X</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ronaldwidha.net/2010/05/27/whats-eating-up-my-harddrive-space/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
