﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
  <channel>
    <title>AspNetResources.com articles, news and updates</title>
    <description>Stay tuned for AspNetResources.com updates</description>
    <link>http://aspnetresources.com</link>
    <item>
      <title>Load Testing vs. Profiling</title>
      <link>http://aspnetresources.com/blog/load_testing_vs_profiling.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/load_testing_vs_profiling.aspx</guid>
      <pubDate>Mon, 22 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;A fellow geek asked me the other day, &amp;#8220;What&amp;#8217;s your take on load testing and profiling?&amp;#8221; Incidentally, this question comes up once in a while, so I figured I&amp;#8217;d explain my position here.&lt;/p&gt;

&lt;h2&gt;Profiling&lt;/h2&gt;

&lt;p&gt;Let&amp;#8217;s &lt;a href="http://en.wikipedia.org/wiki/Software_profiling"&gt;define&lt;/a&gt; profiling first:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;A &lt;strong&gt;profiler&lt;/strong&gt; is a performance analysis tool that measures the behavior of a program as it executes, particularly the frequency and duration of function calls.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I consider profilers to be absolutely essential tools, yet they are grossly underutilized. We tend to overlook that a piece of code may be fully tested (pick your favorite xDD fad), but may turn out to contain a bottleneck. Bottlenecks are relatively rare, but where they do occur they hemorrhage resources like there&amp;#8217;s no tomorrow. Just about the only way to find it out is with the help of a profiler which will &lt;a href="http://www.jetbrains.com/profiler/features/index.html"&gt;break down the duration of each call&lt;/a&gt; to help you zero in on underperforming code.&lt;/p&gt;

&lt;p&gt;The two most established .NET profilers are JetBrain&amp;#8217;s &lt;a
href="http://www.jetbrains.com/profiler"&gt;dotTrace&lt;/a&gt; and Red Gate&amp;#8217;s &lt;a href="http://www.red-gate.com/products/ants_performance_profiler/index.htm"&gt;ANTS&lt;/a&gt;.
Both are excellent tools from two well-known vendors. My only gripe is that profilers tend to be quite expensive. Too pricey for individuals, although it seems JetBrains added a personal license. As to businesses, you have to explain long and hard why you need a profiler, but the explanation will probably fall on deaf ears of somebody in the purchasing department. Ask me how I know.&lt;/p&gt;

&lt;h2&gt;Load Testing&lt;/h2&gt;

