<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-17097859</atom:id><lastBuildDate>Fri, 20 Mar 2026 07:11:37 +0000</lastBuildDate><category>Callback</category><category>Dotnet</category><category>work</category><title>Running through the universe, 42 steps at a time</title><description>Runner, gamer, techie, father, take your pick.</description><link>http://polkadragon.blogspot.com/</link><managingEditor>noreply@blogger.com (Sam)</managingEditor><generator>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-6688691437923139866</guid><pubDate>Tue, 03 Nov 2015 12:01:00 +0000</pubDate><atom:updated>2015-11-03T13:27:28.600+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">work</category><title>Op stap naar de Acerta Ekiden</title><description>In de categorie &quot;doe eens iets met je werk&quot; zijn we niet zo lang geleden met 12 man van Infohos Services naar Brussel getrokken om mee te doen met de Acerta Ekiden!&lt;br /&gt;
&lt;br /&gt;
De Ekiden, een aflossingsmarathon, is een traditie die overgewaaid is uit Japan, en die nu meer en meer wordt georganiseerd in onze contreien. Brussel is hier wel de grootste van en ook deze keer deden niet minder dan 1650 teams (van 6 personen elk) hier aan mee.&lt;br /&gt;
&lt;br /&gt;
Aangezien de loopkriebel blijkbaar ons bedrijf geïnfecteerd heeft (cfr eerdere deelname aan de &#39;Wings for Life&#39; in Ieper), werd er beslist om ook hier aan mee te doen, en we slaagden erin om twee teams samen te stellen (wat zeker niet slecht is, 12 man op een bedrijf van 90).&lt;br /&gt;
&lt;br /&gt;
Zoals altijd vereist in Brussel geraken een beetje organisatie, maar gelukkig was het op een zaterdag waardoor de E40 niet zo erg is als gebruikelijk.&lt;br /&gt;
Als eerste stap Cyriel naar zijn peter gebracht voor een korte babysit, tot Nele klaar was met werken (merci Bert&amp;Lot).&lt;br /&gt;
Daarna een tussenstap in Heule om Jesper, collega #1, op te pikken.&lt;br /&gt;
Daarna een tussenstap in Deinze om zelf van auto te wijzigen en met Wim, collega #2, en zijn vrouw mee te rijden naar de Heyzel.&lt;br /&gt;
Eenmaal geparkeerd, was het nog een wandeling van 10 minuten van parking C naar het stadion, maar dan waren we er eindelijk.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVqY-A4MUMp43BrYe_nPlCoCE0TwE3HKqOLUV1RqAe7Wj_TE7SDaASbAcOkUiX85Mk3bNI-KP84UvpnG6DVLPHlmoo_-5bRdVPi7GsJSOFzCATw0KW3tmATX8QWnQkh9sloUu9/s1600/015.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVqY-A4MUMp43BrYe_nPlCoCE0TwE3HKqOLUV1RqAe7Wj_TE7SDaASbAcOkUiX85Mk3bNI-KP84UvpnG6DVLPHlmoo_-5bRdVPi7GsJSOFzCATw0KW3tmATX8QWnQkh9sloUu9/s400/015.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
First things first, iedereen kostuum aantrekken en de obligate groepsfoto!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivwSHkqMAMjDKUBu_x9QAPenak0soCYsR6f6i6ytkrQaoiMOXrnXFzz4GZnqc2Z1bgXSQ_CHgTnOX1eLa-ntlV_cZ15T4PeZfFHiqYNHpHmbcIQhxGaCiSjeU1YIP9SJ4LTrS0/s1600/035.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivwSHkqMAMjDKUBu_x9QAPenak0soCYsR6f6i6ytkrQaoiMOXrnXFzz4GZnqc2Z1bgXSQ_CHgTnOX1eLa-ntlV_cZ15T4PeZfFHiqYNHpHmbcIQhxGaCiSjeU1YIP9SJ4LTrS0/s400/035.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Daarna was het tijd om het stadion te bekijken, voor mensen die dit nog nooit gezien hebben was dit best indrukwekkend, al waren er toch ook mensen die het groter verwacht hadden.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAbKxIf4FpegcVIA5HU4kSJqWYWBNTTFAB7-Vn0Cb6niplpNALmTGZBQecX3wetBT9SusMVudoZHlUkk5MiI7Wy0QQ9ogCdr-2U9KorAI5oUdXnC3B4OZ_wRZOFr-Mjnhoo_O/s1600/014.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcAbKxIf4FpegcVIA5HU4kSJqWYWBNTTFAB7-Vn0Cb6niplpNALmTGZBQecX3wetBT9SusMVudoZHlUkk5MiI7Wy0QQ9ogCdr-2U9KorAI5oUdXnC3B4OZ_wRZOFr-Mjnhoo_O/s400/014.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Daarna was het tijd voor de serieuze zaken! Onze eerste lopers van elk team vertrokken buiten het stadion, en de rest van onze teams posteerden zich in de tribunes dicht bij onze wisselzone. Dit ging niet zo eenvoudig, aangezien zowat iedereen blijkbaar dit idee had en de doorgang van tribune naar tribune niet echt ... optimaal is in het Heyzel stadion. Laat ons zeggen dat ik een nieuw begrip heb opgedaan van hoe het Heyzel drama in de tijd is kunnen ontstaan... Maar uiteindelijk stonden we toch klaar.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_RaWPTUgkOI0GI8ZorEvXGZhLrNT26dRx5ECyDU-mWRwp4Rnxl6NZHpLH-H8pFDqzY4a-anLKzBarSW1qUhxK2wCe_WcbNrk3KnRfOncCPEclYiKsXSoDqIxfdw0h5jGrXd5c/s1600/042.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_RaWPTUgkOI0GI8ZorEvXGZhLrNT26dRx5ECyDU-mWRwp4Rnxl6NZHpLH-H8pFDqzY4a-anLKzBarSW1qUhxK2wCe_WcbNrk3KnRfOncCPEclYiKsXSoDqIxfdw0h5jGrXd5c/s400/042.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
De eerste lopers kwamen al puffend terug; blijkbaar is Brussel nogal aan de heuvelachtige kant. Iedereen die al de 20km van Brussel heeft gelopen kan dit beamen.&lt;br /&gt;
&lt;br /&gt;
In het begin ging het vrij op en neer tussen onze twee teams (een beetje interne concurrentie is altijd leuk), in zoverre zelfs dat onze 4de lopers quasi gelijktijdig uit de wisselzone vertrokken! Spannend, maar daarna was het een beetje naar de knoppen gezien de loper van het &#39;andere&#39; team vlotjes 40 minuten liep op de 10km en onze loper &#39;slechts&#39; 51 minuten kon halen. Dus de kloof was geslagen, en werd nog een 6-tal minuten uitgediept door de volgende loper.&lt;br /&gt;
&lt;br /&gt;
Daarna was het eindelijk aan mezelf; dus op naar de wisselzone, samen met Jesper die laatste loper was voor het andere team. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzm3n2MxC6HjWmM5ya4s-gCZaa738rOCC8gg4vZF8OemyUZ1quiCOWOp59Z48tuGS90AWclr4uOlhAVxuXAilP08dcnABLUnksxjTFtr-wYAo3sNLm471sVQqkMl-Yl1eqWRdF/s1600/019.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzm3n2MxC6HjWmM5ya4s-gCZaa738rOCC8gg4vZF8OemyUZ1quiCOWOp59Z48tuGS90AWclr4uOlhAVxuXAilP08dcnABLUnksxjTFtr-wYAo3sNLm471sVQqkMl-Yl1eqWRdF/s400/019.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Er zijn duidelijk voor-en nadelen om als laatste loper te starten. Voordeel is dat je de rest van je team goed kan aanmoedigen, en voldoende tijd hebt om je klaar te maken. Nadeel is dat je daar wel een paar uur staat te draaien, en dreigt een beetje te verkleumen. &lt;br /&gt;
&lt;br /&gt;
Het eigenlijke lopen ging vrij goed, rekening houdende met het inderdaad extreem heuvelachtige terrein. Hoogtepunt was toen ik Tia Hellebaut kon inhalen! Toegegeven, ze is ook al even gestopt met topsport, en dat ging waarschijnlijk niet gelukt zijn in haar hoogdagen. Maar toch, ingehaald is ingehaald. Sympathieke madam overigens, Tia, die me spontaan aansprak wanneer ik haar inhaalde om te weten hoe ver we al gelopen hadden (en nogal teleurgesteld was dat het &#39;nog maar 3 km was :D).&lt;br /&gt;
&lt;br /&gt;
Uiteindelijk afgeklokt op een respectabele 34.45, en aangezien ik verre van een heuvelloper ben, was ik daar best tevreden van.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9Rx-qtv0UR4Tr8hQwpXPOWpEzE4PqHh2OcWwsr57DWyA1IpZhYh6e8jh5ccNlxqT3nzBLJ4Sfznyi0OqNrmLQqpDXtOvEVLnDav8ZKMs2F7wxdF2TM1TnaGPeG9s_jyV_ke2z/s1600/runkeeper.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9Rx-qtv0UR4Tr8hQwpXPOWpEzE4PqHh2OcWwsr57DWyA1IpZhYh6e8jh5ccNlxqT3nzBLJ4Sfznyi0OqNrmLQqpDXtOvEVLnDav8ZKMs2F7wxdF2TM1TnaGPeG9s_jyV_ke2z/s400/runkeeper.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Daarna nog wat post-run schmoozen met de collega&#39;s, in de file staan aan parking C en uiteindelijk toch thuisgeraakt. Een lange, maar leuke dag!&lt;br /&gt;
&lt;br /&gt;
</description><link>http://polkadragon.blogspot.com/2015/11/op-stap-naar-de-acerta-ekiden.html</link><author>noreply@blogger.com (Sam)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVqY-A4MUMp43BrYe_nPlCoCE0TwE3HKqOLUV1RqAe7Wj_TE7SDaASbAcOkUiX85Mk3bNI-KP84UvpnG6DVLPHlmoo_-5bRdVPi7GsJSOFzCATw0KW3tmATX8QWnQkh9sloUu9/s72-c/015.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-2374257985259526931</guid><pubDate>Sun, 25 Sep 2011 22:16:00 +0000</pubDate><atom:updated>2011-09-26T00:19:40.363+02:00</atom:updated><title>Preparing for the half marathon</title><description>Because life is about trying new things, I&#39;ve undertaken the task of running not one but two half marathons in 2 consecutive weeks, one in Kuurne and one in Oostende. 
&lt;br&gt;&lt;br&gt;
Now, the &#39;serious&#39; runner is going to scoff at this and boast that he or she once ran 4 marathons in 4 days or similar.  Fair enough, but keep in mind that running is but one aspect of my life. Between a fulltime job, a girlfriend, a busy social life, other sports and the horrid Belgian weather, I count myself lucky to get 2-3 solid running sessions in one week (and that&#39;s counting weekends!).  So maybe 2 1/2 marathons are not that trivial after all.  
&lt;br&gt;&lt;br&gt;
Having said that, I&#39;m fairly sure I can do it, I&#39;ve been training quite dilligently (for my doing anyway ;) and have succeeded in varying my training load as well, alternating long distance runs (10k, 15k) with interval runs (speed work). I&#39;m hoping the combination of the two will give me good endurance and some decent speed as well. Because, since we&#39;re a bit ambitious as well, just finishing them is not enough, secretly I&#39;d like to come in under 2 hours as well.  A feat which is not impossible, but will require a good deal of concentration and (especially) enough discipline not to go running off like a madman from the start, and paying the price later.  &lt;br&gt;&lt;br&gt;We&#39;ll see in the next two weeks.&lt;br&gt;&lt;br&gt;(Also if I don&#39;t update in the next 3 weeks, call an ambulance pls :).  

</description><link>http://polkadragon.blogspot.com/2011/09/preparing-for-half-marathon.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-2712305672708906777</guid><pubDate>Thu, 15 Sep 2011 17:15:00 +0000</pubDate><atom:updated>2011-09-15T19:19:04.001+02:00</atom:updated><title>Run Run!</title><description>Finally managed to get myself running again tonight.
&lt;br&gt;&lt;br&gt;
&lt;a href=&quot;http://runkeeper.com/user/polkadragon/activity/52339199&quot;&gt;http://runkeeper.com/user/polkadragon/activity/52339199&lt;/a&gt;
&lt;br&gt;&lt;br&gt;
Slow eh? Now keep in mind, it was an interval training. Which means you run for a certain period at maximum capacity, and then follow that up with a slow period to recover. Then fast again, then slow again. Rince, repeat.
&lt;br&gt;&lt;br&gt;
In my case it was:&lt;br&gt;
5 minute warmup slow-ish
&lt;br&gt;
1 minute fast&lt;br&gt;
1 minute slow&lt;br&gt;
(repeat 10x)&lt;br&gt;
5 minute cooldown slow-ish&lt;br&gt;
&lt;br&gt;
I can assure you that by the third fast bout, you feel like dying, that one fast minute feels like half an hour and that slow minute whizzes by!
&lt;br&gt;
The general idea is that interval training improves your aerobic capacity (increasing your speed), the high intensity intervals are supposed to boost your metabolism.
&lt;br&gt;&lt;br&gt;
For sure, my metabolism is telling me something now. Although it might be &quot;call the hospital&quot;, not entirely sure.</description><link>http://polkadragon.blogspot.com/2011/09/run-run.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-9123429790369451545</guid><pubDate>Thu, 15 Oct 2009 12:48:00 +0000</pubDate><atom:updated>2009-10-15T14:53:18.326+02:00</atom:updated><title>Reading data from a closed Stream</title><description>&lt;span style=&quot;font-weight:bold;&quot;&gt;Problem: &lt;/span&gt;&lt;br /&gt;Sometimes you need to read data from a Stream, either to save it or to process it in other layers, but you really don&#39;t want to open or pass along the Stream for too long.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Solution:&lt;/span&gt;&lt;br /&gt;At first glance, the &lt;span style=&quot;font-style:italic;&quot;&gt;GetBuffer()&lt;/span&gt; method of the Stream object would seem ideal, since it copies the text to a byte array, allowing you to close the underlying stream without any issues.&lt;br /&gt;&lt;br /&gt;However, &lt;span style=&quot;font-style:italic;&quot;&gt;GetBuffer&lt;/span&gt; has some definite issues, the biggest one being that he will pad the resulting byte array with &quot;\0&quot; (nulls), depending on how big the data in your stream is.  Which can lead to all kinds of nasty side-effects (in particular when working with XML data).&lt;br /&gt;&lt;br /&gt;Never fear, in comes the rescuer, in this case the &lt;span style=&quot;font-style:italic;&quot;&gt;ToArray()&lt;/span&gt; method of the Stream object.  This basically does everything GetBuffer does, minus the padding. And likewise, you can simply dispose of the Stream and do whatever you need to do with the data.</description><link>http://polkadragon.blogspot.com/2009/10/reading-data-from-closed-stream.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-187157079601142841</guid><pubDate>Thu, 15 Oct 2009 09:50:00 +0000</pubDate><atom:updated>2009-10-15T11:54:51.645+02:00</atom:updated><title>How to retrieve an old version of your project in Sourcesafe</title><description>• &lt;span style=&quot;font-weight:bold;&quot;&gt;Open Command Prompt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;• &lt;span style=&quot;font-weight:bold;&quot;&gt;Set Sourcesafe Directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C:\Program Files\Microsoft Visual Studio\VSS\win32&gt;set SSDIR=&amp;lt;unc path to your sourcesafe root&amp;gt;&lt;br /&gt;&lt;br /&gt;• &lt;span style=&quot;font-weight:bold;&quot;&gt;Execute GET command&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ss get $/&lt;path to your project in SS&gt; -R -Vd5/6/2009;5:16a -I-N -W -GLD:\temp\&amp;lt;your project name&amp;gt;-GTM –GWR&lt;br /&gt;&lt;br /&gt;- Project: $/Projects/&amp;lt;your project&amp;gt;: naam van het project die je wilt hebben&lt;br /&gt;- -Vd5/6/2009;5:16a: tijdstip van de bestanden die je wilt terugkrijgen (DD/MM/YYYY formaat, dus 5 juni in dit geval)&lt;br /&gt;- -GLD:\temp\&amp;lt;your project&amp;gt;: lokale folder waar de files in moeten terechtkomen</description><link>http://polkadragon.blogspot.com/2009/10/how-to-retrieve-old-version-of-your.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-519170221467782013</guid><pubDate>Fri, 09 Oct 2009 08:26:00 +0000</pubDate><atom:updated>2009-10-09T10:27:58.539+02:00</atom:updated><title>Quick Linq tip</title><description>When you crete a construction such as&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;if (list.Count &gt; 0)&lt;br /&gt;{&lt;br /&gt;                // do stuff&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;its actually much more efficient to use LINQ as such:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;if (list.Any())&lt;br /&gt;{&lt;br /&gt;                // do stuff&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Advantage: ANY will stop after the first hit, while COUNT will traverse the entire enumerator. This can be significant for larger lists.</description><link>http://polkadragon.blogspot.com/2009/10/quick-linq-tip.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-9168180402586892848</guid><pubDate>Fri, 09 Oct 2009 08:18:00 +0000</pubDate><atom:updated>2009-10-09T10:24:53.248+02:00</atom:updated><title>Validation for ComponentArt datepicker</title><description>External DatePicker Controls can be useful, and the ComponentArt sure is, except for the annoying lack of client-side validation.  Nevertheless, its not too hard to integrate your own javascript and validate your date entries.&lt;br /&gt;&lt;br /&gt;This sample uses Prototype, but you can simply replace the &#39;$&#39; by &#39;document.getElementById&#39; and you should be okay.&lt;br /&gt;&lt;br /&gt;(This also assumes you have encapsulated your date picker in a user control)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.Add a (hidden) div element to your user control&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;    &amp;lt;div style=&quot;display:none&quot; id=&quot;validationdiv&lt;%=ClientID%&gt;&quot;&amp;gt;&lt;br /&gt;        &amp;lt;asp:TextBox ID=&quot;ValidationTextBox&quot; runat=&quot;server&quot; EnableViewState=&quot;false&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;    &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Add a RequiredFieldValidator, pointing to our hidden TextBox&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;&amp;lt;asp:RequiredFieldValidator Enabled=&quot;false&quot; ID=&quot;dateValidator&quot; ControlToValidate=&quot;ValidationTextBox&quot; runat=&quot;server&quot; ErrorMessage=&quot;***&quot; Display=&quot;None&quot;&amp;gt;&amp;lt;/asp:RequiredFieldValidator&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3.Expand your javascript handlers, to change your textbox values when the Calendar/Picker values change.&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;function MarkAsValidationOk&lt;%=ClientID%&gt;()&lt;br /&gt;{&lt;br /&gt;    $(&#39;&lt;%=ValidationTextBox.ClientID%&gt;&#39;).value = true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function MarkAsValidationNOk&lt;%=ClientID%&gt;()&lt;br /&gt;{&lt;br /&gt;    $(&#39;&lt;%=ValidationTextBox.ClientID%&gt;&#39;).value = “”;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;function Picker1_onSelectionChanged(sender, eventArgs)&lt;br /&gt;{&lt;br /&gt; sender.AssociatedCalendar.setSelectedDate(sender.getSelectedDate());&lt;br /&gt;MarkAsValidationOk&lt;%=ClientID%&gt;()}&lt;br /&gt;&lt;br /&gt;function Calendar_OnSelectionChanged(calendar)&lt;br /&gt;{&lt;br /&gt;calendar.AssociatedPicker.SetSelectedDate(calendar.GetSelectedDate());&lt;br /&gt;MarkAsValidationOk&lt;%=ClientID%&gt;()}&lt;br /&gt;&lt;br /&gt;function ClearCalendar&lt;%= Calendar1.ClientObjectId %&gt;()&lt;br /&gt;{&lt;br /&gt;                &lt;%= Calendar1.ClientObjectId %&gt;.ClearSelectedDate();&lt;br /&gt;&lt;%= Picker1.ClientObjectId %&gt;.ClearSelectedDate();&lt;br /&gt;                 MarkAsValidationNOk&lt;%=ClientID%&gt;()&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4. Add some configuration settings to your user control Codebehind. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;public bool EnableValidation  {  set { dateValidator.Enabled = value; }   }&lt;br /&gt;        public string ValidationErrorMessage  { set { dateValidator.ErrorMessage = value; }   }&lt;br /&gt;        public string ValidationGroup  {  set { dateValidator.ValidationGroup = value; }    }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5. Expand your &#39;setdate&#39; server-side functionality to flag validation as ok.&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;font-style:italic;&quot;&gt;  &lt;span style=&quot;font-weight:bold;&quot;&gt;  public void SetDate(DateTime date)&lt;br /&gt;        {&lt;br /&gt;            Calendar1.SelectedDate = date;&lt;br /&gt;            Picker1.SelectedDate = date;&lt;br /&gt;            timeSelectorControl.DefaultHour = date.Hour;&lt;br /&gt;            timeSelectorControl.DefaultMinute = date.Minute;&lt;br /&gt;&lt;br /&gt;            Page.ClientScript.RegisterStartupScript(GetType(), &quot;datejs&quot; + ClientID, &quot;MarkAsValidationOk&quot; + ClientID  + &quot;();&quot;, true);&lt;br /&gt;        }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6. All done, now you can simply enable validation by setting some properties in the page that uses your control:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;&amp;lt;uc1:CalendarPicker ID=&quot;birthdayPicker&quot; EnableValidation=&quot;true&quot; ValidationGroup=&quot;EmployeeValidationGroup&quot; ValidationErrorMessage=&quot;BirthDate_Required&quot; runat=&quot;server&quot; ShowTimePart=&quot;false&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;</description><link>http://polkadragon.blogspot.com/2009/10/validation-for-componentart-datepicker.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-1763788329887908606</guid><pubDate>Fri, 09 Oct 2009 08:07:00 +0000</pubDate><atom:updated>2009-10-09T10:11:42.350+02:00</atom:updated><title>Selecting all checkboxes with Prootype</title><description>For creating a &quot;Select All Checkboxes&quot; link in javascript:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;function CheckAll()&lt;br /&gt;{&lt;br /&gt;    var allCheckboxes = $$(&#39;input[type=checkbox]&#39;);&lt;br /&gt;    allCheckboxes.each(function(e) { e.click(); });&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Don&#39;t use e.checked = true, because it doesn&#39;t trigger the Grid_Item_CheckChanged events of the ComponentArt grid.</description><link>http://polkadragon.blogspot.com/2009/10/selecting-all-checkboxes-with-prootype.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-6483435555278401699</guid><pubDate>Wed, 30 Jan 2008 11:11:00 +0000</pubDate><atom:updated>2008-02-05T16:42:04.061+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Callback</category><category domain="http://www.blogger.com/atom/ns#">Dotnet</category><title>Mind your callbacks</title><description>These days I&#39;m using quite a lot of &lt;span style=&quot;font-style:italic;&quot;&gt;Callbacks&lt;/span&gt;, that is requests to the server that don&#39;t refresh the entire page, but only a specific section, creating the illusion of a snappier user interface.  As such, they are becoming a necessity in these days of Users 2.0 (ie users who have gotten used to Web 2.0 functionalities, much as I loathe the term).&lt;br /&gt;&lt;br /&gt;Google were one of the main early adopters of callbacks, but now everyone is doing it, and so are the main out-of-the-box software vendors such as Telerik or ComponentArt. These days the challenge would be to find a grid that does &lt;span style=&quot;font-weight:bold;&quot;&gt;not&lt;/span&gt; implement the latest AJAX-style gadgets.&lt;br /&gt;&lt;br /&gt;Our 3rd party vendor of choice is currently ComponentArt, and I&#39;ve been using their Callback mechanisms quite extensively lately. They&#39;re quite good, although sometimes its still necessary to go down to the nitty-gritty of client-side scripting, which is not for the faint of hearted.&lt;br /&gt;&lt;br /&gt;Of course, while callbacks are great, they tend to have a big impact on they way your applications are constructed, amongst others interfering with what we consider &quot;best practices&quot;, such as:&lt;br /&gt;&lt;br /&gt;* Strong Typing (hello Mr JavaScript)&lt;br /&gt;* Error Handling (an alert window does not make an error handler)&lt;br /&gt;* Intellisense (maybe not a best practice, but damn handy to have anyway)&lt;br /&gt;&lt;br /&gt;Anyway, in the end its just (yet) another technology paradigma shift and most of those &quot;best practice&quot; challenges  can be solved decently enough, given a little time and effort. Lets take error handling as an example:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Problem:&lt;/span&gt; When an error occurs during a Callback, the typical error message is &quot;Data cannot be loaded&quot;, delivered in the form of a javascript alert. Not too useful, not to mention the fact that your page is potentially left in a compromised state.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Solution:&lt;/span&gt; In the end, the Callback method is just another server-side method, so encapsulate it in an try/catch block and provide adequate error handling. After that, generate some client-side script to redirect the user away from the page to some nice error page.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;protected void MyCallBack(object sender, CallBackEventArgs e)&lt;br /&gt;{&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                    BindGrid();&lt;br /&gt;                    panel.RenderControl(e.Output);&lt;br /&gt;            }&lt;br /&gt;            catch(Exception ex)&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;                new ErrorReporter().HandleError(Request, ex);&lt;br /&gt;                CallBackErrorHandler.RedirectToErrorPage(&quot;Error.aspx&quot;, panel, e.Output);&lt;br /&gt;            }&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;and then in our CallBackErrorHandler class:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;    public static class CallBackErrorHandler&lt;br /&gt;    {&lt;br /&gt;        public static void RedirectToErrorPage(string redirectUrl, Control container, HtmlTextWriter output)&lt;br /&gt;        {&lt;br /&gt;            string str = &quot;&amp;lt;script type=&#39;text/javascript&#39;&amp;gt;&quot;;&lt;br /&gt;            str += &quot;window.location = &#39;&quot; + redirectUrl + &quot;&#39;&amp;lt;/script&amp;gt;&quot;;&lt;br /&gt;            Literal lit = new Literal();&lt;br /&gt;            lit.Text = str;&lt;br /&gt;            container.Controls.Add(lit);&lt;br /&gt;            container.RenderControl(output);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Old tricks, new techology :)</description><link>http://polkadragon.blogspot.com/2008/01/mind-your-callbacks.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-6688649129216595158</guid><pubDate>Mon, 21 Jan 2008 12:24:00 +0000</pubDate><atom:updated>2008-01-21T13:34:25.839+01:00</atom:updated><title>Dynamic Services</title><description>Something useful I recently learned:&lt;br /&gt;&lt;br /&gt;While you can without any problem attach parameters to a .NET Windows Service (by means of a configuration file), how the heck am I supposed to enter parameters into the &lt;span style=&quot;font-weight:bold;&quot;&gt;INSTALL &lt;/span&gt; program itself (such as, the service name...).&lt;br /&gt;&lt;br /&gt;The answer was simple:  InstallUtil.exe (the installer program) can actually be called with command-line parameters appended to it.  These can then easily be processed in the installer class itself.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;installutil /DisplayName=Sam &quot; WindowsService1.exe&quot;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And then in your installer.cs file:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;        protected override void OnBeforeInstall(IDictionary savedState)&lt;br /&gt;        {&lt;br /&gt;            base.OnBeforeInstall(savedState);&lt;br /&gt;            string name = Context.Parameters[&quot;DisplayName&quot;];&lt;br /&gt;            if (name != null)&lt;br /&gt;                serviceInstaller1.ServiceName = name;&lt;br /&gt;        }&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Take care:&lt;/span&gt; this needs to happen in your OnBeforeInstall handler, after that your Context will be NULL!</description><link>http://polkadragon.blogspot.com/2008/01/dynamic-services.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-7027697871839960077</guid><pubDate>Thu, 17 Jan 2008 15:06:00 +0000</pubDate><atom:updated>2008-01-21T13:23:25.913+01:00</atom:updated><title>WebExceptions and you</title><description>Every now and then, one of my applications was throwing up an error of type &lt;span style=&quot;font-weight:bold;&quot;&gt;&#39;System.Net.WebException: The request was aborted: The request was canceled&#39;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This happened during execution of a SOAP webservice call towards a backend system. Problem was, it was almost impossible to reproduce, happening as it did on irregular, non-deterministic moments.  I only noticed it because of an automatic error reporter, which automatically mails any exceptions to a public Outlook folder.&lt;br /&gt;&lt;br /&gt;After finding some time to investigate the issue, I found that it was apparently a known issue, related to the Keep-Alive property of the HTTP Request itself.  Apparently, every now and then, IIS ate the webservice request, when Keep-Alive was true.&lt;br /&gt;&lt;br /&gt;One possible solution was of course to disable Keep-Alive on the IIS level.  While this would no doubt solve the problem, it is kinda overkill and can have negative implications on the performance of the application as a whole (Keep-Alive is there for a reason, you know).&lt;br /&gt;&lt;br /&gt;A better solution is to disable Keep-Alive for the SOAP request only, and leave it on for the other requests.  This was slightly complicated by the fact that - like most .NET users - we don&#39;t actually code our webservice consumption classes ourself, but use generated Proxy classes, obtained by either wsdl.exe or by adding a Web Reference in VS.NET. Luckily, by means of a simple subclass, we could dance around this problem and keep our code generation intact.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;    &lt;br /&gt;public class MyCustomService : MyGeneratedService&lt;br /&gt;    {&lt;br /&gt;        protected override WebRequest GetWebRequest(Uri uri)&lt;br /&gt;        {&lt;br /&gt;            HttpWebRequest request = (HttpWebRequest)base.GetWebRequest(uri);&lt;br /&gt;            request.KeepAlive = false;&lt;br /&gt;&lt;br /&gt;            return request;&lt;br /&gt;        }&lt;br /&gt;    }&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;After introducing these changes for each SOAP request, the intermittent WebException has dissapeared.  Life is good.</description><link>http://polkadragon.blogspot.com/2008/01/webexceptions-and-you.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-6369672181031847683</guid><pubDate>Wed, 12 Sep 2007 20:20:00 +0000</pubDate><atom:updated>2008-01-18T09:05:34.296+01:00</atom:updated><title>Making perfect software in a non-perfect world</title><description>Ideally, every software project would be lavishly described and work in his own little world, having a dedicated database and no dependencies that slow you down.  In such conditions, you can just sit yourself down, and work uninterrupted, quickly reaching Programming Nirvana.&lt;br /&gt;&lt;br /&gt;Of course, no real project is ever like that, so the trick then becomes how do we work in an environment where your data is spread out over several applications, and these applications each have their own timetable and their own priorities. One of the possible techniques is called &lt;i&gt;Stubbing&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Stubbing&lt;/span&gt;&lt;/span&gt;  or Mocking is a technique that is much better described by the likes of Martin Fowler, and other high-profile architects but in short, its a way of first hiding away the implementation of a complex subsystem by only exposing the interface to those applications that will be using it and then code against a simplified (or dummy) implementation of that interface, while the &#39;real&#39; application is being made.&lt;br /&gt;This allows you to continue with the rest of your app, and come back to the subsystem&lt;br /&gt;when you have successfully driven your users into a corner and forced them to do their work.&lt;br /&gt;&lt;br /&gt;The concept of Stubbing seems to scare a lot of developers, because on the surface it seems to be something for huge projects and - lets face it - is often explained in needlessly complex terms.  This is unfortunate because even in smaller projects, stubbing can be a very useful technique and doesn&#39;t have to be extremely complicated.&lt;br /&gt;&lt;br /&gt;An example to illustrate.&lt;br /&gt;&lt;br /&gt;You&#39;re tasked to implement a medium-sized SOA project, but you need to get some data from your local AS400 system.  Unfortunately, the AS400 guy has just fallen off his roof and will be out for the next two weeks. So instead of twiddling your thumbs for two weeks, Stubbing will allow you to implement the other tasks at least and leave the implementation of the AS400 subsystem for later.&lt;br /&gt;&lt;br /&gt;So what we need is essentially a system that is going to pretend to be an As400 and that allows us to &quot;plug&quot; this in dynamically (meaning, when the actual AS400 application becomes available, we don&#39;t have to change much code - preferably none!).&lt;br /&gt;&lt;br /&gt;To implement this, we&#39;ll start by creating an &lt;i&gt;Interface&lt;/i&gt;.  Learn to love those, they are your best friend.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;public interface IAs400Connector&lt;br /&gt;{&lt;br /&gt;   PORT GetLines(string user, string from, string to);&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Next step, create our &#39;stub&#39; class and implement this interface.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;public class StubAs400Connector : IAs400Connector&lt;br /&gt;{&lt;br /&gt;       public PORT GetLines(string user, string from, string to)&lt;br /&gt;       {&lt;br /&gt;           string fileName = &quot;Sample.xml&quot;;&lt;br /&gt;           string xml;&lt;br /&gt;           using (StreamReader streamReader = new StreamReader(fileName))&lt;br /&gt;           {&lt;br /&gt;               xml = streamReader.ReadToEnd();&lt;br /&gt;           }&lt;br /&gt;&lt;br /&gt;           return XmlPortSerializer&lt;port&gt;.DeSerialize(xml);&lt;br /&gt;       }&lt;br /&gt;}&lt;/port&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;When creating a stub class, its always a good idea to structure your stub data &lt;i&gt;as close as you can&lt;/i&gt; to the original data.  That way, you&#39;ll limit the work you have to do when you plug in the real class later on.  In this particular instance, we assume that the AS400 developers can give us a DTD or a Schema beforehand, so we can easily generate some sample data which should be very similar to the real thing (in theory).  Implementation then simply consists of reading the XML sample file, and deserializing it into a custom object (which has been previously generated by a tool such as XSD.exe).&lt;br /&gt;&lt;br /&gt;The hard? part is mostly done now, all that remains is to implement a little Factory, so that the calling application doesn&#39;t have to worry about instantiating the right Connector. In fact, we&#39;ll go one step further and push that decision right to the configuration file.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;public static class As400ConnectorFactory&lt;br /&gt;{&lt;br /&gt;private static IAs400Connector connector;&lt;br /&gt;&lt;br /&gt;       public static IAs400Connector GetAs400Connector()&lt;br /&gt;       {&lt;br /&gt;           if (connector == null)&lt;br /&gt;               connector = (IAs400Connector)Activator.CreateInstance(Type.GetType(Settings.Default.As400Connector));&lt;br /&gt;&lt;br /&gt;           return connector;         &lt;br /&gt;       }&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;There&#39;s a few things going on here.  First of all, we make use of the &lt;b&gt;Properties&lt;/b&gt; feature of .NET 2.0, in which you can include dynamic,&lt;br /&gt;strongly-typed properties in your project and have those populated by the calling application through means of a configuration file, as seen below. These settings can then be called in your application, through an (autogenerated) strongly-typed Settings class.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&amp;lt;configsections&amp;gt;&lt;br /&gt;&amp;lt;sectiongroup name=&quot;applicationSettings&quot; type=&quot;System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral,   PublicKeyToken=b77a5c561934e089&quot;&amp;gt;&lt;br /&gt;&amp;lt;section name=&quot;Project.As400Connector.Properties.Settings&quot; type=&quot;System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,   Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; requirepermission=&quot;false&quot;&amp;gt;&lt;br /&gt;&amp;lt;/section&amp;gt;&lt;br /&gt;&amp;lt;/sectiongroup&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;applicationsettings&amp;gt;&lt;br /&gt;&amp;lt;project.as400connector.properties.settings&amp;gt;&lt;br /&gt; &amp;lt;setting name=&quot;As400Connector&quot; serializeas=&quot;String&quot;&amp;gt;&lt;br /&gt;  &amp;lt;value&gt;Project.As400Connector.StubAs400Connector, Project.As400Connector&lt;/value&gt;&lt;br /&gt; &amp;lt;/setting&amp;gt;  &lt;br /&gt;&amp;lt;/project.as400connector.properties.settings&amp;gt;&lt;br /&gt;&amp;lt;/applicationsettings&gt;&amp;lt;/configsections&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Second, we then use Reflection to instantiate the Connector specified in the configuration file.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;connector = (IAs400Connector)Activator.CreateInstance(Type.GetType(Settings.Default.As400Connector));&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If you&#39;re worried about using Reflection to create your class on every request, just make the connector static like I did, that way it&#39;ll get cached. Keep in mind that you&#39;ll need to reset the application then, if you want to force a change in connector. Of course, if you use this in a web context, changing the Web.Config will automatically reset your application anyway, so its a moot point :)&lt;br /&gt;&lt;br /&gt;Now, you can merrily start designing your screens and grids and lists and whatnots, without stressing about the lack of data. Once your AS400 boys then finish their work, you code the &#39;real&#39; Connector class, switch to it in your configuration file and test with the real data. If everyone has done their homework, the work left should then be minimal (mostly validating the length of the real data and taking out some inevitable quirks).&lt;br /&gt;&lt;br /&gt;While this is obviously a very simple example, in larger projects nothing is stopping you from implementing a much more complex stubbing system, if needed.</description><link>http://polkadragon.blogspot.com/2007/09/making-perfect-software-in-non-perfect.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-7550126497999206715</guid><pubDate>Thu, 11 Jan 2007 15:11:00 +0000</pubDate><atom:updated>2007-01-11T16:17:28.950+01:00</atom:updated><title>Not for publication</title><description>After performing a &quot;Publish website&quot; operation on my ASP.NET 2.0 web project, I got the following error upon browsing to the newly-deployed site:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;em&gt;&lt;strong&gt;CS0433: The type &#39;ProfileCommon&#39; exists in both &lt;br /&gt;&#39;c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET &lt;br /&gt;Files\root\dc8cbf9e\f05d928b\assembly\dl3\2f0caf74\881e5468_eec7c601\App_Code.DLL&#39; &lt;br /&gt;and &#39;c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET &lt;br /&gt;Files\root\dc8cbf9e\f05d928b\App_Code.r_z1bmqm.dll &#39;&lt;/strong&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;which is of course quite nonsensical as the two directories listed above are in fact the same.&lt;br /&gt;&lt;br /&gt;After some investigation, I found that the root of the problem was that I had marked the website as &quot;Precompiled&quot; during the publish operation AND I had subsequently deleted the &quot;PrecompiledApp.config&quot; file upon completion...&lt;br /&gt;&lt;br /&gt;Apparently, that little config file tells the Dotnet runtime that the file is already compiled, and as such shouldn&#39;t be compiled (again). Without that file, all kinds of conflicts arise between the precompiled files and the newly-compiled file.&lt;br /&gt;&lt;br /&gt;So, in summary.&lt;br /&gt;&lt;br /&gt;Publishing websites precompiled GOOD ^-^&lt;br /&gt;Deleting PrecompiledApp.config afterwards BAD &gt;.&lt;</description><link>http://polkadragon.blogspot.com/2007/01/not-for-publication.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-3218131090856790312</guid><pubDate>Tue, 28 Nov 2006 12:14:00 +0000</pubDate><atom:updated>2006-11-28T13:34:31.490+01:00</atom:updated><title>The Case of the Overzealous Profile</title><description>Asp.NET 2.0 ships with a wonderful feature called &quot;Profile&quot;, which is essentially a server-side replacement for cookies, most commonly used for persisting user settings. The advantage of the server-side solution being of course that you&#39;re not dependant anymore on users actually supporting cookies and/or deciding to delete them in a sudden fit of paranoia. ***&lt;br /&gt;&lt;br /&gt;Another nice thing about the Profile is that it follows the &lt;em&gt;Provider&lt;/em&gt; model and ships with a pre-working SQL Server implementation.&lt;br /&gt;&lt;br /&gt;In a recent ASP.NET application, we made some extensive use of the Profile in our searchscreens, however since we were working on an Oracle database, we had to create our own custom Provider. This is however absolutely no problem since DotNet makes it really easy to do so, and to plug your resulting custom provider into your application without any hassle.&lt;br /&gt;&lt;br /&gt;However, we did notice a performance degradation upon use of the Profile, and we occasionally even got Oracle errors, when the application received a lot of strain. When we finally found some time to investigate the issue, we discovered that the &lt;strong&gt;SetPropertyValue&lt;/strong&gt; method of the Provider was being called on &lt;em&gt;each and every visit to the page&lt;/em&gt; and this for &lt;em&gt;&lt;u&gt;every&lt;/u&gt; &lt;/em&gt;available property in our Profile, resulting in at least 15-20 extra database calls per page access. Needless to say, this did not help performance one bit.&lt;br /&gt;&lt;br /&gt;After digging around some more, it turned out that the Profile mechanism has in fact an auto-load and auto-save mechanism built-in. In other words:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;at the start of the page cycle, all properties get read from the data store&lt;/li&gt;&lt;li&gt;at the end of the page cycle, all properties get persisted to the data store&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Fortunately, there was also an option to turn this automatic save off, this by a simple modification of the &lt;em&gt;web.config&lt;/em&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt; profile automaticSaveEnabled=&quot;false&quot;&gt;&lt;/p&gt;Not quite as well-documented as I&#39;d hoped though...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;*** Note that the Profile can however be enabled for &lt;em&gt;anonymous&lt;/em&gt; usage, in this case you will need cookies again for this to work. :)</description><link>http://polkadragon.blogspot.com/2006/11/case-of-overzealous-profile.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-7483902212191724508</guid><pubDate>Mon, 27 Nov 2006 12:30:00 +0000</pubDate><atom:updated>2006-11-27T13:32:34.489+01:00</atom:updated><title>How to take Control... of your controls</title><description>&lt;p&gt;When creating custom ASP.NET controls, there&#39;s the question of which baseclass to use for your control.&lt;br /&gt;Generally speaking, you have three big categories:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Rendered Controls&lt;/li&gt;&lt;li&gt;Container Controls&lt;/li&gt;&lt;li&gt;Inherited Controls&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Of those choices, &lt;em&gt;inherited controls&lt;/em&gt; are the simplest, in that they simply inherit from an existing control (custom or otherwise). An example would be inheriting from a DropDownList and adding some custom code to pre-populate it. Or a ConfirmButton control, which inherits from Button, and automatically renders a &quot;are you sure?&quot; javascript alert when you click it. Inherited Controls are to be used when you want all the functionality of a certain control, and then just &quot;something&quot; extra.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Rendered Controls&lt;/em&gt; are created by inheriting from the WebControl class. They operate by directly injecting HTML into the output stream. As such they bypass the normal event lifecycle for any of its containing subcontrols. The result is that a Rendered Control will render much faster than a Container Control, but does not support event postbacks &#39;out-of-the-box&#39;. While it is possible to provide these events, by means of implementing IPostBackEventHandler and IPostBackDataHandler, and then providing custom code to handle these events, this does raise complexity a bit and tends to create quite cluttered code. It is advisable then, to only use Rendered Controls, for simple, mostly static controls.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Container Controls&lt;/em&gt;, as their name implies, function as containers or collections for other controls. They are implemented by inheriting from CompositeControl. Your subcontrols are dynamically added to the Control collection of your CompositeControl, and they will then go through their normal event lifecycle, allowing you to customise them as needed. While this functionality comes at a price (somewhat worse performance compared to Rendered Controls), it allows you to build your webcontrols in a true object-oriented fashion, and apply all your usual Design Patterns to them. It also makes it much easier to inherit from your own controls, and in doing so, create an reusable and extensible library of server controls.&lt;br /&gt;&lt;br /&gt;The choice between those three types of controls is - as is usually the case - dependant on the requirements of your project, but generally speaking, Composite Controls will be your best friend the moment your controls become a bit more complex and require event interaction.&lt;/p&gt;</description><link>http://polkadragon.blogspot.com/2006/11/how-to-take-control-of-your-controls.html</link><author>noreply@blogger.com (Sam)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-113995065922579876</guid><pubDate>Tue, 14 Feb 2006 20:55:00 +0000</pubDate><atom:updated>2006-02-14T22:03:22.693+01:00</atom:updated><title>Sometimes it really is _that_ easy</title><description>Sharepoint has a Page Viewer webpart, allowing you to integrate external applications into your Portal. Very useful, but sometimes this presents problems of its own.&lt;br /&gt;&lt;br /&gt;Case in point, one of our clients used this webpart to integrate his .NET web application in a WSS site, and had some trouble with his Session variables not showing up, when viewed through the webpart.  Logical, if you think about it, because the site is being referenced through an Iframe of another site, so your cookies are not going to be accessible.  Its not a bug, its a feature! In this case, a security feature, because how would you like it if any external site could just frame you (pun intended) and nose around in your cookies?&lt;br /&gt;&lt;br /&gt;Faced with the prospect of having to rewrite his entire application without Session variables, the client&#39;s developer started considering jumping off the nearest bridge.  That is, until I pointed out to him that he could simply switch the session state handling in his .NET application by modifying the web.config.&lt;br /&gt;   &lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt; sessionState mode=&quot;InProc&quot; stateConnectionString=&quot;tcpip=127.0.0.1:42424&quot;&lt;br /&gt;sqlConnectionString=&quot;data source=127.0.0.1;user id=sa;password=&quot;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;cookieless=&quot;true&quot;&lt;/span&gt; &lt;br /&gt;timeout=&quot;20&quot; &lt;br /&gt;/&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;By setting the &quot;cookieless&quot; attribute to true, ASP.NET will automatically (and with no impact on the application!), switch from using cookies to track session ids to appending a session identifier to the Url.  No fuss, no need to rewrite your application!&lt;br /&gt;&lt;br /&gt;Problem solved, client happy. If only everything was so easy.</description><link>http://polkadragon.blogspot.com/2006/02/sometimes-it-really-is-that-easy.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-113748515262627930</guid><pubDate>Tue, 17 Jan 2006 08:02:00 +0000</pubDate><atom:updated>2006-01-17T09:05:52.636+01:00</atom:updated><title>Alive</title><description>Yes, I&#39;m still alive.&lt;br /&gt;&lt;br /&gt;I&#39;ll post a proper update soon, but in the meantime, this might be a good read.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.blognet.info/weblogs/entry.php?u=adhalejr&amp;e_id=1560&quot; target=new&gt;Tale of conversion from an ASP.NET 1.1 application to 2.0&lt;/a&gt;</description><link>http://polkadragon.blogspot.com/2006/01/alive.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-113197733032013213</guid><pubDate>Mon, 14 Nov 2005 13:55:00 +0000</pubDate><atom:updated>2005-11-14T15:08:50.330+01:00</atom:updated><title>Old Dog, New Trick</title><description>Want to implement &quot;Created By&quot; fields for your custom tables in your SharePoint environment?&lt;br /&gt;&lt;br /&gt;Fairly easy to do, once you know how to ;)&lt;br /&gt;&lt;br /&gt;The trick is to use a not-so-well-kown SQL Server method called &quot;SYSTEM_USER&quot;, this will automatically be filled with the SQL Server authenticated user, whether thats a SQL User or a Windows User.&lt;br /&gt;&lt;br /&gt;So, first make a CreatedBy field on your table.&lt;br /&gt;Then create an insert trigger, and use the SYSTEM_USER method to fill the field.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CREATE TRIGGER MyTable_FillCreatedBy&lt;br /&gt;ON dbo.MyTable&lt;br /&gt;FOR INSERT&lt;br /&gt;AS&lt;br /&gt;UPDATE MyTable SET CreatedBy = SYSTEM_USER WHERE ID = (SELECT ID FROM INSERTED)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Then of course, you need to correctly configure your authentication towards your custom database. &lt;br /&gt;In case of SQL Authentication, just set the correct user and config in your application configuration file (such as web.config). &lt;br /&gt;In case of Windows Authentication, its somewhat more complicated.&lt;br /&gt;First, you need to change your connection string to Integrated Windows Authentication.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDb;Data Source=127.0.0.1&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Make sure the &#39;Identitity Impersonate&#39; tag is also set to true!&lt;br /&gt;&lt;br /&gt;Then you need to add the necessary user accounts as logins to your SQL Server.  Its generally speaking a good idea to work with a *group*, give that group access to your database and add all users that need access to your group.&lt;br /&gt;&lt;br /&gt;The nice thing is that SYSTEM_USER is still going to fill in the individual logged-in user even though only the group has access to the SQL Server.&lt;br /&gt;&lt;br /&gt;One big gotcha with Windows Authentication is that it won&#39;t work when your SQL Server is on a different server than your Sharepoint (or more in general, IIS) server, at least not when your network is configured with NT Authentication as opposed to Kerberos.  There are a few basic fixes for this:&lt;br /&gt;1) Use SQL Authentication ;)&lt;br /&gt;2) Setup Sharepoint to use Kerberos authentication (not so trivial)&lt;br /&gt;3) Setup a &#39;trust&#39; relationship between the two servers (fiddly)</description><link>http://polkadragon.blogspot.com/2005/11/old-dog-new-trick.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-112929299346248648</guid><pubDate>Fri, 14 Oct 2005 12:25:00 +0000</pubDate><atom:updated>2005-10-14T14:29:53.466+02:00</atom:updated><title>Need a plumber?</title><description>Sometimes with all the glittering IDE&#39;s and the Autocomplete features in our development tools, its easy to forget that those too, are just (or have been) someone else&#39;s software project and are as such subject to the same deadlines, feature creeps and illogical decisions that our own projects sometimes experience.&lt;br /&gt;&lt;br /&gt;Therefore, no matter how shiny a tool may be, always remember that it may have its own logic and ideosyncracies underneath. Because you don&#39;t know (and you probably don&#39;t *want* to know) what happened in the development lifecycle.  Also, most products are really a hodge-podge of various other technologies, some of which were written by 3rd parties, and I&#39;m sure had questionable documentation ;)&lt;br /&gt;&lt;br /&gt;Self-proclaimed software guru &lt;a href=&quot;http://www.joelonsoftware.com&quot; target=&quot;new&quot;&gt;&lt;strong&gt;Joel Spolsky&lt;/strong&gt;&lt;/a&gt; called it the &quot;Law of Leaky Abstractions&quot; in one of his essays and that a pretty good analogy.&lt;br /&gt;&lt;br /&gt;We recently met one of those leaky abstractions, in the follow-up of a BizTalk project in which a client had some encoding troubles consuming a .NET webservice from his PHP webserver.  In the course of investigating the problem, we traced it all the way from a File Pickup port through an Orchestration schedule, to the Send Port and finally up to the (generated) webservice itself.  Having determined that all of the previous steps didn&#39;t help in resolving the problem, we then went about the process to change the encoding in the webservice itself (even though its a less-than-optimal solution, because Biztalk regenerates that webservice when you deploy). &lt;br /&gt;&lt;br /&gt;So we edited the Web.Config of the webservice, and changed the following line:&lt;br /&gt;&amp;lt;globalization requestEncoding=&quot;utf-8&quot; responseEncoding=&quot;utf-8&quot;/&amp;gt;&lt;br /&gt;to&lt;br /&gt;&amp;lt;globalization requestEncoding=&quot;utf-16&quot; responseEncoding=&quot;utf-16&quot;/&amp;gt;&lt;br /&gt;&lt;br /&gt;Save web.config, refresh the webservice client, look at the results.&lt;br /&gt;And absolutely nothing changed...&lt;br /&gt;&lt;br /&gt;When even a IISReset didn&#39;t help the problem (programmer&#39;s superstition...), we did some more research and suddenly found this:&lt;br /&gt;&lt;a href=&quot;http://weblogs.asp.net/tmarman/archive/2004/02/02/66476.aspx&quot; target=&quot;new&quot;&gt;http://weblogs.asp.net/tmarman/archive/2004/02/02/66476.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So change that globalization tag all you want, change the encoding by other means, pin needles in a voodoo doll, its just not going to work, because apparently ASMX&#39;s are hardcoded to UTF-8...&lt;br /&gt;&lt;br /&gt;Make sure you also read the first comment on this blogentry, as its apparently from some Microsoft employee who was involved in the process. ;)&lt;br /&gt;&lt;br /&gt;So remember this when next time you wonder why a piece of software doesn&#39;t what you wanted.  There&#39;s probably a leak somewhere ;)</description><link>http://polkadragon.blogspot.com/2005/10/need-plumber.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-112869619283882004</guid><pubDate>Fri, 07 Oct 2005 14:39:00 +0000</pubDate><atom:updated>2005-10-07T16:44:14.433+02:00</atom:updated><title>Design vs Deadline</title><description>One of the most controversial topics between programmers is the discussion of &quot;design vs getting things done&quot;. It takes place on many different levels, from the low-level data-access strategy (DataSets vs Typed Objects), to the higher-level architectural descisions of reusability, extensibility, etc.&lt;br /&gt;&lt;br /&gt;The good thing about Microsoft .NET is (IMO) that for the first time - using Microsoft technologies - you can now sort of combine both. .NET allows you to create fully-fledged object-oriented, event-based, strongly-typed applications, which - from a design point of view - are infinitely much better constructed than most VB6 applications. Make no mistakes though, even in .NET its completely possible to write crappy applications, and unfortunately it gets done a lot.&lt;br /&gt;&lt;br /&gt;The situation gets even more complicated when you add a product to the mix, lets take - as an example - SharePoint? ;)Sharepoint allows you to extend its out-of-the-box functionality with Webparts, which are really just a specific kind of Asp.Net user controls. Problem is, Sharepoint has its own logic, which makes a number of &#39;normal&#39; sound design principles more problematic (client-side validation using Validators being one).&lt;br /&gt;&lt;br /&gt;Again though, with a little effort, it is possible to create a well-structured application even in Sharepoint. As an example, in a recent project, we needed to create a webpart, which would, when the user put the page in Design Mode, automatically display a fairly complex user administration part. This admin part would then manipulate those values and have to pesist them as properties in the WebPart.&lt;br /&gt;&lt;br /&gt;Now, speaking in design terms, two obvious choices presented itself.&lt;br /&gt;&lt;br /&gt;1. Implement the functionality in the WebPart itself, resulting in a flat less-complex structure, but also quite quickly leading to spaghetti code, especially if the desired functionality is moderately complex. Plus, from a design POV, the level of abstraction is practically zero, which will not encourage reuse and/or extensions of the webpart.&lt;br /&gt;&lt;br /&gt;2. Create a series of ASP.NET user controls, and use LoadControl on the top-level user control to add him to the control collection of the webpart. Its elegant, its sound design-wise, but it does raise the problem, how do we communicate between the &#39;layers&#39;. Its the classic circular reference problem, webpart needs to know about user control to create it, and user control needs to know about webpart to give some information back to it. Circular references are solveable usually, but even if it was solved it would still leave you with a user control who somehow knows he&#39;ll be included in a webpart, which is again Bad Design.&lt;br /&gt;&lt;br /&gt;So whats the solution then? Any experienced control builder in .NET will now be screaming it. *Events* of course. That wonderful mechanism, IMO one of the better features of .NET alltogether, that allows us to decouple layers from one another and create true plug-and-play usercontrols.&lt;br /&gt;&lt;br /&gt;So, you set up the following situation:&lt;br /&gt;&lt;br /&gt;- Webpart creates UserControl through LoadControl&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;MyCustomControl myControl = (MyCustomControl) Page.LoadControl(&quot;MyCustomControl.ascx&quot;);&lt;/span&gt; &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;- Webpart subscribes to the OnDataChanged event from the UserControl&lt;br /&gt;&lt;/strong&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;strong&gt;myControl.OnDataChanged += new MyDataEventHandler( myControl_OnDataChanged );&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3333ff;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;- Webpart adds control to his own control collection&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;pnl = new Panel();&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;pnl.Controls.Add(myControl);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;Controls.Add(pnl);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;- Something happens in the control, and it raises the OnDataChanged event. Thats all the control needs to do, no &#39;upper references&#39; needed.&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;private void changeButton_Click(object sender, System.EventArgs e)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{ &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;if ( OnDataChanged != null ) &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;{ &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;OnDataChanged (sender, new MyDataEventArgs(e)); &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;- The webpart receives notification of the event and does whatever it needs to do with it.&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;strong&gt;private void myControl_OnDataChanged(object sender, MyDataEventArgs args)&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;strong&gt;{ &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;strong&gt;// do something useful&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color:#3366ff;&quot;&gt;&lt;strong&gt;}&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thats all there is to it, the beauty of it is that you now have a user control which can be easily re-used in another webpart, or in another usercontrol or even directly in an aspx page.&lt;br /&gt;Of course, there are a few SharePoint gotchas that even good design can&#39;t solve, but we&#39;ll leave those for another time ;)</description><link>http://polkadragon.blogspot.com/2005/10/design-vs-deadline.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-17097859.post-112763380409492972</guid><pubDate>Sun, 25 Sep 2005 07:27:00 +0000</pubDate><atom:updated>2005-09-25T09:36:44.096+02:00</atom:updated><title>To fill the void</title><description>Welcome to (yet another) technology blog.&lt;br /&gt;&lt;br /&gt;In here, I&#39;ll mostly be talking about my (mis) adventures in the land of technologies such as BizTalk, ASP.NET and SharePoint 2003.   If the mood strikes me, I might even get a bit philosophical now and then, feel free to skip those parts.&lt;br /&gt;&lt;br /&gt;What am I doing right now? I&#39;m a Technical Analyst/Projectleader at &lt;a href=&quot;http://www.dolmen.be&quot;&gt;Dolmen&lt;/a&gt;, a belgian software company.  For the last few years, I&#39;ve primarily focused on such areas as ASP.Net, Design Patterns, UML and BizTalk 2002 and 2004.  Recently, Sharepoint 2003 has entered that list, and thats what I&#39;m currently using the most.&lt;br /&gt;&lt;br /&gt;I consider myself a generalist, meaning that I don&#39;t blindly focus on one technology, which - in my opinion - is not really possible anymore, since (for example) to know SharePoint you need at least a solid base of ASP.NET and Web UserControls knowledge (try making a Web Part without it...).  Of course, its completely impossible to know everything about all products from the Microsoft family, so a little bit of specialization automatically occurs.&lt;br /&gt;&lt;br /&gt;In the end, being a software guy is &lt;span style=&quot;font-weight: bold;&quot;&gt;not &lt;/span&gt;about how good you are in certain technologies, what is important is your ability to adapt to new environments and products.  With the current rate of new products/platforms/frameworks/whatever, by the time you &#39;dig&#39; something completely, the RC1 of the  next version usually rolls around the horizon anyway ;)  So adaptability and flexibility are key.  All of this is of course IMHO, allthough you can probably drop the &#39;H&#39; :D&lt;br /&gt;&lt;br /&gt;Anyhow, that was rambling number 1.&lt;br /&gt;&lt;br /&gt;Sam</description><link>http://polkadragon.blogspot.com/2005/09/to-fill-void.html</link><author>noreply@blogger.com (Sam)</author><thr:total>0</thr:total></item></channel></rss>