<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2titles.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemtitles.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
	<channel>
		<title>Klopfenstein.net</title>
		<link>http://www.klopfenstein.net</link>
		<description>Homepage of the swiss Klopfenstein family living in Italy.</description>
		<language>en</language>
		<webMaster>lck@klopfenstein.net</webMaster>
		
		<lastBuildDate>Sun, 8 Nov 2009 10:58:10 +01:00</lastBuildDate>
		
		
        <image><link>http://www.klopfenstein.net</link><url>http://www.klopfenstein.net/favicon.png</url><title>Klopfenstein.net</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/klopfensteinnet" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fklopfensteinnet" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/klopfensteinnet" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fklopfensteinnet" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fklopfensteinnet" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fklopfensteinnet" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
            <title><![CDATA[Aspect ratio constrained resizing]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/tIriu-NrIaE/aspect-ratio-constrained-resizing-win32-wm-sizing</link>
            <description>&lt;p&gt;While working on &lt;a href="/lorenz.aspx/ontopreplica"&gt;OnTopReplica&lt;/a&gt; I needed a way to constrain the aspect ratio of the "cloned" window. Since the live thumbnails created using the DWM API cannot be manipulated and always maintain the aspect of the original window, it makes sense to limit the user's choices in resizing the window, in order to fit the window to the cloned thumbnail automatically.&lt;/p&gt;

&lt;p&gt;Much like in the case of media players, where video files have a certain aspect ratio (let's ignore that this ratio can usually be changed by the user). If the video doesn't fit inside the player window, black bars are added on top and bottom or on the sides. Limiting the user's resizing options in this case actually improves the interface experience because a tedious task is handled directly (like searching the right size of the window to reduce the black bars).&lt;/p&gt;

&lt;p&gt;In Windows Forms you have two options to react to resize events of the window: the &lt;code&gt;OnResize&lt;/code&gt; event and the couple &lt;code&gt;OnResizeBegin&lt;/code&gt; and &lt;code&gt;OnResizeEnd&lt;/code&gt;. The problem of those two methods is that they both run &lt;i&gt;after&lt;/i&gt; the window has been resized. That is, after the window received the &lt;code&gt;WM_SIZE&lt;/code&gt; message (in Win32 terms). You can force the window to adopt a correct size after receiving one of those events.&lt;/p&gt;

&lt;p&gt;This would work, if it weren't for the option "&lt;i&gt;Show window contents while resizing&lt;/i&gt;" (added a long way back in Windows 98, more or less). That option (which is usually on by default) causes the window to generate a lot of &lt;code&gt;WM_SIZE&lt;/code&gt; messages &lt;i&gt;while&lt;/i&gt; it is being resized. If you react by changing the size on each event, the result is an extremely jerky window that jumps back and forth while the users tries to resize it. And the contents of the window flicker awfully as a result.&lt;/p&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/aspect-ratio-constrained-resizing-win32-wm-sizing"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/tIriu-NrIaE" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Sun, 8 Nov 2009 10:58:10 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/aspect-ratio-constrained-resizing-win32-wm-sizing]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/aspect-ratio-constrained-resizing-win32-wm-sizing</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Ripping multichannel audio from DVD-A (take 2)]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/1hb2U_kB7oM/ripping-multichannel-surround-audio-dvd-audio-pcm</link>
            <description>&lt;p&gt;In a previous post I outlined the method I used to &lt;a href="/lorenz.aspx/ripping-dts-5.1-multichannel-audio-from-dvd-a"&gt;rip multichannel surround audio from my DVD-A&lt;/a&gt; collection. As was pointed out in the comments, the method works but isn't entirely correct.&lt;/p&gt;

&lt;div class="didascaly alignright"&gt;
&lt;img src="/public/Uploads/lorenz/dvdaudio/dvdaudio.png" width="260" height="154" alt="DVD Audio logo" /&gt;
&lt;/div&gt;

&lt;p&gt;As I discovered now, DVD-Audio discs usually contain both Video &lt;i&gt;and&lt;/i&gt; Audio data. The audio data, which are the advertised high resolution 24 bit surround tracks, are located in the &lt;code&gt;AUDIO_TS&lt;/code&gt; folder. For compatibility reasons (I guess), all DVDs also contain a standard &lt;code&gt;VIDEO_TS&lt;/code&gt; folder that contains a normal DVD movie with compressed DTS sound. The video data is great if you want to playback the disc on a home theater (and show off your surround system, perhaps) or to access the bonus features.&lt;/p&gt;

&lt;p&gt;But to get the full listening experience it is best to use the uncompressed PCM audio data. Here's an illustrated guide on how to rip the tracks.&lt;/p&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/ripping-multichannel-surround-audio-dvd-audio-pcm"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/1hb2U_kB7oM" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Sat, 7 Nov 2009 17:59:20 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/ripping-multichannel-surround-audio-dvd-audio-pcm]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/ripping-multichannel-surround-audio-dvd-audio-pcm</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Porcupine Tree @ Atlantico, Rome]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/RhieHL46u0k/porcupine-tree-demians-at-atlantico-rome</link>
            <description>&lt;p&gt;Yesterday I went to the &lt;a href="http://porcupinetree.com/"&gt;Porcupine Tree&lt;/a&gt; concert at the Atlantico in Rome, with Federico and &lt;a href="/lorenz.aspx/alessandro-manini-graduates-from-urbino"&gt;Alessandro&lt;/a&gt;.&lt;/p&gt;

&lt;div class="didascaly aligncenter"&gt;
&lt;img src="/public/Uploads/lorenz/porcupine_tree_atlantico_09/atlantico_panorama.jpg" width="700" height="237" alt="Atlantico in Rome" /&gt;&lt;br /&gt;
The venue: Atlantico in Rome.
&lt;/div&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/porcupine-tree-demians-at-atlantico-rome"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/RhieHL46u0k" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Fri, 6 Nov 2009 18:52:20 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/porcupine-tree-demians-at-atlantico-rome]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/porcupine-tree-demians-at-atlantico-rome</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Last.fm scrobbling on UPnP shares]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/-f6uEKp1jG4/last-fm-scrobbling-on-upnp-shares-streaming-media-player</link>
            <description>&lt;div class="didascaly alignright"&gt;
