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

<channel>
	<title>.Net &#38; Learning Curves</title>
	<atom:link href="http://dotnet.robertmao.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dotnet.robertmao.com</link>
	<description>Life long learning on .Net, C#, ASP.Net, Javascript and more...</description>
	<pubDate>Sun, 27 Jul 2008 22:10:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>To &#8220;refresh&#8221; a SqlDataSource.</title>
		<link>http://dotnet.robertmao.com/2008/07/27/to-refresh-a-sqldatasource/</link>
		<comments>http://dotnet.robertmao.com/2008/07/27/to-refresh-a-sqldatasource/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 22:10:05 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Learning notes]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/?p=56</guid>
		<description><![CDATA[

I am trying to &#8220;refresh&#8221; a SqlDataSource in a postback action.  The basic idea is, user change some setting (which passed as paramters to the SqlDataSource) and need to &#8220;refresh&#8221; the query result. I was though to call some method in SqlDataSource but eventually I found the simplest way (maybe not that efficient) is call [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>I am trying to &#8220;refresh&#8221; a SqlDataSource in a postback action.  The basic idea is, user change some setting (which passed as paramters to the SqlDataSource) and need to &#8220;refresh&#8221; the query result. I was though to call some method in SqlDataSource but eventually I found the simplest way (maybe not that efficient) is call the object who have databinding with SqlDataSource&#8217;s DataBin() again.</p>
<p>e.g.</p>
<p>protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
RadChart1.DataBind();<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/07/27/to-refresh-a-sqldatasource/feed/</wfw:commentRss>
		</item>
		<item>
		<title>asp:ControlParameter vs asp:FormParameter</title>
		<link>http://dotnet.robertmao.com/2008/07/27/aspcontrolparameter-vs-aspformparameter/</link>
		<comments>http://dotnet.robertmao.com/2008/07/27/aspcontrolparameter-vs-aspformparameter/#comments</comments>
		<pubDate>Sun, 27 Jul 2008 22:06:24 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Learning notes]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/?p=55</guid>
		<description><![CDATA[

I got stucked on ASP.Net&#8217;s SqlDataSource&#8217;s parameters for quite a long time.  The problem is I am always trying to use aspFormParamter in a postback, there are quite a few samples in the Internet, but most of them are simple aspx page without masterpage. In my project I used masterpage, it looks like for some [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>I got stucked on ASP.Net&#8217;s SqlDataSource&#8217;s parameters for quite a long time.  The problem is I am always trying to use aspFormParamter in a postback, there are quite a few samples in the Internet, but most of them are simple aspx page without masterpage. In my project I used masterpage, it looks like for some reason it doesn&#8217;t work well.</p>
<p>Fortunately, after I changed to asp:ControlParameter, it works great.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/07/27/aspcontrolparameter-vs-aspformparameter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>output a line in a batch *without* crlf</title>
		<link>http://dotnet.robertmao.com/2008/07/05/output-a-line-in-a-batch-without-crlf/</link>
		<comments>http://dotnet.robertmao.com/2008/07/05/output-a-line-in-a-batch-without-crlf/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 21:38:01 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/07/05/output-a-line-in-a-batch-without-crlf/</guid>
		<description><![CDATA[

Learned from here: Progressive Dots, this is a MSFTer who developing LiveMesh. 
set /p CRLF=.&#60;NUL

try this in command window, you will get a &#8221;.&#34; output.&#160; &#34;set /p&#34; is used for get a input with a specified prompt, &#34;&#60;NUL&#34; make it return immediately, so &#34;set /p CRLP=.&#60;NUL&#34; generate a dot without carriage return. 
It&#8217;s a good [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Learned from here: <a href="http://devduck.spaces.live.com/blog/cns%2115D0C43F1C8E7753%21390.entry">Progressive Dots</a>, this is a MSFTer who developing LiveMesh. </p>
<blockquote><p>set /p CRLF=.&lt;NUL</p>
</blockquote>
<p>try this in command window, you will get a &#8221;.&quot; output.&#160; &quot;<em>set /p</em>&quot; is used for get a input with a specified prompt, &quot;<em>&lt;NUL</em>&quot; make it return immediately, so &quot;<em>set /p CRLP=.&lt;NUL</em>&quot; generate a dot without carriage return. </p>
<p>It&#8217;s a good trick, but as always, I hate .BAT files&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/07/05/output-a-line-in-a-batch-without-crlf/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A page which crash Firefox 3.0</title>
		<link>http://dotnet.robertmao.com/2008/06/17/a-page-which-crash-firefox-30/</link>
		<comments>http://dotnet.robertmao.com/2008/06/17/a-page-which-crash-firefox-30/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 23:14:44 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/06/17/a-page-which-crash-firefox-30/</guid>
		<description><![CDATA[

Just downloaded Firefox 3.0 and found this URL will make it crash: 
http://www.nikhilk.net/entry.aspx?id=198
Looks like it crashed in Javascript execution&#8230;
updated: looks like because of silverlight?
]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Just downloaded Firefox 3.0 and found this URL will make it crash: </p>
<p><a title="http://www.nikhilk.net/entry.aspx?id=198" href="http://www.nikhilk.net/entry.aspx?id=198">http://www.nikhilk.net/entry.aspx?id=198</a></p>
<p>Looks like it crashed in Javascript execution&#8230;</p>
<p><strong>updated:</strong> looks like because of silverlight?</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/06/17/a-page-which-crash-firefox-30/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Write code with no getters???</title>
		<link>http://dotnet.robertmao.com/2008/06/17/write-code-with-no-getters/</link>
		<comments>http://dotnet.robertmao.com/2008/06/17/write-code-with-no-getters/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 22:53:41 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/06/17/write-code-with-no-getters/</guid>
		<description><![CDATA[

One of my friends shared a blog post to me, at first it looks like quite a good practice, however after I read and think over I feel I am quite disagree with this guy. It’s a quite interesting debate, I am wondering if you guys like it or have your opinions. 
In this blog [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>One of my friends shared a blog post to me, at first it looks like quite a good practice, however after I read and think over I feel I am quite disagree with this guy. It’s a quite interesting debate, I am wondering if you guys like it or have your opinions. </p>
<p>In this blog (<a href="http://michaelfeathers.typepad.com/michael_feathers_blog/2008/06/the-flawed-theo.html">http://michaelfeathers.typepad.com/michael_feathers_blog/2008/06/the-flawed-theo.html</a> ), someone tell a story that write code without setter will have great benefit for TDD: </p>
<blockquote><p>“John Nolan, gave his developers a challenge: <strong>write OO code with no getters</strong>. Whenever possible, tell another object to do something rather than ask. In the process of doing this, they noticed that their code became supple and easy to change. They also noticed that the fake objects that they were writing were highly repetitive, so they came up with the idea of a mocking framework that would allow them to set expectations on objects - mock objects.”</p>
</blockquote>
<p>Someone(<a href="http://peripateticaxiom.blogspot.com/2008/06/tdd-mocks-and-design.html">http://peripateticaxiom.blogspot.com/2008/06/tdd-mocks-and-design.html</a> ) extended his idea and provided a code sample: </p>
<blockquote><p>“Suppose that we want to print a value that some object can provide. Rather than writing something like <code>statement.append(account.getTransactions())</code> instead we would write something more like <code>account.appendTransactionTo(statement)</code> We can test this easily by passing in a mocked statement that expects to have a call like <code>append(transaction)</code> made. Code written this way does turn out to be more flexible, easier to maintain and also, I submit, easier to read and understand. (Partly because) This style lends itself well to the use of <a href="http://c2.com/cgi/wiki?IntentionRevealingNames">Intention Revealing Names</a>.”</p>
</blockquote>
<p>Those idea looks great at the first sight, but at least for me I complete can’t agree with the second guy, I feel what he *<b>suggested</b>* is what I will *<b>avoid</b>*. Maybe he just gave a bad sample, however from his blog’s long debate it looks like he is quite confident with his idea. </p>
<p>Reference reading: </p>
<p><b></b></p>
<p>Getter/Setter debate: <a href="http://moffdub.wordpress.com/2008/06/16/the-getter-setter-debate/">http://moffdub.wordpress.com/2008/06/16/the-getter-setter-debate/</a></p>
<p>Getter Eradicator: <a href="http://martinfowler.com/bliki/GetterEradicator.html">http://martinfowler.com/bliki/GetterEradicator.html</a></p>
<p>Why getter/setter are evil: <a href="http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html">http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html</a></p>
<p>Doing it wrong: getters &amp; setters: <a href="http://typicalprogrammer.com/?p=23">http://typicalprogrammer.com/?p=23</a></p>
<p>&#8211;</p>
<p>I would like to hear your opinions&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/06/17/write-code-with-no-getters/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dump SQL Server Express&#8217; DB Schema</title>
		<link>http://dotnet.robertmao.com/2008/06/04/dump-sql-server-express-db-schema/</link>
		<comments>http://dotnet.robertmao.com/2008/06/04/dump-sql-server-express-db-schema/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 14:32:27 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/06/04/dump-sql-server-express-db-schema/</guid>
		<description><![CDATA[

I am quite feeling lost since SQL Server 2005, SQL Server Express don&#8217;t come with the &#34;Enterprise manager&#34; any more&#8230; I used to do many stuff under that Enterprise manager for SQL Server 2000 before. 
One simple task I need to do is dump my database schema and transfer to another server, I can easily [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>I am quite feeling lost since SQL Server 2005, SQL Server Express don&#8217;t come with the &quot;Enterprise manager&quot; any more&#8230; I used to do many stuff under that Enterprise manager for SQL Server 2000 before. </p>
<p>One simple task I need to do is dump my database schema and transfer to another server, I can easily do that before in Enterprise manager, now I don&#8217;t even know hot to dump and generate the SQL statement&#8230; fortunately I found this tool: </p>
<p><a title="http://www.codeplex.com/sqlhost" href="http://www.codeplex.com/sqlhost">http://www.codeplex.com/sqlhost</a></p>
<blockquote><h5>Database Publishing Wizard </h5>
<p><b><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=56E5B1C5-BF17-42E0-A410-371A838E570A">Download the Current Release (1.1)</a></b></p>
<p><a href="http://www.codeplex.com/sqlhost/Wiki/View.aspx?title=Localized%20versions%20of%201.1&amp;referringTitle=Database%20Publishing%20Wizard">Localized versions of 1.1</a></p>
<p>The Database Publishing Wizard enables the deployment of SQL Server 2005 databases (both schema and data) into a shared hosting environment on either a SQL Server 2000 or 2005 server.      <br />The tool supports two modes of deployment:</p>
<ol>
<li>It generates a single SQL script file which can be used to recreate a database when the only connectivity to a server is through a web-based control panel with a script execution window. </li>
<li>It connects to a web service provided by your hoster and directly creates objects on a specified hosted database </li>
</ol>
<p>The Database Publishing Wizard provide both a graphical and a command-line interface. In addition, it can integrate directly into Visual Studio 2005 or Visual Web Developer 2005.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/06/04/dump-sql-server-express-db-schema/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My suggestions on Web2py&#8217;s route design</title>
		<link>http://dotnet.robertmao.com/2008/06/03/my-suggestions-on-web2pys-route-design/</link>
		<comments>http://dotnet.robertmao.com/2008/06/03/my-suggestions-on-web2pys-route-design/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 23:34:54 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/06/03/my-suggestions-on-web2pys-route-design/</guid>
		<description><![CDATA[


Learning web2py, it&#8217;s an excellent yet young python web framework, I just wrote a few suggestions in the dev group: (route to controllers- Some idea may take from ASP.NET MVC&#8217;s design)
I am learning web2py and very new to Python, so I could be wrong or I am not yet understand Massimo Di Pierro&#8217;s principles, just [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
</p>
<p>Learning <a href="http://web2py.com/">web2py</a>, it&#8217;s an excellent yet young python web framework, I just wrote a few suggestions in the dev group: (<a title="route to controllers- Some idea may take from ASP.NET MVC&#39;s design" href="http://groups.google.com/group/web2py/t/ae76852c30ac3c73">route to controllers- Some idea may take from ASP.NET MVC&#8217;s design</a>)</p>
<blockquote><p>I am learning web2py and very new to Python, so I could be wrong or I am not yet understand Massimo Di Pierro&#8217;s principles, just some opinions for discuss.&#160; </p>
<p>Looks like the URL rules&#160; /[applicaiton]/[controller]/[function]&#160; is hard coded, I saw the code in main.py (lines near 140) : </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; request.application=items[0]      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; request.controller=items[1]       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; request.function=items[2] </p>
<p>And also I found /static/&#8230; is hard coded as well. </p>
<p>Yes, with rewrite.py(route.py), we can rewrite any URL in this format and rewrite any this kind of URL to whatever we want. However there maybe some design which could be more flexible and yet keep CoC in good shape. </p>
<p>Look at the latest Microsoft ASP.NET MVC (now in preview 3, you can read this blog <a href="http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx">http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx</a> to get some general idea), it also have a route mapping mechanism, you can write your rule to define which part means &quot;controller&quot; which part means &quot;action&quot;, if you read the blog post I give, in the end part it introduced the route. </p>
<p>Something interesting is, that new added route part is NOT a part of ASP.NET MVC framework, it&#8217;s actually useful for some other senarios, e.g. new release ASP.NET dynamic data applications(ASP.NET&#8217;s answer to scaffold) </p>
<p>My points is, a more flexible routing mechanism could make the architect looks better and more flexible and you won&#8217;t need to give up the compatibility and CoC principle. </p>
<p>ASP.NET MVC&#8217;s design learned a lot from Ruby On Rails, actually RoR&#8217;s route design is also quite flexible (refere to <a href="http://manuals.rubyonrails.com/read/chapter/65)">http://manuals.rubyonrails.com/read/chapter/65)</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/06/03/my-suggestions-on-web2pys-route-design/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Good comparing of GAE Data Store .vs. Amazon Simple DB .vs. MS SSDS</title>
		<link>http://dotnet.robertmao.com/2008/06/02/good-comparing-of-gae-data-store-vs-amazon-simple-db-vs-ms-ssds/</link>
		<comments>http://dotnet.robertmao.com/2008/06/02/good-comparing-of-gae-data-store-vs-amazon-simple-db-vs-ms-ssds/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 14:42:04 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/06/02/good-comparing-of-gae-data-store-vs-amazon-simple-db-vs-ms-ssds/</guid>
		<description><![CDATA[

Found a good comparing paper on: 
Comparing Google App Engine, Amazon SimpleDB and Microsoft SQL Server Data Services
]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Found a good comparing paper on: </p>
<p><a href="http://oakleafblog.blogspot.com/2008/04/comparing-google-app-engine-amazon.html">Comparing Google App Engine, Amazon SimpleDB and Microsoft SQL Server Data Services</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/06/02/good-comparing-of-gae-data-store-vs-amazon-simple-db-vs-ms-ssds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Very good articles on MVC, MVP and more.</title>
		<link>http://dotnet.robertmao.com/2008/05/31/very-good-articles-on-mvc-mvp-and-more/</link>
		<comments>http://dotnet.robertmao.com/2008/05/31/very-good-articles-on-mvc-mvp-and-more/#comments</comments>
		<pubDate>Sat, 31 May 2008 08:56:26 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/05/31/very-good-articles-on-mvc-mvp-and-more/</guid>
		<description><![CDATA[

Very good articles on MVC, MVP and more.
Interactive Application Architecture Patterns
An Introduction to the Model-View-Controller, Model-View-Presenter, and Presentation-Abstraction-Control Patterns
]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>Very good articles on MVC, MVP and more.</p>
<h5><a href="http://ctrl-shift-b.blogspot.com/2007/08/interactive-application-architecture.html">Interactive Application Architecture Patterns</a></h5>
<p><a href="http://ctrl-shift-b.blogspot.com/2007/08/interactive-application-architecture.html">An Introduction to the Model-View-Controller, Model-View-Presenter, and Presentation-Abstraction-Control Patterns</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/05/31/very-good-articles-on-mvc-mvp-and-more/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Presenter First approach in MVP</title>
		<link>http://dotnet.robertmao.com/2008/05/28/presenter-first-approach-in-mvp/</link>
		<comments>http://dotnet.robertmao.com/2008/05/28/presenter-first-approach-in-mvp/#comments</comments>
		<pubDate>Wed, 28 May 2008 22:36:37 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
		
		<category><![CDATA[Learning notes]]></category>

		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://dotnet.robertmao.com/2008/05/28/presenter-first-approach-in-mvp/</guid>
		<description><![CDATA[

A colleague of mine recommended me a great paper to read: 
&#160;&#34;Presenter First: Organizing Complex GUI Applications for Test-Driven Development&#34;, agile, pp. 276-288, AGILE 2006 (AGILE&#8217;06), 2006.

I really like the idea in this paper, it&#8217;s practical and useful in daily development life. 
There are many articles or implementations and even courses talk about MVC or [...]]]></description>
			<content:encoded><![CDATA[
<!-- ALL ADSENSE ADS DISABLED -->
<p>A colleague of mine recommended me a great paper to read: </p>
<blockquote><p>&#160;<a href="http://atomicobject.com/files/PresenterFirstAgile2006.pdf">&quot;Presenter First: Organizing Complex GUI Applications for Test-Driven Development&quot;</a>, agile, pp. 276-288, AGILE 2006 (AGILE&#8217;06), 2006.</p>
</blockquote>
<p>I really like the idea in this paper, it&#8217;s practical and useful in daily development life. </p>
<p>There are many articles or implementations and even courses talk about MVC or MVP, but most of them only gave very simple examples for them. Yes, it&#8217;s really easy to understand or sounds clear for a simple M-V-C piece or simple M-V-P piece, however in real life, a complete application contains many Models, Views, and Controllers/Presenters, this will be much harder than a simple sample. </p>
<p>This paper give a great approach in MVP best practice, I am still learning more and will do some experiment&#160; development, but I already feel I should strongly recommend this paper. </p>
<p>More valuable links and examples, videos here: </p>
<p><a title="http://www.atomicobject.com/pages/Presenter+First" href="http://www.atomicobject.com/pages/Presenter+First">http://www.atomicobject.com/pages/Presenter+First</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dotnet.robertmao.com/2008/05/28/presenter-first-approach-in-mvp/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