&lt;p&gt;This is a completely different beast. &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Load testing&lt;/strong&gt; is the process of putting demand on a system or device and measuring its response. [&amp;#8230;] &lt;/p&gt;

  &lt;p&gt;When the load placed on the system is raised beyond normal usage patterns, in order to test the system&amp;#8217;s response at unusually high or peak loads, it is known as &lt;strong&gt;stress testing&lt;/strong&gt;. The load is usually so great that error conditions are the expected result, although no clear boundary exists when an activity ceases to be a load test and becomes a stress test.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The idea of load testing is to simulate heavy traffic to how the app performs under stress. Usually, you &amp;#8220;teach&amp;#8221; it to jump from one page to another by simulating an interaction with a user. The load test records the path and plays it back. &lt;/p&gt;

&lt;p&gt;My beef with this approach is that you&amp;#8217;re leading your tool down a happy path. Lucky you if you find problems there. Those are easy to fix. Unfortunately, this is not how it happens in real life.&lt;/p&gt;

&lt;p&gt;In real life the interaction doesn&amp;#8217;t happen at the same pace. It doesn&amp;#8217;t follow the &lt;em&gt;happy path&lt;/em&gt;. Users will come up with a combination of steps you couldn&amp;#8217;t even imagine. It&amp;#8217;s impossible to teach a load testing tool what we don&amp;#8217;t know!&lt;/p&gt;

&lt;p&gt;Load testing has any meaning only if you can answer this seemingly simple question: &lt;strong&gt;what does success look like to you&lt;/strong&gt;? Success in terms of requests/second, bandwidth, number of concurrent sessions (not users!), etc. I&amp;#8217;ve never been given a straight answer. &lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve sat in meetings where numbers where pulled out of thin air. Inevitably, this is where discussions would end. If you don&amp;#8217;t have a meaningful success metric, you&amp;#8217;re shooting in the dark. You can&amp;#8217;t even define what and how you load test something.&lt;/p&gt;

&lt;p&gt;Michael Nygard, in &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0978739213/aspnetresourc-20"&gt;Release It!&lt;/a&gt; (my favorite technical read of 2008) says this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Most load tests deliver results after the test is done. Since the data come from the load generators rather than inside the systems under test, it is a &amp;#8220;black-box&amp;#8221; test.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On the subject of simulating traffic:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Load testing is both an art and a science. It is impossible to duplicate real production traffic, so you use traffic analysis, experience, and intuition to achieve as close a simulation of reality as possible.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Neither are load tests effective at detecting &lt;em&gt;longevity bugs&lt;/em&gt;, he argues:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The major dangers to your system&amp;#8217;s longevity are memory leaks and data growth. Both kinds of sludge will kill your system in production. Both are rarely caught during testing. [&amp;#8230;]&lt;/p&gt;

  &lt;p&gt;These sorts of bugs usually aren&amp;#8217;t caught by load testing either. A load test runs for a specified period of time and then quits.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;He goes on to suggest a separate environment set up solely to run longevity tests. &amp;#8220;Don&amp;#8217;t hit the system hard; just keep driving requests all the time.&amp;#8221; That&amp;#8217;s an interesting change of perspective. Instead, &lt;a href="http://blogs.msdn.com/amit_chatterjee/archive/2009/01/29/web-and-load-testing-with-visual-studio-team-system.aspx"&gt;what I usually see&lt;/a&gt; is, &lt;em&gt;Let&amp;#8217;s load test this thing and then we&amp;#8217;ll look at, um, charts&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;Apples vs. Oranges&lt;/h2&gt;

&lt;p&gt;As you see, this is really an apples-to-oranges comparison: two different activities aimed at gaining different insight. &lt;/p&gt;

&lt;p&gt;Profiling, to me, is very quantifiable. I can see where I need to improve code. Load testing, on the other hand, is a black box.&lt;/p&gt;

&lt;p&gt;My hope is that we can encourage more developers to use and more companies to buy profilers (and that they would become more affordable). A professional developer should have a good profiler in his or her toolbox.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/load_testing_vs_profiling.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?632</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/632.aspx</trackback:ping>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>IIS7 Resource Kit Rocks!</title>
      <link>http://aspnetresources.com/blog/iis7_resource_kit_rocks.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/iis7_resource_kit_rocks.aspx</guid>
      <pubDate>Fri, 19 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;I&amp;#8217;ve never been much of an &amp;#8220;infrastructure guy&amp;#8221; which is why Microsoft&amp;#8217;s &lt;strong&gt;Resource Kit&lt;/strong&gt; books always induced sleep on me. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.amazon.com/exec/obidos/ASIN/0735624410/aspnetresourc-20"&gt;&lt;img src="http://aspnetresources.com/images/books/32623497.jpg" class="framed lai" alt="IIS7 Resource Kit" /&gt;&lt;/a&gt;
However, the &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0735624410/aspnetresourc-20"&gt;IIS7
Resource Kit&lt;/a&gt; by &lt;a href="http://mvolo.com/blogs/serverside/"&gt;Mike Volodarsky&lt;/a&gt;, et. al., has been a pleasant surprise. A bit repetitive, perhaps due collaboration of several authors, yet concise and thorough. The diagrams are great and the text is easy to follow.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve held out on IIS7 for too long because I just couldn&amp;#8217;t grok the
integrated pipeline, and how http.sys, W3SVC, WAS, and W3WP all interacted with each other. I&amp;#8217;m sure this abbreviation bingo is scary enough to an untrained eye.&lt;/p&gt;

&lt;p&gt;In retrospect, I&amp;#8217;m kicking myself, &amp;#8220;Why haven&amp;#8217;t I jumped on the IIS7 bandwagon sooner?!&amp;#8221; It&amp;#8217;s got so much stuff out of the box which I&amp;#8217;ve been hacking by hand in IIS5 and 6!&lt;/p&gt;

&lt;p&gt;If you don&amp;#8217;t want to read the entire book, at least read Chapter 2 &amp;#8220;&lt;strong&gt;Understanding IIS 7.0 Architecture&lt;/strong&gt;&amp;#8221; and Chapter 11 &amp;#8221;&lt;strong&gt;Hosting Application Development Frameworks&lt;/strong&gt;.&amp;#8221; I consider these chapters to be essential to web developers.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/iis7_resource_kit_rocks.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?631</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/631.aspx</trackback:ping>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>Getting to the Bottom of JavaScript Includes</title>
      <link>http://aspnetresources.com/blog/getting_to_the_bottom_of-javascript_includes.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/getting_to_the_bottom_of-javascript_includes.aspx</guid>
      <pubDate>Wed, 17 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;I get frustrated when an outside vendor insists that I include their JavaScript file all the way up in my pages. Usually they want it right in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;. I have a couple of issues with that.&lt;/p&gt;

&lt;h2&gt;I have no control over the responsiveness of your environment&lt;/h2&gt;

&lt;p&gt;Historically, when your browser encountered a JavaScript include, it would suspend rendering, parse and execute it. Thus every single include slows down rendering and affects the overall perception of responsiveness.&lt;/p&gt;

&lt;p&gt;Yahoo&amp;#8217;s &lt;a href="http://developer.yahoo.com/performance/rules.html#js_bottom"&gt;Best Practices for Speeding Up Your Site&lt;/a&gt;, among many other sources, explains the predicament as follows:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won&amp;#8217;t start any other downloads, even on different hostnames.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If an outside vendor&amp;#8217;s server has a hiccup, I get screwed. I see it, for example, in Firefox when it blocks some ad script. It just sits there forever waiting to render a script which will never come.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re writing a yet another social networking, social commenting, etc, script, please make sure I can include it &lt;strong&gt;all the way on the bottom&lt;/strong&gt; of my page.&lt;/p&gt;

&lt;p&gt;Oh, and help you god if you mess up my DOM with &lt;code&gt;document.write&lt;/code&gt;. Please play nice. You&amp;#8217;re on my turf. My priorities of building a clean and responsive site are higher than yours.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/getting_to_the_bottom_of-javascript_includes.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?630</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/630.aspx</trackback:ping>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>If Only They Tested It on Themselves</title>
      <link>http://aspnetresources.com/blog/if_only_they_tested_it_on_themselves.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/if_only_they_tested_it_on_themselves.aspx</guid>
      <pubDate>Mon, 15 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;The company I&amp;#8217;m on a contract with has moved to a new building in NYC. Actually, it&amp;#8217;s an old building, but fully remodeled. Since day one we&amp;#8217;ve all noticed weird &amp;#8220;bugs&amp;#8221; about the new design which could&amp;rsquo;ve been easily prevented if&amp;#8230; the contractors tried to use the building the way employees would.&lt;/p&gt;

&lt;p&gt;For example, if you walk up to a door and don&amp;#8217;t know which way it opens, the door is not designed properly. Period.&lt;/p&gt;

&lt;p&gt;Another example: employee card scanners. A lot of people wear magnetic badges on the left side of the belt (the other side is taken by a cell phone clip). Why put the scanner so far on the right? And what about those wearing badges on their necks? Yeah, picture it for a second.&lt;/p&gt;

&lt;p&gt;My favorite one: elevators. It&amp;#8217;s almost funny to see half the people reach the panel with no buttons. Why put buttons on only one side?&lt;/p&gt;

&lt;p&gt;Oh, and the can. The can has so many funny snafus that create uncomfortable social &amp;#8220;situations.&amp;#8221;&lt;/p&gt;

&lt;p&gt;If only they tested all this on themselves first&amp;#8230; Software construction isn&amp;#8217;t that much different. Put yourself in the end-user&amp;#8217;s shoes and walk. See if the shoes fit.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/if_only_they_tested_it_on_themselves.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?629</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/629.aspx</trackback:ping>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Message to GEICO: Usability First Please</title>
      <link>http://aspnetresources.com/blog/message_to_geico_usability_first_please.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/message_to_geico_usability_first_please.aspx</guid>
      <pubDate>Mon, 15 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;Seriously, GEICO, how difficult is it to write a regex to accept a policy number &lt;strong&gt;exactly as you print it&lt;/strong&gt; without resorting to the lame &amp;#8220;do not include dashes&amp;#8221;?&lt;/p&gt;

&lt;p&gt;&lt;img class="framed" alt="GEICO policy number field"
src="http://aspnetresources.com/images/geico_policy_number.png" /&gt;&lt;/p&gt;

&lt;p&gt;Hang on, lemme help you: &lt;code&gt;\d{4}-\d{2}-\d{2}-\d{2}|\d{10}&lt;/code&gt;. Now you can go both ways.&lt;/p&gt;

&lt;p&gt;This ain&amp;#8217;t about the length of your database field. I couldn&amp;#8217;t care less. It&amp;#8217;s about improving usability.&lt;/p&gt;

&lt;p&gt;You&amp;#8217;re welcome. ;)&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/message_to_geico_usability_first_please.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?628</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/628.aspx</trackback:ping>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>SuperPreview Blew Me Away</title>
      <link>http://aspnetresources.com/blog/superpreview_blew_me_away.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/superpreview_blew_me_away.aspx</guid>
      <pubDate>Sun, 14 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;A fellow user group attendee pointed me to a preview of &lt;a
href="http://expression.microsoft.com/en-us/dd565874.aspx"&gt;SuperPreview for Expression Web&lt;/a&gt; (no pun intended). Testing a web site in various browsers has been such a headache over the years! Either you had to install lots of virtual machines (I so don&amp;#8217;t recommend running multiple versions of IE on the same box!), or use a paid service
which provided you merely a static screenie of the site. Not good for debugging either way.&lt;/p&gt;

&lt;p&gt;I gave mad props to Expression Web &lt;a href="http://www.aspnetresources.com/blog/expression_web_is_awesome.aspx"&gt;before&lt;/a&gt;. Unlike most Microsoft products, Expression Web simply rocks! But SuperPreview, if implemented as advertised, is going to be BIG. SuperPreview alone will be worth the price of admission.&lt;/p&gt;

&lt;p&gt;To save you rehashing of that SuperPreview is capable of, take a look at &lt;a href="http://blogs.msdn.com/somasegar/archive/2009/06/05/expression-web-3.aspx"&gt;Soma&amp;#8217;s
post&lt;/a&gt; about Expression Web 3.&lt;/p&gt;

&lt;p&gt;I actually installed it in a virtual machine. Doubting Thomas, I am. The thing that surprised me, which Soma&amp;#8217;s post doesn&amp;#8217;t show, is the IE 8 &amp;gt; IE7 compatibility preview:&lt;/p&gt;

&lt;p&gt;&lt;img class="framed" alt="Expression Web SuperPreview"
src="http://aspnetresources.com/images/superpreview.jpg" /&gt;&lt;/p&gt;

&lt;p&gt;Really cool.&lt;/p&gt;

&lt;p&gt; &amp;#8220;&amp;#8230;will be available this summer 2009&amp;#8221;. Hmmm, this is going to be a good summer.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/superpreview_blew_me_away.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?627</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/627.aspx</trackback:ping>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Slides and Code from Hartford Code Camp 2</title>
      <link>http://aspnetresources.com/blog/hartford_code_camp_slides_and_code.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/hartford_code_camp_slides_and_code.aspx</guid>
      <pubDate>Sun, 14 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;A big thank you to those of you who came to my presentation at the &lt;a href="http://ctdotnet.org/codecamp2.aspx"&gt;Hartford, CT Code Camp 2&lt;/a&gt;. A special thank you goes to the organizers and sponsors of the event.&lt;/p&gt;

&lt;p&gt;Feel free to grab the slides from my presentation &lt;strong&gt;Professional Client-Side Development with Microsoft AJAX Library and jQuery&lt;/strong&gt; &lt;a href="http://aspnetresources.com/downloads/Professional_MS_AJAX_and_jQuery.zip"&gt;over
here&lt;/a&gt;. If you need an extra copy of the AJAX Cheat Sheets, &lt;a
href="http://aspnetresources.com/downloads/ms_ajax_library_cheat_sheets1.zip"&gt;download
them here&lt;/a&gt;.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/hartford_code_camp_slides_and_code.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?626</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/626.aspx</trackback:ping>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>Temporary Fixes Are Permanent Fixes</title>
      <link>http://aspnetresources.com/blog/temporary_fixes_are_permanent_fixes.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/temporary_fixes_are_permanent_fixes.aspx</guid>
      <pubDate>Thu, 11 Jun 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;A somber reminder that temporary (aka &amp;#8220;quick and dirty&amp;#8221;) fixes almost always become permanent:&lt;/p&gt;

&lt;pre class='coloredcode'&gt;&lt;span class='cmt'&gt;/*
* Note: this problem may have been fixed already.
* I stopped using the session array method for handling things.
* This may have fixed it. I’ll test later.
*/&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;And &amp;#8220;later&amp;#8221; never came&amp;#8230;&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/temporary_fixes_are_permanent_fixes.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?625</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/625.aspx</trackback:ping>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Geek Marketing Done Right</title>
      <link>http://aspnetresources.com/blog/geek_marketing_done_right.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/geek_marketing_done_right.aspx</guid>
      <pubDate>Sat, 23 May 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;Although I&amp;#8217;ve been reading his blog for some time, I&amp;#8217;ve never met &lt;a href="http://devlicio.us/blogs/billy_mccafferty/Default.aspx"&gt;Billy
McCafferty&lt;/a&gt;. And yet I&amp;#8217;m fascinated by his latest brainchild: &lt;a
href="http://www.itsamuraischool.com"&gt;IT Samurai School&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The front-end is all Flash. I can almost hear voices of discontent over a spinning this, a swooshing that. Or even, &amp;#8220;Oh, no Silverlight?&amp;#8221; (get a reality check!) Implementation details aside, Billy is doing something radically different: creating a consistent message with a vibrant story, built on the imagery of the &lt;a href="http://code.google.com/p/sharp-architecture/"&gt;S#arp
Architecture project&lt;/a&gt;. In other words, it&amp;#8217;s not just geek training. It&amp;#8217;s an &lt;em&gt;experience&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;That&amp;#8217;s damn good marketing and a welcome contrast to the run-of-the-mill, boring training sites droning about ROI and RIA, etc.&lt;/p&gt;

&lt;p&gt;Once again, this isn&amp;#8217;t about Photoshop, or Flash, or MVC, or what have you. It&amp;#8217;s about creating an experience.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/geek_marketing_done_right.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?624</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/624.aspx</trackback:ping>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>Visual Studio Full Screen For Presentations</title>
      <link>http://aspnetresources.com/blog/vs_full_screen_for_presentations.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/vs_full_screen_for_presentations.aspx</guid>
      <pubDate>Thu, 21 May 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;Visual Studio has one very obvious but little&amp;#8211;used feature which helps presentations go much smoother: the full screen view. &lt;/p&gt;

&lt;p&gt;Most of the time I see presenters struggle with the Solution Explorer sidebar, dragging it back and forth, back and forth, to get it out of the way. A painful exercise for the presenter and the attendees.&lt;/p&gt;

&lt;p&gt;Pssst&amp;#8230; Hit &lt;strong&gt;Shift+Alt+Enter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img alt="Visual Studio full view" class="framed"
src="http://aspnetresources.com/images/visual_studio_full_view.png" /&gt;&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/vs_full_screen_for_presentations.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?623</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/623.aspx</trackback:ping>
      <slash:comments>3</slash:comments>
    </item>
    <item>
      <title>Dear Art Director...</title>
      <link>http://aspnetresources.com/blog/dear_art_director.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/dear_art_director.aspx</guid>
      <pubDate>Sun, 17 May 2009 18:08:15 GMT</pubDate>
      <description>&lt;p&gt;Dear Art Director, I believe you are confused. To prove my point, please answer a simple multiple-choice question below.&lt;/p&gt;

&lt;p&gt;On the web, people run:&lt;/p&gt;
&lt;ol type="a"&gt;
  &lt;li&gt;Photoshop&lt;/li&gt;
  &lt;li&gt;Web browsers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Hint&lt;/strong&gt;: the right answer is &lt;strong&gt;(b)&lt;/strong&gt;. It&amp;#8217;s naive to expect a web page to render with pixel-perfect precision in every browser. It&amp;#8217;s impossible and impractical. Your insistence to the contrary is wasting my time.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/dear_art_director.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?621</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/621.aspx</trackback:ping>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Why Async Pages?</title>
      <link>http://aspnetresources.com/blog/why_async_pages.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/why_async_pages.aspx</guid>
      <pubDate>Sun, 17 May 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;While reading about asynchronous web pages (Chapter 11 of &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1430215674/aspnetresourc-20"&gt;Pro ASP.NET 3.5 with C# 2008&lt;/a&gt;), I came across a great reminder:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;It&amp;rsquo;s important to understand that an asynchronous page is no faster than a normal, synchronous page. In fact, the overhead of switching to the new thread and back again is likely to make it a bit slower. The advantage is that other requests&amp;mdash;ones that don&amp;rsquo;t involve long operations&amp;mdash;can get served more quickly. This improves the overall scalability of your site. It&amp;rsquo;s also important to realize that the asynchronous processing takes place completely on the web server, and the web page user won&amp;rsquo;t notice any difference&amp;mdash;wait times and postbacks   will still take just as long.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To rehash an older post of mine on &lt;a
href="http://www.aspnetresources.com/blog/sync_asynch_pages.aspx"&gt;unnecessary parallelism in ASP.NET&lt;/a&gt;, the number of threads available to a web app is very limited (~20&amp;#8230;25). Ideally, you should process a request and return a
response as fast as possible. As Michaen Nygard &lt;a
href="http://www.michaelnygard.com/blog/2007/11/two_ways_to_boost_your_flaggin.html"&gt;points out&lt;/a&gt;, &amp;#8220;shortening the processing time means you can handle more transactions
during the same unit of time.&amp;#8221;&lt;/p&gt;

&lt;p&gt;However, if you hold up a request for too long, e.g. due to a long database read or a lengthy web service call, the thread you&amp;#8217;re holding isn&amp;#8217;t available to process other requests, nor is it doing anything useful while waiting. You gotta do something about it. This is where it&amp;#8217;s worth to consider asynchronous processing.&lt;/p&gt;

&lt;p&gt;Take a moment to reread the excerpt above. The important point is that &amp;#8220;an asynchronous page is no faster than a normal, synchronous page.&amp;#8221; It may be even a little slower due to context switching. The kicker here is the request is moved to &lt;em&gt;another thread pool&lt;/em&gt;! The .NET Framework provides a number of
APIs for asynchronous file IO, webs services, etc, usually named
&lt;code&gt;BeingXxx()&lt;/code&gt; and &lt;code&gt;EndXxx()&lt;/code&gt;. These APIs use the fascinating feature called &lt;a
href="http://technet.microsoft.com/en-us/sysinternals/bb963891.aspx"&gt;I/O completion ports&lt;/a&gt; which doesn&amp;#8217;t use threads from the ASP.NET thread pool.&lt;/p&gt;

&lt;p&gt;The book makes another great point:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Performing simultaneous asynchronous tasks is a good technique when your tasks involve different resources. It&amp;rsquo;s a bad idea if your tasks will compete for the same resource. For example, a page that performs three database queries at once isn&amp;rsquo;t a good candidate for simultaneous execution, because you&amp;rsquo;ll need to open three connections at the same time, which will probably have a negative effect on the overall scalability of your site.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At the end of the day, if you feel you need to add parallelism to your ASP.NET app, think long and hard. In most cases it won&amp;#8217;t buy you anything.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/why_async_pages.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?622</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/622.aspx</trackback:ping>
      <slash:comments>1</slash:comments>
    </item>
    <item>
      <title>Two Components with The Same Id AJAX Error</title>
      <link>http://aspnetresources.com/blog/two_components_with_the_same_id_ajax_error.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/two_components_with_the_same_id_ajax_error.aspx</guid>
      <pubDate>Sat, 16 May 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;While debugging a script control written with ASP.NET AJAX, we came across this weird exception:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Sys.InvalidOperationException: Two components with the same id '[....]' can't be added to the application.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The control looked kosher in every respect. Yet we couldn&amp;#8217;t understand why the client-side &amp;#8220;runtime&amp;#8221; was trying to create another instance of this script control on every AJAX call. It&amp;#8217;s as if it wouldn&amp;#8217;t let go of an old instance before attempting to create a new one.&lt;/p&gt;

&lt;p&gt;Looking for a solution in Google, it became obvious there were many various causes of the above exception, but one stood out: make sure you call the base &lt;strong&gt;dispose&lt;/strong&gt; in your script control.&lt;/p&gt;

&lt;p&gt;I looked at my dispose method:&lt;/p&gt;

&lt;pre&gt;dispose : function () {
  delete this._remove$delegate;
  delete this._add$delegate;
}&lt;/pre&gt;

&lt;p&gt;Duh! It should&amp;#8217;ve looked as follows:&lt;/p&gt;

&lt;pre&gt;dispose : function () {
   delete this._remove$delegate;
   delete this._add$delegate;
   &lt;strong&gt;[my namespace].[my class].callBaseMethod (this, "dispose");&lt;/strong&gt;
}&lt;/pre&gt;

&lt;p&gt;A self-inflicted painful lesson. I hope it saves somebody debugging time.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/two_components_with_the_same_id_ajax_error.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?620</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/620.aspx</trackback:ping>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>ColoRotate Is Cooler Than Kuler</title>
      <link>http://aspnetresources.com/blog/colorotate_is_cooler_than_kuler.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/colorotate_is_cooler_than_kuler.aspx</guid>
      <pubDate>Sat, 16 May 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;Michael Douma sent me a quick introduction to a very interesting project he&amp;#8217;s involved in: &lt;a href="http://www.colorotate.org/"&gt;ColoRotate&lt;/a&gt;. In Michael&amp;#8217;s own words:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Since color is inherently three dimensional, it&amp;#8217;s always bothered us that all color pickers are flat. That led to the design ColoRotate, a 3D editor that aligns with the way our minds process color. We&amp;#8217;ve also put together some background information about the nature of color, perception, and color models &amp;#8211; &lt;a href="http://learn.colorotate.org"&gt;http://learn.colorotate.org&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A couple of years ago I wrote a post about &lt;a
href="http://aspnetresources.com/blog/kuler.aspx"&gt;Adobe&amp;#8217;s Kuler&lt;/a&gt;. &lt;strong&gt;ColoRotate&lt;/strong&gt; is somewhat similar, but it builds 3D models. Very cool!&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/colorotate_is_cooler_than_kuler.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?619</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/619.aspx</trackback:ping>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>Rediscovering Nolo</title>
      <link>http://aspnetresources.com/blog/rediscovering_nolo.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/rediscovering_nolo.aspx</guid>
      <pubDate>Sun, 22 Mar 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;I&amp;#8217;m my persistent quest for independent consulting, I have read several books by &lt;a href="http://www.nolo.com/"&gt;Nolo&lt;/a&gt;. In case you&amp;#8217;ve never heard of them, &lt;a href="http://www.nolo.com/"&gt;Nolo&lt;/a&gt; publishes a wide array of titles for those of us who want to understand legal and accounting mumbo-jumbo. They neither get cutesy like the &lt;a href="http://www.dummies.com/"&gt;For Dummies&lt;/a&gt; series (those are great in their own way) nor do they sound like law
dictionaries.&lt;/p&gt;

&lt;p&gt;I think it&amp;#8217;s safe to assume that most of you dread the thought of trying to comprehend the myriad of tax regulations and legalities. I&amp;#8217;m the same way.&lt;/p&gt;

&lt;p&gt;Of course, no book can substitute a professional lawyer or bean counter. But if you want to run your own business (even a freelancer runs a solo business), you have to understand some basics. When you sit down with a CPA to do personal or business taxes, you absolutely need to understand what&amp;#8217;s going on. This is where I find Nolo books invaluable!&lt;/p&gt;

&lt;p&gt;Recently I read &lt;a
href="http://www.amazon.com/exec/obidos/ASIN/1413307086/aspnetresourc-20"&gt;Form Your Own Limited Liability Company&lt;/a&gt;, &lt;a
href="http://www.amazon.com/exec/obidos/ASIN/1413307523/aspnetresourc-20"&gt;Working for Yourself&lt;/a&gt;, and &lt;a href="http://www.amazon.com/exec/obidos/ASIN/1413309038/aspnetresourc-20"&gt;Tax Savvy for Small Business&lt;/a&gt; (hence slow blogging). No small books, but well worth the time! My biz IQ is definitely higher now.&lt;/p&gt;

&lt;p&gt;&lt;img class="framed" alt="Working for yourself" src="http://aspnetresources.com/images/books/WAGE_icon.gif" width="100" height="130" /&gt; &lt;img class="framed" alt="Form your own LLC" src="http://aspnetresources.com/images/books/LIAB_icon.gif" /&gt; &lt;img class="framed" alt="Tax savvy for small businesses"
src="http://aspnetresources.com/images/books/SAVVY_icon.gif" /&gt; &lt;/p&gt;

&lt;p class="note"&gt;Note: I have &lt;a href="http://www.aspnetresources.com/blog/get_a_will.aspx"&gt;had a bad experience&lt;/a&gt; with Nolo&amp;#8217;s software WillMaker, so I don&amp;#8217;t know how good their software products are.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/rediscovering_nolo.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?618</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/618.aspx</trackback:ping>
      <slash:comments>0</slash:comments>
    </item>
    <item>
      <title>Book Review: ASP.NET 3.5 / Application Architecture and Design</title>
      <link>http://aspnetresources.com/blog/aspnet_3_5_application_architecture_and_design_rev.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/aspnet_3_5_application_architecture_and_design_rev.aspx</guid>
      <pubDate>Sun, 22 Mar 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;It is difficult to write about architecture because it&amp;#8217;s such a subjective topic. The term itself means different things to different people. Given that Microsoft produces weak architectural guidance, I welcome any and all attempts to hone in on that illusive perfect architecture of a web application. Unfortunately, &lt;a
href="http://www.amazon.com/exec/obidos/ASIN/1847195504/aspnetresourc-20"&gt;ASP.NET 3.5: Application Architecture and Design&lt;/a&gt; by Vivek Thakur falls short of my expectations.&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s step through the book.&lt;/p&gt;

&lt;p&gt;&lt;img class="framed rai" alt="ASP.NET 3.5 Application Architecture and Design" src="http://aspnetresources.com/images/books/1847195504.png" /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chapter 1&lt;/strong&gt;. A good discussion of the steps involved in planning a web app life cycle: gatheting business requirements, planning and prototyping, development, release, and maintenance. The chapter also introduces the concepts of &lt;strong&gt;tiers&lt;/strong&gt; (physical separation) and &lt;strong&gt;layers&lt;/strong&gt; (logical separation) and goes on to suggest various
tier/layer combinations, e.g. single tier&amp;#8211;two layer model, three tier model, etc.&lt;/p&gt;

&lt;p&gt;The client&amp;#8217;s browser is considered a tier of its own. I tend to disagree with this point of view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chapters 2 through 4&lt;/strong&gt; offer a somewhat deeper discussion of the various types of layering. This is also where I relived unpleasant flashbacks of string-concatenated T-SQL queries, invoked right in code-behind of a web page.&lt;/p&gt;

&lt;p&gt;I should note that &lt;strong&gt;Chapter 3&lt;/strong&gt; had a glimmer of hope with a rather brief discussion of Entity-Relationship diagrams and
even&amp;#8212;gulp&amp;#8212;UML. Bonus points: data access code shows proper use of the &lt;a href="http://www.aspnetresources.com/blog/the_very_handy_using_statement.aspx"&gt;using keyword&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chapter 4&lt;/strong&gt; surprised me with a silly code sample along the following lines:&lt;/p&gt;

&lt;pre class='coloredcode'&gt;&lt;span class='kwd'&gt;namespace&lt;/span&gt; OMS.CodeTier.BL
{
    &lt;span class='kwd'&gt;public class&lt;/span&gt; Customer
    {
        &lt;span class='kwd'&gt;public void&lt;/span&gt; Add()
        {
            CustomerDAL.AddCustomer (&lt;span class='kwd'&gt;this&lt;/span&gt;);
        }
    }
}
&lt;/pre&gt;

&lt;p&gt;Now guess what happens? &lt;code&gt;CustomerDAL&lt;/code&gt; goes right back to &lt;code&gt;Customer&lt;/code&gt;, thus creating a weird strongly-coupled relationship.&lt;/p&gt;

&lt;p&gt;Again, &lt;strong&gt;Chapter 4&lt;/strong&gt; throws another surprise by listing a class which exposes public fields instead of properties&amp;#8212;a grievous sin in the .NET land&amp;#8212;and calls them &amp;#8220;public variables.&amp;#8221; There&amp;#8217;s some nomenclature cleanup begging to happen.&lt;/p&gt;

&lt;pre class='coloredcode'&gt;&lt;span class='kwd'&gt;namespace&lt;/span&gt; 5Tier.Common
{
  &lt;span class='kwd'&gt;public&lt;/span&gt; System.String Address = &lt;span class='kwd'&gt;null&lt;/span&gt;;
  &lt;span class='cmt'&gt;// … other public “variables”&lt;/span&gt;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Chapter 5&lt;/strong&gt; is a humble, yet hopelessly outdated overview of ASP.NET MVC Preview 5. The chapter is so short that I don&amp;#8217;t know if one can learn anything from it.&lt;/p&gt;

&lt;p&gt;ASP.NET itself doesn&amp;#8217;t yield well to the Model-View-Controller pattern since the View and Controller are almost inseparable by design. Hence, I suppose, an almost mandatory mention of the MVC framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design Patters, Chapter 6&lt;/strong&gt;&amp;#8212;my favorite subject. Folks, seriously, how difficult is it to &amp;#8220;get&amp;#8221; &lt;a
href="http://www.aspnetresources.com/blog/ms_pag_still_doesnt_understand_singleton.aspx"&gt;the Singleton pattern&lt;/a&gt;? How many times has it been discussed that &lt;a
href="http://msdn.microsoft.com/en-us/magazine/cc188793.aspx"&gt;locking on a type is a no-no&lt;/a&gt;? And I was taken aback by this explanation:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8220;We may need to pass an instance of [the singleton in question] class to some other method, but with static classes we cannot do so.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So the singleton is &lt;code&gt;sealed&lt;/code&gt; and it can be passed around. Now that&amp;#8217;s a novel idea!&lt;/p&gt;

&lt;p&gt;The Factory pattern is accompanied by another great explanation:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8220;Why do we need this design pattern? Change is one thing that we cannot   avoid in software development. [&amp;#8230; more on change &amp;#8230;] The factory design  helps us make our applications &amp;#8220;change-friendly.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Really, that&amp;#8217;s what Factory is about? It&amp;#8217;s about change? Hell, &amp;#8220;yes we can!&amp;#8221; So you can form an opinion of your own, here&amp;#8217;s the implementation of the said Factory:&lt;/p&gt;

&lt;pre class='coloredcode'&gt;&lt;span class='kwd'&gt;public class&lt;/span&gt; ProductFactory
{
    &lt;span class='kwd'&gt;public&lt;/span&gt; IProduct CreateProduct (&lt;span class='kwd'&gt;string&lt;/span&gt; productType)
    {
        IProduct product = &lt;span class='kwd'&gt;null&lt;/span&gt;;
        
        &lt;span class='kwd'&gt;switch&lt;/span&gt; (productType)
        {
            &lt;span class='kwd'&gt;case&lt;/span&gt; &lt;span class='st'&gt;"BeautyProduct"&lt;/span&gt; : 
                 product = &lt;span class='kwd'&gt;new&lt;/span&gt; BeautyProduct(); 
                 &lt;span class='kwd'&gt;break&lt;/span&gt;;
            &lt;span class='kwd'&gt;case&lt;/span&gt; &lt;span class='st'&gt;"ElectronicProduct"&lt;/span&gt; : 
                 product = &lt;span class='kwd'&gt;new&lt;/span&gt; ElectronicProduct; 
                 &lt;span class='kwd'&gt;break&lt;/span&gt;;
            &lt;span class='kwd'&gt;case&lt;/span&gt; &lt;span class='st'&gt;"FoodProduct"&lt;/span&gt; : 
                 product = &lt;span class='kwd'&gt;new&lt;/span&gt; FoodProduct (); 
                 &lt;span class='kwd'&gt;break&lt;/span&gt;;
            &lt;span class='kwd'&gt;default&lt;/span&gt;: &lt;span class='kwd'&gt;break&lt;/span&gt;;
        }
        
        &lt;span class='kwd'&gt;return&lt;/span&gt; product;
    }
}&lt;/pre&gt;


&lt;p&gt;Magic strings, um-hm, how much I dislike them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chapter 7: SOA and WCF&lt;/strong&gt;. The term SOA, or Service Oriented Architecture, is bleak because it means too many things to too many people. I fully agree with &lt;a
href="http://www.michaelnygard.com/blog/2008/05/soa_time_for_a_rethink.html"&gt;Michael Nygard&lt;/a&gt; that it&amp;#8217;s time to rethink what SOA actually means. &lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s the author&amp;#8217;s definition of SOA:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&amp;#8221;[&amp;#8230;] An architectural approach aimed at making it easy to introduce new features into an existing system, share data with other applications for easier integration, and bring a faster Return On Investments (ROI) to the business processes.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sounds like something out of the &lt;a
href="http://www.dack.com/web/bullshit.html"&gt;Web Economy Bulls**t
Generator&lt;/a&gt;. That said, this chapter is too weak to be of any use. At best, it&amp;#8217;s a two-page introduction to WCF, which does WCF no justice.&lt;/p&gt;

&lt;p&gt;While we&amp;#8217;re dissecting this chapter, here&amp;#8217;s something I spotted:&lt;/p&gt;

&lt;pre class='coloredcode'&gt;CustomerCollection customers = &lt;span class='kwd'&gt;new&lt;/span&gt; CustomerCollection ();
CustomerDTO[] customerArray;
&lt;span class='cmt'&gt;// get all customers so set page length = -1 indicating full load&lt;/span&gt;
&lt;span class='kwd'&gt;int&lt;/span&gt; pageLength = -1;&lt;/pre&gt;

&lt;p&gt;Whoa, a magic number. Are we back in the C++ land?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chapter 8: Database Design&lt;/strong&gt;. Always a tricky subject. The chapter has a brief discussion of data integrity, normalization and a few other essentials. But then the author goes on to create a data model in Vizio with the idea of creating a DDL script right from Vizio itself. I think this is a seriously misguided approach, but it&amp;#8217;s your right to disagree.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chapter 9&lt;/strong&gt; is about globalization and localization. I don&amp;#8217;t understand why this chapter was included. Localization is not new to ASP.NET, and the chapter is too short to cover such a broad topic.&lt;/p&gt;

&lt;h2&gt;Proofreading and technical review&lt;/h2&gt;

&lt;p&gt;With three technical reviewers on board, I expected better quality of content. I&amp;#8217;m not sure whether misconceptions and inaccuracies where pointed out but ignored by the author and publisher. I had this happen to me on &lt;a href="http://www.aspnetresources.com/blog/the_book_is_here.aspx"&gt;this project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The book could also benefit from more diligent proofreading. As to
downloading source code, the provided link doesn&amp;#8217;t work.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;The field for discussing proper architecture of ASP.NET applications is wide open, and yet this book falls on its face. It&amp;#8217;s too brief on technical and misguided on conceptual content. What was the point of writing it?&lt;/p&gt;

&lt;p class="note"&gt;A special thank you to the fine folks at &lt;a href="http://www.packtpub.com/"&gt;Packt Publishing&lt;/a&gt; for providing this review copy free  of charge.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/aspnet_3_5_application_architecture_and_design_rev.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?617</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/617.aspx</trackback:ping>
      <slash:comments>2</slash:comments>
    </item>
    <item>
      <title>Web Site vs Web Application Project (WAP)</title>
      <link>http://aspnetresources.com/blog/web_site_vs_web_application_project_wap.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/web_site_vs_web_application_project_wap.aspx</guid>
      <pubDate>Fri, 13 Mar 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;In ASP.NET 1.x there was only one way to create a web app&amp;#8212;the Web Application Project (WAP). In ASP.NET 2.0 WAP was killed, deliberately or not, and replaced with the lame Web Site &amp;#8220;model.&amp;#8221; WAP for Visual Studio 2005 was &lt;a href="http://webproject.scottgu.com/Default.aspx"&gt;shipped separately&lt;/a&gt; later.&lt;/p&gt;

&lt;p&gt;There are several reasons I strongly dislike Web Site projects.&lt;/p&gt;

&lt;h2&gt;Sloppy project structure&lt;/h2&gt;

&lt;p&gt;This model encourages sloppy project organization. A typical web site &lt;a href="http://www.aspnetresources.com/blog/class_view_pane_overlooked_vs_gem.aspx"&gt;has no structure&lt;/a&gt;. You&amp;#8217;re lucky if you see a namespace here and there. In my opinion, this is unacceptable. Since less competent developers simply use what comes out of the box, Web Site is a &amp;#8220;bad practice&amp;#8221; from the get-go.&lt;/p&gt;

&lt;p&gt;Not long ago, I took over a project from someone who had everything dumped into a single Web Site. There were no logical or physical tiers. A Web Site has no solution file per se, so the guy made no effort to separate concerns.&lt;/p&gt;

&lt;h2&gt;Magic folders&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/t990ks23(VS.80).aspx"&gt;According
to MSDN&lt;/a&gt;, &amp;#8220;You can store source code in the &lt;code&gt;App_Code&lt;/code&gt; folder, and it will be automatically compiled at run time.&amp;#8221; In real life, I see that &lt;code&gt;App_Code&lt;/code&gt; is a garbage can where people throw code they don&amp;#8217;t know where to put. Instead of thinking through which namespace a class should go to (logical organization), or even which folder (physical ogranization), &lt;code&gt;App_Code&lt;/code&gt; serves as a dumpster.&lt;/p&gt;

&lt;p&gt;There&amp;#8217;s a whole bunch of &lt;a href="http://msdn.microsoft.com/en-us/library/ex526337(VS.80).aspx"&gt;other magic folders&lt;/a&gt; I&amp;#8217;m not comfortable with. &lt;/p&gt;

&lt;p class="note"&gt;Please note: this isn&amp;#8217;t a discussion about convention vs configuration. It&amp;#8217;s not like you can rename &lt;code&gt;App_Code&lt;/code&gt; or stop its on-the-fly compilation. It&amp;#8217;s imposed on you.&lt;/p&gt;

&lt;h2&gt;Migration&lt;/h2&gt;

&lt;p&gt;You don&amp;#8217;t learn the true meaning of pain until you have to migrate a decent-size Web Site to a WAP. There&amp;#8217;s no automatic migration. It&amp;#8217;s all manual and very painful. I don&amp;#8217;t want to belabor the point. &lt;a
href="http://webproject.scottgu.com/CSharp/migration2/migration2.aspx"&gt;Scott Guthrie&lt;/a&gt; and &lt;a href="http://weblogs.asp.net/meligy/archive/2008/08/03/converting-vs-2008-website-to-web-application.aspx"&gt;Mohamed Meligy&lt;/a&gt; have lengthy instructions. I had to go through a migration ordeal recently, and it wasn&amp;#8217;t fun at all.&lt;/p&gt;

&lt;p&gt;Beware of the following side effect: &lt;a href="http://www.aspnetresources.com/blog/wap_resets_autoeventwireup.aspx"&gt;conversion to WAP resets AutoEventWireup&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;The bin folder&lt;/h2&gt;

&lt;p&gt;Again, &lt;a href="http://msdn.microsoft.com/en-us/library/t990ks23(VS.80).aspx"&gt;MSDN states&lt;/a&gt;, &amp;#8220;You can store compiled assemblies in the Bin folder.&amp;#8221; I inherited a project where all dependencies where simply dumped into &lt;strong&gt;bin&lt;/strong&gt;. Another dumptser. In a WAP, you don&amp;#8217;t mess with &lt;strong&gt;bin&lt;/strong&gt;. You set references and they are copied into &lt;strong&gt;bin&lt;/strong&gt; when the project is built. &lt;/p&gt;

&lt;p&gt;When you migrate a Web Site to a WAP, you have to go and clean out the &lt;strong&gt;bin&lt;/strong&gt; folder by hand.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;In my no-so-humble opinion, the ASP.NET Web Site model is an aberration. I wish Microsoft retired it as a failed experiment.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/web_site_vs_web_application_project_wap.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?616</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/616.aspx</trackback:ping>
      <slash:comments>6</slash:comments>
    </item>
    <item>
      <title>Cassini vs IIS</title>
      <link>http://aspnetresources.com/blog/cassini_vs_iis.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/cassini_vs_iis.aspx</guid>
      <pubDate>Thu, 12 Mar 2009 18:11:24 GMT</pubDate>
      <description>&lt;p&gt;Cassini is a &amp;#8220;simple, fully managed Web server that hosts ASP.NET&amp;#8221; (&lt;a href="http://support.microsoft.com/kb/893391"&gt;source&lt;/a&gt;). It&amp;#8217;s a lightweight &amp;#8220;server&amp;#8221; you get when you create a new ASP.NET application in Visual
Studio.&lt;/p&gt;

&lt;p&gt;Cassini has been pitched to those who don&amp;#8217;t have IIS on their computers but want to develop in ASP.NET. This works great for hobbyists. However, Cassini is no IIS. It&amp;#8217;s much slower, it hangs and crashes easily.&lt;/p&gt;

&lt;p&gt;The reason I&amp;#8217;m writing this is to convince you not to use Cassini within an organization. Sooner or later you will deploy your app on a real web server only to realize that something is badly broken. The problem never came up because Cassini &lt;strong&gt;is not a real web server&lt;/strong&gt; and therefore issues were simply swept under the carpet.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/cassini_vs_iis.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?615</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/615.aspx</trackback:ping>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Class View Pane: An Overlooked Visual Studio Gem</title>
      <link>http://aspnetresources.com/blog/class_view_pane_overlooked_vs_gem.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/class_view_pane_overlooked_vs_gem.aspx</guid>
      <pubDate>Thu, 12 Mar 2009 17:55:50 GMT</pubDate>
      <description>&lt;p&gt;For me, a quick way to see if a project is properly structured is to go to &lt;strong&gt;View&lt;/strong&gt; | &lt;strong&gt;Class View&lt;/strong&gt;. This is one badly overlooked but handy Visual Studio tool. &lt;/p&gt;

&lt;p&gt;Class View gives you a general idea of whether you created a good namespace structure, whether classes have decent names, etc. This is where you catch bizarre class names like &lt;code&gt;_Default&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example, below is a screenshot of a brand new site created off the &lt;a href="http://www.asp.net/downloads/starter-kits/small-business/"&gt;Small Business Starter Kit&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;img class="framed" alt="Class View within Visual Studio"
src="http://aspnetresources.com/images/vs_class_view.png"&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Class View&lt;/strong&gt; reveals that the project is flat like a
pancake, no logical structure in sight. The fact that it&amp;#8217;s a &lt;strong&gt;web site&lt;/strong&gt;, not a &lt;strong&gt;Web Application Project (WAP)&lt;/strong&gt;, somewhat explains this chaos, but that&amp;#8217;s a different story (a post is coming, believe me).&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/class_view_pane_overlooked_vs_gem.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?614</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/614.aspx</trackback:ping>
      <slash:comments>4</slash:comments>
    </item>
    <item>
      <title>Let Your Code Fail Early</title>
      <link>http://aspnetresources.com/blog/let_your_code_fail_early.aspx</link>
      <guid isPermaLink="true">http://aspnetresources.com/blog/let_your_code_fail_early.aspx</guid>
      <pubDate>Mon, 26 Jan 2009 00:00:00 GMT</pubDate>
      <description>&lt;p&gt;To the list of disturbing practices I nominate this:&lt;/p&gt;

&lt;pre&gt;if ([some critical resource] != null)
    [do something with this critical resource];
&lt;/pre&gt;

&lt;p&gt;The critical resource above could be an essential configuration setting, a file, a control, etc. Its absense should lead to an exception so that you, the developer, can figure out this anomalous flow early, &lt;em&gt;before&lt;/em&gt; the product ships.&lt;/p&gt;

&lt;p&gt;For example, during a recent code review, I found a chunk of code
responsible for validation. There was an explicit check for a validator, and if one wasn&amp;#8217;t found then, well, validation didn&amp;#8217;t happen. In this
application, if a validator goes missing, it&amp;#8217;s an abnormal situation which we should catch in development. Obfuscating it with a null check only leads to trouble.&lt;/p&gt;

&lt;p&gt;The twin brother of evil null checks is a swallowed exception:&lt;/p&gt;

&lt;pre class='coloredcode'&gt;&lt;span class='kwd'&gt;try&lt;/span&gt;
{
  &lt;span class='cmt'&gt;// some important logic&lt;/span&gt;
}
&lt;span class='kwd'&gt;catch&lt;/span&gt; (Exception ex)
{
}&lt;/pre&gt;

&lt;p&gt;If you&amp;#8217;re absolutely, positively sure it&amp;#8217;s Ok to swallow an exception like this, fine. But this happens very, very rarely.&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/blog/let_your_code_fail_early.aspx#comments</comments>
      <wfw:commentRss>http://aspnetresources.com/blog/postcomments.aspx?613</wfw:commentRss>
      <trackback:ping>http://aspnetresources.com/blog/trackback/613.aspx</trackback:ping>
      <slash:comments>5</slash:comments>
    </item>
    <item>
      <title>Keeping Pulse on Your Site With ASP.NET 2.0 Health Monitoring</title>
      <link>http://aspnetresources.com/articles/aspnet_2_0_health_monitoring.aspx</link>
      <pubDate>Fri, 23 Mar 2007 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/aspnet_2_0_health_monitoring.aspx</guid>
      <description>One of the best, yet often overlooked, features of ASP.NET 2.0 is &lt;a href="TemplatedMailWebEventProvider"&gt;health monitoring&lt;/a&gt;. I believe it is absolutely essential to be notified of any problems with your web application, and this is where health monitoring comes in handy. A few years ago I wrote an article about &lt;a
href="http://www.aspnetresources.com/articles/CustomErrorPages.aspx"&gt;custom error pages&lt;/a&gt; and demonstrated various ways to tap into error details. Health Monitoring is a natural progression of that approach.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/aspnet_2_0_health_monitoring.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?121</wfw:commentRss>
    </item>
    <item>
      <title>The Dark Side of File Uploads</title>
      <link>http://aspnetresources.com/articles/dark_side_of_file_uploads.aspx</link>
      <pubDate>Thu, 12 Jan 2006 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/dark_side_of_file_uploads.aspx</guid>
      <description>I saw a December MSDN article, entitled &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/UploadASP2.asp"&gt;Uploading Files in ASP.NET 2.0&lt;/a&gt;, and wanted to offer my comments on some gotchas with uploading files. I&amp;#8217;ve spent countless hours and tried numerous hacks to tame file uploading and have enough bruses from hitting my head against the wall (figuratively speaking).
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/dark_side_of_file_uploads.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?119</wfw:commentRss>
    </item>
    <item>
      <title>Session_Start or Session_OnStart?</title>
      <link>http://aspnetresources.com/articles/event_handlers_in_global_asax.aspx</link>
      <pubDate>Sun, 18 Dec 2005 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/event_handlers_in_global_asax.aspx</guid>
      <description>Ever since I started to develop with ASP.NET, I&amp;#8217;ve been wondering why &lt;strong&gt;global.asa&lt;/strong&gt; from the ASP days quietly moved over to ASP.NET as &lt;strong&gt;global.asax&lt;/strong&gt;. When you look at it, it just feels so outdated, so VBScript-ish, so loosely&amp;#8211;typed. And what is the right way to name event handlers?
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/event_handlers_in_global_asax.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?117</wfw:commentRss>
    </item>
    <item>
      <title>Crafting Lightweight Page Templates with CSS</title>
      <link>http://aspnetresources.com/articles/css_templates.aspx</link>
      <pubDate>Sun, 19 Sep 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/css_templates.aspx</guid>
      <description>Giving your web application a consistent look and feel is a task of paramount importance. Yet, templating in ASP.NET has been complicated, to say the least. Learn how you can craft lightweight, efficient page templates with CSS.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/css_templates.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?116</wfw:commentRss>
    </item>
    <item>
      <title>Weather Custom Server Control</title>
      <link>http://aspnetresources.com/articles/weather_server_control.aspx</link>
      <pubDate>Sat, 11 Sep 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/weather_server_control.aspx</guid>
      <description>Need a quick and easy way to display weather on your site? Templated custom server controls to the rescue!
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/weather_server_control.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?115</wfw:commentRss>
    </item>
    <item>
      <title>Adding Variables To Style Sheets</title>
      <link>http://aspnetresources.com/articles/variables_in_css.aspx</link>
      <pubDate>Thu, 08 Jul 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/variables_in_css.aspx</guid>
      <description>Even though the spec defines CSS as a style sheet language, this language is missing one of the essential features: variables. Every time I've seen people in newsgroups ask how to implement variables in CSS a typical advice was to build the style sheet on the server. Luckily, it is easy to do in ASP.NET with the help of HTTP Handlers.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/variables_in_css.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?113</wfw:commentRss>
    </item>
    <item>
      <title>Building Dazzling Charts With Office Web Components</title>
      <link>http://aspnetresources.com/articles/office_web_components.aspx</link>
      <pubDate>Tue, 08 Jun 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/office_web_components.aspx</guid>
      <description>Need to create eye-popping charts in real time and do it at no cost at all? Give Microsoft Office Web Components a try.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/office_web_components.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?112</wfw:commentRss>
    </item>
    <item>
      <title>Make Every Web Page Printer-Friendly</title>
      <link>http://aspnetresources.com/articles/printer_friendly.aspx</link>
      <pubDate>Wed, 02 Jun 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/printer_friendly.aspx</guid>
      <description>You found an article online and want to print it to nicely punch thee holes on the side and store it with other useful stuff. Almost every site nowadays provides a printer-friendly page of this and that, but some sites don't and you're still stuck with staring at their printed navigation bar, footer, ads, etc, for ever and ever. All this online decor means nothing on paper. How do you strip page parts that are irrelevant for print?
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/printer_friendly.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?111</wfw:commentRss>
    </item>
    <item>
      <title>Beware Of Deploying Debug Code In Production</title>
      <link>http://aspnetresources.com/articles/debug_code_in_production.aspx</link>
      <pubDate>Wed, 05 May 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/debug_code_in_production.aspx</guid>
      <description>You have spent several months developing a killer web application (a web site, perhaps) and the long anticipated release day has come. You deploy the application and take it for a test drive. As you navigate from page to page you notice that each page “thinks” before rendering. What’s going on? Didn’t Microsoft folks promise code compilation and ultra fast execution? Isn’t it why we beat ASP, Java and PHP by such a wide margin?
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/debug_code_in_production.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?109</wfw:commentRss>
    </item>
    <item>
      <title>Bringing CSS2 to Visual Studio.NET</title>
      <link>http://aspnetresources.com/articles/css2_in_vsnet.aspx</link>
      <pubDate>Tue, 27 Apr 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/css2_in_vsnet.aspx</guid>
      <description>Even though the CSS2 Specification has been around since 1998 its support in the Visual Studio line of products has been rather weak. In this article you’ll learn how to enhance IntelliSense in Visual Studio.NET to display CSS2 properties.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/css2_in_vsnet.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?108</wfw:commentRss>
    </item>
    <item>
      <title>Remastering Web Form Templates</title>
      <link>http://aspnetresources.com/articles/remastering_web_templates.aspx</link>
      <pubDate>Sun, 18 Apr 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/remastering_web_templates.aspx</guid>
      <description>Visual Studio.NET comes with a number of templates for all kinds of coding occasions. The one I'm going to talk about in this article is the one you probably use most often (provided you are an ASP.NET developer): the Web Form template. Default templates suffer from being stuffed with needless markup. In this article we'll analyze what is supposed to be there and learn how to clean them up.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/remastering_web_templates.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?107</wfw:commentRss>
    </item>
    <item>
      <title>What&amp;#39;s In Your DOCTYPE?</title>
      <link>http://aspnetresources.com/articles/doctype.aspx</link>
      <pubDate>Tue, 13 Apr 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/doctype.aspx</guid>
      <description>&lt;p&gt;When you create a web form in Visual Studio.NET using the canned "Web Form" template you might ask yourself, "What is this DOCTYPE declaration about?"&lt;/p&gt;

&lt;pre&gt;
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" &amp;gt;
&lt;/pre&gt;

&lt;p&gt;What is this strange-looking beast?&lt;/p&gt;
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/doctype.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?106</wfw:commentRss>
    </item>
    <item>
      <title>ASP.NET State Management: View State</title>
      <link>http://aspnetresources.com/articles/ViewState.aspx</link>
      <pubDate>Sun, 14 Mar 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/ViewState.aspx</guid>
      <description>ASP.NET view state is a great feature and an essential tool for web development of today. It maintains the state of a page as it travels back and forth. There is no more need to worry about restoring values of page controls between postbacks. In this article you will get an in-depth perspective on view state. We will talk about ways of reducing unnecessary payload and protecting view state from prying eyes.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/ViewState.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?105</wfw:commentRss>
    </item>
    <item>
      <title>Skinning Web Applications with CSS</title>
      <link>http://aspnetresources.com/articles/SkinningWithCSS.aspx</link>
      <pubDate>Sun, 22 Feb 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/SkinningWithCSS.aspx</guid>
      <description>The common approach to skinning web applications lies in reshuffling controls on a page. Traditionally developers define templates with different color schemes and/or control positioning, tables and inline font tags. While this used to be a perfectly viable solution the overhead of run-time application of these skins is staggering. A much better way is to separate skin structure from presentation and let CSS take care of the layout and typography.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/SkinningWithCSS.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?104</wfw:commentRss>
    </item>
    <item>
      <title>Producing XHTML-Compliant Pages With Response Filters</title>
      <link>http://aspnetresources.com/articles/HttpFilters.aspx</link>
      <pubDate>Fri, 13 Feb 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/HttpFilters.aspx</guid>
      <description>Programming with web standards in mind, although vastly ignored, is becoming more and more important. It almost seems it took too long to promote ASP.NET. Now that we're over the hill and "this stuff works" it is about time to start paying attention to web standards. In this article you will learn how to implement a response filter and plug it into the ASP.NET pipeline. The filter will transform outgoing HTML into XHTML 1.0-compliant markup.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/HttpFilters.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?101</wfw:commentRss>
    </item>
    <item>
      <title>ASP.NET Custom Error Pages</title>
      <link>http://aspnetresources.com/articles/CustomErrorPages.aspx</link>
      <pubDate>Sun, 01 Feb 2004 00:00:00 GMT</pubDate>
      <guid isPermaLink="true">http://aspnetresources.com/articles/CustomErrorPages.aspx</guid>
      <description>ASP.NET provides a simple yet powerful way to deal with errors that occur in your web applications. We will look at several ways to trap errors and display friendly meaningful messages to users. We will then take the discussion a step further and learn how to be instantly notified about problems so you can cope with them right away. As a geek touch we will also track the path 404's travel.
     
    &lt;hr /&gt;
    &lt;span style="color: #333;"&gt;ASP.NET consulting with imagination and passion. 
    &lt;a href="http://aspnetresources.com/consulting.aspx" target="_blank"&gt;Hire me!&lt;/a&gt;&lt;/span&gt;
    
</description>
      <comments>http://aspnetresources.com/articles/discuss/CustomErrorPages.aspx</comments>
      <wfw:commentRss>http://aspnetresources.com/articles/artcomments.aspx?100</wfw:commentRss>
    </item>
  </channel>
</rss>