&lt;img src="/public/Uploads/lorenz/lastfm/lastfm_logo_red.png" width="145" height="45" alt="Last.fm logo" /&gt;
&lt;/div&gt;

&lt;p&gt;I've had an &lt;a href="http://www.last.fm/user/Lck84"&gt;account&lt;/a&gt; on Last.fm for more than 3 years and liked it on the spot. I love to explore new music, discover new artists, listen to streaming radio (that is, until it was free) and especially &lt;b&gt;scrobbling&lt;/b&gt; the music I listen!&lt;/p&gt;

&lt;p&gt;The geek in me simply freaks out seeing the amount of stats you can get from your Last.fm "scrobbled" data: the music I listened the most this week? Last month? What is &lt;a href="http://www.last.fm/user/Lck84/library/music/Porcupine+Tree?sortOrder=desc&amp;sortBy=plays"&gt;my favorite Porcupine Tree song&lt;/a&gt;? In fact there's also lot of external services that offer &lt;a href="http://lastgraph.aeracode.org/"&gt;awesome visualizations of your data&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This was great up to the day when I decided to put my whole music collection on the Windows Home Server and listen to it via the built in UPnP media sharing in Windows Media Player. That day I discovered that the Windows Media Player plug-in &lt;b&gt;doesn't scrobble songs on network shares&lt;/b&gt;! It doesn't work, neither from an SMB shared folder, nor directly through UPnP sharing (which in fact is HTTP streaming).&lt;/p&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/last-fm-scrobbling-on-upnp-shares-streaming-media-player"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/-f6uEKp1jG4" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Wed, 4 Nov 2009 23:37:17 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/last-fm-scrobbling-on-upnp-shares-streaming-media-player]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/last-fm-scrobbling-on-upnp-shares-streaming-media-player</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[On Top Replica 2.8!]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/ymzCkT5h-8A/ontopreplica-2-8</link>
            <description>&lt;p&gt;I just reorganized the code of &lt;a href="/lorenz.aspx/ontopreplica"&gt;On Top Replica&lt;/a&gt; and finally committed it on the repository on &lt;a href="http://ontopreplica.codeplex.com/"&gt;CodePlex&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also fixed some annoying things: first of all, &lt;b&gt;resizing&lt;/b&gt; now works way better. The aspect ratio of the cloned window is now kept also &lt;i&gt;while&lt;/i&gt; resizing, not only when you release the drag handle. Doing that is harder than expected in Windows Forms, but can be done by handling the right Win32 messages.&lt;/p&gt;

&lt;p&gt;As a user suggested on the On Top Replica page, I also added region selection to the windows menu: that is, after selecting which window to clone you can also select one of the saved regions to apply directly. This should make using regions a bit easier.&lt;/p&gt;

&lt;p class="centered"&gt;
&lt;img src="/public/Uploads/lorenz/ontopreplica/ontopreplica-2_8-regions.jpg" width="700" height="202" alt="The new region selection feature." /&gt;
&lt;/p&gt;

&lt;p&gt;Next updates in the pipeline: refactoring the code a bit (it's messy, but piece by piece it's getting better...) and adding some cool features for Windows 7! That means I'll remove the "tray icon" and leave the application on the task bar, add some jump lists, etc...&lt;/p&gt;

&lt;p&gt;Let me know if you find bugs or have some suggestions.&lt;br /&gt;
Comments welcome as always. &lt;img src="/BabilRes/emoticons/smile.gif" width="15" height="15" alt=" :)" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/ymzCkT5h-8A" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Wed, 4 Nov 2009 19:19:25 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/ontopreplica-2-8]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/ontopreplica-2-8</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[The monsters of Bomarzo]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/GPlVJSf1Hso/monsters-of-bomarzo-parco-dei-mostri</link>
            <description>&lt;div class="didascaly alignright" style="width: 280px"&gt;
&lt;img src="/public/Uploads/lorenz/bomarzo09/bomarzo_map.jpg" width="280" height="216" alt="Looking for the hidden alchemical path." /&gt;&lt;br /&gt;
Looking for the hidden alchemical path.
&lt;/div&gt;

&lt;p&gt;Yesterday I went visiting the "&lt;a href="http://www.parcodeimostri.com"&gt;Park of the Monsters&lt;/a&gt;" in &lt;a href="http://maps.google.it/maps/place?cid=7621467332273867704&amp;q=parco%2Bdei%2Bmostri,%2Bbomarzo"&gt;Bomarzo&lt;/a&gt;, near Viterbo. The park was built in the 16th century by architect Pirro Ligorio, on commission by the lord of Bomarzo, &lt;b&gt;Vicino Orsini&lt;/b&gt;. It is one of the first parks of its kind and has inspired many later monumental gardens, like the "&lt;a href="http://www.nikidesaintphalle.com/"&gt;Giardino dei Tarocchi&lt;/a&gt;" by Niki de Saint Phalle.&lt;/p&gt;

&lt;p&gt;The park is said to be a mockery of classical, symmetrical gardens of the time. It is located at the bottom of the valley near Bomarzo, overseen by the town and the estate of the former noble house. A dense wood takes up most part of the garden, intertwined with monumental sculptures and buildings, each one of them with mysterious inscriptions and symbolical meanings.&lt;/p&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/monsters-of-bomarzo-parco-dei-mostri"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/GPlVJSf1Hso" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Mon, 2 Nov 2009 21:25:39 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/monsters-of-bomarzo-parco-dei-mostri]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/monsters-of-bomarzo-parco-dei-mostri</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Render partial view to string benchmark]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/dnpCtLRRYZs/render-partial-view-to-string-asp-net-mvc-benchmark</link>
            <description>&lt;div class="didascaly alignright"&gt;
&lt;img src="/public/Uploads/lorenz/asp_dotnet_mvc_logo.png" width="260" height="87" alt="ASP.NET MVC logo" /&gt;
&lt;/div&gt;

&lt;p&gt;As I mentioned in my previous article about &lt;a href="/lorenz.aspx/render-partial-view-to-string-in-asp-net-mvc"&gt;how to render an ASP.NET MVC View to a string&lt;/a&gt;, there are several methods to do it and they probably are quite different performance-wise. Well, this time I've got some benchmarks. &lt;img src="/BabilRes/emoticons/smile.gif" width="15" height="15" alt=" :)" /&gt;&lt;/p&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/render-partial-view-to-string-asp-net-mvc-benchmark"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/dnpCtLRRYZs" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Sun, 1 Nov 2009 01:16:03 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/render-partial-view-to-string-asp-net-mvc-benchmark]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/render-partial-view-to-string-asp-net-mvc-benchmark</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Windows 7 is out]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/n05K1CVxG6Q/windows-7-is-out</link>
            <description>&lt;p class="centered"&gt;
&lt;object width="640" height="385"&gt;&lt;param name="movie" value="http://www.youtube.com/v/nWLXjco90uI&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/nWLXjco90uI&amp;hl=en&amp;fs=1&amp;rel=0&amp;color1=0x2b405b&amp;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;
&lt;/p&gt;

&lt;p&gt;Three days ago &lt;b&gt;Windows 7&lt;/b&gt; was released. I have been running the &lt;acronym title="Release Candidate"&gt;RC&lt;/acronym&gt; version for some time, both on my laptop and my desktop computer, and I'm loving it so far. It certainly is more than a "better Vista", but nonetheless the amount of polish, stability and overall lightness are major selling points of the OS. Especially if compared with the previous edition which is still perceived as sluggish and bloated (for instance, all elements of the new control panel have a consistent visual style finally!).&lt;/p&gt;

&lt;p&gt;I decided to get Windows 7 Home Premium edition today and in the next days my copy should ship from Germany (it's kind of difficult to get a disc of the English edition here in Italy).&lt;/p&gt;

&lt;p&gt;Microsoft also released some &lt;a href="http://brandonlive.com/2009/10/22/windows-7-demos-in-7-seconds/"&gt;funny "7 seconds demo" ads&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/n05K1CVxG6Q" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Sun, 25 Oct 2009 10:25:16 +01:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/windows-7-is-out]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/windows-7-is-out</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Alessandro graduates from Urbino]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/mTOzt-eFTSs/alessandro-manini-graduates-from-urbino</link>
            <description>&lt;div class="didascaly alignright" style="width: 300px"&gt;
&lt;img src="/public/Uploads/lorenz/graduation_urbino_alessandro/alessandro_bogliolo.jpg" width="300" height="247" alt="Alessandro Manini and Alessandro Bogliolo" /&gt;&lt;br /&gt;
The graduate with his laurel crown and supervisor Alessandro Bogliolo.
&lt;/div&gt;

&lt;p&gt;Longtime friend, university colleague and more, Alessandro graduated two days ago from the University of Urbino.&lt;/p&gt;

&lt;p&gt;He worked on an interesting application of &lt;a href="/lorenz.aspx/tag/genetic%20algorithms"&gt;genetic algorithms&lt;/a&gt; to an economic simulation. The results actually support monopoly as a winning economic model, so it can't be too wrong. &lt;img src="/BabilRes/emoticons/smile.gif" width="15" height="15" alt=" :)" /&gt;&lt;/p&gt;

&lt;p&gt;Anyway, congratulations!&lt;/p&gt;

&lt;p&gt;And here below, a picture of the four of us who lived together in an apartment in Fermignano for two years. Fun times.&lt;/p&gt;

&lt;div class="didascaly aligncenter"&gt;
&lt;img src="/public/Uploads/lorenz/graduation_urbino_alessandro/appartamento.jpg" width="700" height="407" alt="Lorenzo, Matteo, Alessandro and me." /&gt;&lt;br /&gt;
Lorenzo, Matteo, Alessandro and me.
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/mTOzt-eFTSs" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Thu, 22 Oct 2009 20:12:20 +02:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/alessandro-manini-graduates-from-urbino]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/alessandro-manini-graduates-from-urbino</feedburner:origLink></item>
        
        
                
        <item>
            <title><![CDATA[Donut Caching with ASP.NET MVC and Partial Requests]]></title>
            <link>http://feedproxy.google.com/~r/klopfensteinnet/~3/po3niqjPA60/output-donut-caching-attribute-asp-net-mvc-partial-requests</link>
            <description>&lt;p&gt;Output caching in ASP.NET MVC is usually done via the built-in &lt;code&gt;OutputCacheAttribute&lt;/code&gt;, an attribute that marks an action as cacheable and relies on the default ASP.NET caching module. This means that the caching is usually very efficient and doesn't go through the MVC framework at all in case of a &lt;i&gt;cache-hit&lt;/i&gt;.&lt;/p&gt;

&lt;div class="didascaly alignright" style="width: 260px"&gt;
&lt;a href="http://www.flickr.com/photos/mhaithaca/1216805850/"&gt;&lt;img src="/public/Uploads/lorenz/mvc/donut.jpg" width="260" height="173" alt="Oooh, donut! by mhaithaca on Flickr" /&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;b&gt;Donut caching&lt;/b&gt;, i.e. returning a cached page with a part that is not cached and rendered at each request, can be done in some ways. Usually they use features of the WebForms engine in ASP.NET, for instance using the &lt;a href="http://haacked.com/archive/2008/11/05/donut-caching-in-asp.net-mvc.aspx"&gt;Substitution control&lt;/a&gt; or explicitly &lt;a href="http://haacked.com/archive/2009/05/12/donut-hole-caching.aspx"&gt;caching UserControls&lt;/a&gt;. A nicer method is &lt;a href="http://blog.maartenballiauw.be/post/2008/07/01/Extending-ASPNET-MVC-OutputCache-ActionFilterAttribute-Adding-substitution.aspx"&gt;the one suggested by Maarten Balliauw&lt;/a&gt;, which requires manual caching and embedding the "donut holes" as strings in the cached page.&lt;/p&gt;

&lt;p&gt;Starting from this idea, I wrote a donut caching method for my blogging engine BABiL that should be able to work with every view engine, integrates with MVC ActionResults (no change required on the views) and partial requests.&lt;/p&gt;

 &lt;p&gt;&lt;span class="more-link"&gt;&lt;a href="/lorenz.aspx/output-donut-caching-attribute-asp-net-mvc-partial-requests"&gt;More...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/klopfensteinnet/~4/po3niqjPA60" height="1" width="1"/&gt;</description>
            <author><![CDATA[Lorenz]]></author>
            <pubDate>Thu, 22 Oct 2009 13:49:54 +02:00</pubDate>
            <guid isPermalink="true" isPermaLink="false"><![CDATA[/lorenz.aspx/output-donut-caching-attribute-asp-net-mvc-partial-requests]]></guid>
            
        <feedburner:origLink>http://www.klopfenstein.net/lorenz.aspx/output-donut-caching-attribute-asp-net-mvc-partial-requests</feedburner:origLink></item>
        
        
                
    </channel>
</rss>
