tag:blogger.com,1999:blog-95367222009-12-02T08:51:02.181+01:00Net IndustrySometimes this blog might even be useful for software developers. Blog dedicated to Graphics & Programming Topics cover Macromedia Flash, Borland Delphi, Microsoft .NETWiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-9536722.post-56294062775984857132009-08-24T15:12:00.001+02:002009-08-24T15:14:00.594+02:00CKEditor 3.0 releasedFresh from the FCKeditor website: <p> CKEditor 3.0 is here! After almost two years of hard development, we are proud to announce the first stable release of our next generation editor. You can now enjoy the best editor out there, added by even better (amazing!) performance, full accessibility, new interface, a brand new and rich API and more. </p> <p>Other than a new name, CKEditor also brings us a new logo and a new site. For full details, check out http://ckeditor.com.</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-5629406277598485713?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-48605070103193443372009-03-18T11:54:00.000+01:002009-03-18T11:54:30.258+01:00ReSharper 4.5 Beta<p>Resharper 4.5 Beta has just been released!</p> <p>My favorite new feature is the new Solution wide analysis of unused code, this allows you to assume the code you are writing is NOT for a shared library, and thus can be marked as unused if it's never used within the current solution.</p> <ul> <li>Unused non-private declarations</li> <li>Unused return values of non-private methods</li> <li>Unaccessed non-private fields</li> <li>Unused parameters in non-private members</li> <li>Abstract or virtual events that are never invoked</li> <li>Unassigned fields</li> <li>Members and types that can be made internal instead of public</li> </ul> <p>My second favorite new feature is definitely the MSTest project support, like they supported NUnit and other test frameworks before.</p> <a href="http://www.jetbrains.com/resharper/beta.html?utm_source=jetbrains-dotnet-outlook&amp;utm_medium=newsletter&amp;utm_campaign=resharper45beta">ReSharper:: The Most Intelligent Add-In To Visual Studio 2008 - C# 3.0, LINQ, VB.NET, ASP.NET, XML, XAML, build scripts. Best-of-breed tools for code analysis, code cleanup, code generation, and unit testing, plus multiple refactorings and code templates.</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-4860507010319344337?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-67824728296063190182009-03-04T10:39:00.000+01:002009-03-04T10:39:31.087+01:00two-finger-scroll - Google Code<p>Recently I've bought a MacBook Pro. Great piece of hardware, and OS X is really nice for organizing photo's and creating presentations.</p> <p>The real work obviously still needs to be done on a PC, however I couldn't live without the two-finger-scrolling anymore, so I tracked down this great little tool on Google Code:</p> <p><a href="http://code.google.com/p/two-finger-scroll/">two-finger-scroll</a></p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-6782472829606319018?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-858319894102139882008-07-01T10:35:00.001+02:002009-08-07T20:55:55.774+02:00Wake On LAN in C#<a href="http://blog.memos.cz/index.php/team/2008/06/12/wake-on-lan-in-csharp#more26">Wake On LAN in C#</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-85831989410213988?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-18936295976467359792008-06-12T11:24:00.001+02:002008-06-12T12:02:48.104+02:00Run SysInternals tools directly<a href="http://live.sysinternals.com/">live.sysinternals.com - /</a> <p> SysInternals has opened a share to their folder with utilities, meaning you can now run the SysInternals tools directly from explorer or the Run window by typing in:</p> <pre>\\live.sysinternals.com\tools\[toolname]</pre> <p> You can also browse the tools by opening the folder share: </p> <pre>\\live.sysinternals.com\tools</pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-1893629597646735979?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-86023732150733362902008-06-09T14:34:00.000+02:002008-06-09T14:34:51.063+02:00Download details: Parallel Extensions to .NET Framework 3.5 June 2008 CTP<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=348F73FD-593D-4B3C-B055-694C50D2B0F3&amp;displaylang=en">Download details: Parallel Extensions to .NET Framework 3.5 June 2008 CTP</a> <p>Parallel Extensions for .NET 3.5 June 2008 CTP is out! I still have to figure out what to do with it though...</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-8602373215073336290?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-19221361433372170402008-06-05T18:28:00.001+02:002008-06-05T18:29:21.939+02:00Google Contacts API | Google Groups<p>Apparently while I wasn't watching for a while, Google launched their Contacts API last March. It's about time anyway. Can't wait to find a spare weekend to start experimenting.</p> <ul> <li> <a href="http://groups.google.com/group/google-contacts-api/">Google Contacts API | Google Groups</a> </li> <li><a href="http://code.google.com/apis/contacts/developers_guide_dotnet.html">.NET Developers guide</a></li> </ul><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-1922136143337217040?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-24513841036914996442008-06-05T14:39:00.003+02:002008-06-05T15:10:39.811+02:00ReSharper 4.0 RC and LLBLGen 2.6 RC<p>Two of my favorite products released important release candidates of their new products on the same day!</p> <ul> <li><a href="http://blogs.jetbrains.com/dotnet/2008/06/resharper-40-release-candidate-available/">Resharper 4.0 RC</a></li> <li><a href="http://www.llblgen.com/">LLBLGen v2.6</a></li> </ul> <p>For both products the most significant addition is full LINQ support.</p> <p>developer happiness is on it's way :)</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-2451384103691499644?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-41182138084174499402008-05-30T17:55:00.001+02:002008-06-03T18:21:34.755+02:00ASP.NET development server very slow on Vista with Firefox - ASP.NET Forums<a href="http://forums.asp.net/p/1066244/2272233.aspx">ASP.NET development server very slow on Vista with Firefox - ASP.NET Forums</a> <p>In case your Visual Studio 2008 is really slow on Vista (Windows 2008 in my case) opn Firefox, helped me out:</> <span style="font-weight:bold;">to Disable autotuning, run this from the command prompt:</span> <ul> <li>netsh interface tcp set global autotuninglevel=disabled</li> </ul> <p> Additionally, disabling IpV6 in Firefox could help: </p> <ul> <li>Goto the about:config address in firefox</li> <li>filter by "network.dns.disableIPv6" and double-click to set to true</li> </ul><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-4118213808417449940?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com2tag:blogger.com,1999:blog-9536722.post-75787027318649999422008-04-27T17:19:00.005+02:002008-06-05T15:12:43.559+02:00Windows Server 2008 Standard + RAID driver problems<p>When trying to install Windows Server 2008 Standard on a desktop system with a RAID-1 configuration, we couldn't load the appropriate drivers.</p> <p>A message appears: "to continue installation, use the load driver option to install 32-bit and signed 64-bit drivers. installing an unsigned 64-bit device driver is not supported and might result in an unusable windows installation".</p> <p>The only option is to press OK, and the installation will not list any drivers at all. There's no other option than to cancel the installation.</p> <p>We've tried 3 different motherboards, trying to use the latest RAID drivers, all yielding the same results:</p> <ul> <li> <a href="http://www.asrock.com/mb/overview.asp?Model=ALiveSATA2-GLAN">ASRock ALiveSATA2-GLAN, VIA K8T890 CF</a></li> <li><a href="http://www.asrock.com/mb/overview.asp?Model=ALiveNF5-eSATA2%2b">ASRock AliveNF5-eSATA2+</a></li> <li><a href="http://www.asus.com/products.aspx?l1=3&amp;l2=149&amp;l3=592&amp;l4=0&amp;model=1934&amp;modelmenu=1">Asus M3A with AMD 770</a></li> </ul> <p>Anyone else experiencing problems with RAID drivers on Windows Server 2008/Vista?</p> <p>Related:</p> <p><a href="http://www.extremetech.com/article2/0,1697,2259025,00.asp">Grading Vista 64-Bit plus RAID 1 No More: RAID 1 No More</a></p> <p> update 23-5-2008: Additional non-working drivers include: <ul> <li>3Ware 9650SE</li> <li>SuperMicro</li> </ul> </p> <p>Issues like this remind me how lucky I am to only have to deal with deal with SOFTWARE problems normally</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-7578702731864999942?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com1tag:blogger.com,1999:blog-9536722.post-40845223907963535492008-04-23T11:49:00.001+02:002008-04-23T11:50:41.264+02:00ASP.NET MVC Source Refresh Preview - ScottGu's Blog<p>A new ASP.NET MVC Source Refresh Preview is available:</p><a href="http://weblogs.asp.net/scottgu/archive/2008/04/16/asp-net-mvc-source-refresh-preview.aspx">ASP.NET MVC Source Refresh Preview - ScottGu's Blog</a>:<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-4084522390796353549?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-77306746147145034002008-03-31T16:58:00.002+02:002008-04-27T17:23:31.660+02:00Waste Management sues SAP over software failure | Technology | Reuters<a href="http://www.reuters.com/article/technologyNews/idUSN2644069820080327?sp=true">Waste Management sues SAP over software failure</a> <p> Nice to see a SAP customer finally having his "4 o' clock cup-a-soup" moment. (Dat zouden meer mensen moeten doen) </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-7730674614714503400?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-40218172799943980992008-03-18T13:15:00.001+01:002008-06-03T18:22:15.478+02:00Microsoft: Future of personal health (video) - istartedsomethingAs I'm starting an assignment at <a href="http://www.crossingchannels.com">Crossing Channels</a> regarding a health care related project, I was particulary interested in the following Microsoft video: <a href="http://www.istartedsomething.com/20080315/microsoft-future-personal-health-video/">Microsoft: Future of personal health (video) - istartedsomething</a> shown at a MIX08 session.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-4021817279994398099?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-56534111370955533582008-03-18T12:24:00.001+01:002008-03-18T13:31:31.606+01:00Google Calendar Sync: Getting Started<p>I'm back!</p> <p>After quite some silent time, (the web logs at my previous <a href="http://www.e-office.com/">employer</a> are internal) I'm starting as a free lance software engineer, so this is a good time to start web logging again.</p> <p>To start with, I've migrated all my outlook mail to <a href="http://www.gmail.com/">Gmail</a>, and started using <a href="http://www.google.com/calendar">Google Calendar</a>.</p> <p>However to sync my calendar with my new <a href="http://uk.samsungmobile.com/mobile/SGH-I600">SamsungI600</a>, I do require outlook for synchronization purposes.</p> <p>What an excellent timing of Google to release <a href="http://www.google.com/support/calendar/bin/answer.py?answer=89955">Google Calendar Sync!</a></p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-5653411137095553358?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1155730672346989412006-08-16T14:17:00.001+02:002008-03-18T14:01:03.609+01:00Diff/Merge/Patch Library for C#/.NET<p><a href="http://razor.occams.info/code/diff/">Diff/Merge/Patch Library for C#/.NET</a> Nice, a PERL differencing engine ported to .NET. </p> <p>Found on this URL: <a href="http://www.codeproject.com/cs/algorithms/c__diff_algorithm.asp">A Generic - Reusable Diff Algorithm in C#</a> </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-115573067234698941?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1147423089613907992006-05-12T10:38:00.001+02:002008-03-18T14:01:28.051+01:00An alternative to TLS for application contexts / ASP.NET contexts (Thread Local Storage)<p><a href="http://authors.aspalliance.com/bbilbro/viewarticle.aspx?paged_article_id=5">ASPAlliance - Create your own HttpContext class</a>: "System.Runtime.Remoting.Messaging.CallContext" </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-114742308961390799?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1143034012898953812006-03-22T14:26:00.001+01:002008-03-18T14:00:42.001+01:00Macromedia - ActiveX issues ("click to activate and use this control")<p>Recently I was getting strange behaviour with ActiveX (mostly Flash Files) in Internet Explorer, where the Active content had to be clicked to be activated first (when hovering over the control, the message "click to activate and use this control" appears).</p> <p>How annoying, especially since Flash sites are usually design-oriented sites, and a big dotted gray border doesn't really add to my idea of being 'stylish'.</p> <p>The resolution is to remove the recent Windows Update (or better, not to install it at all): <ul> <li><a href="http://support.microsoft.com/?kbid=912945">Update for Windows XP (KB912945)</a></li> <li><a href="http://support.microsoft.com/?kbid=912945">Update for Windows 2003 Server (KB912945)</a></li></ul></p> <p> <a href="http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=184&amp;threadid=1126678&enterthread=y">Adobe - Macromedia Flash Player</a>: "Update for Windows XP (KB912945)" </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-114303401289895381?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com1tag:blogger.com,1999:blog-9536722.post-1126186725696859492005-09-08T15:38:00.001+02:002008-03-18T18:22:39.900+01:00Asymptomatic : How to Disable that Blasted "Restart Now" Message from Windows Update<p> As commented on the blog entry above, the 'restart now' message returning every 15 minutes after running the windows update can be useful in some (very few) situations, for example grandma's never restarting their PC's... </p><p>Hey wait no grandma's always shut down their PC immediately after they're done playing solitaire... ehm ... no I'll get a reason later.</p> <p>However, the Windows Update application doesn't seem to understand that if you don't click 'restart later' immediately, there might be a REASON for it, like running 3 virtual machines, and having to wait 1 hour before a workstation is back to the state it was before restarting. </p><p>Or for example a heavy load Windows 2003 Advanced server, Webserver or whatever server where a restart has to be planned very carefully to prevent the management from getting pissed, because yes, even there the lovely messagebox pops up.</p> <p>I must add that the validaty of the "grandma" argument doesn't really count in a server environment, and if everything is all right, neither does the "help out people who don't know what they're doing" argument.</p> <p>There are 2 checkboxes missing in this messagebox: <i>don't show this annoying box <b>this session</b> again</i> and <i>don't show this annoying box <b>ever</b> again</i> </p> <p>I know it's not much, but here's an alternative to the first one: <ul><li>place this command in a batch file named 'GoAwayWindowsUpdate.bat':</li><li><pre>net stop wuauserv </pre></li></ul><p>beautiful...</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-112618672569685949?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1126180577190681232005-09-08T13:56:00.001+02:002008-03-18T18:23:03.963+01:00Annoyances.org - Possibly another way (Windows 2000 Discussion Forum)<p>I always disable all sounds on Windows. There's nothing more annoying than hearing the (way too long) windows startup sound on the wrong moments. </p> <p>However, disabling all system sounds results in getting a system speaker 'beep' (at maximum volume) everytime you change the main volume control. </p> <p>Better, but still bad, especially when using earphones and having <a href="http://www.apple.com/itunes">iTunes</a> at a low level volume. </p> <p>Well, here's the solution:</p> <pre>- run regedit.exe change these key values: [HKEY_CURRENT_USER\Control Panel\Sound] "Beep"="yes" "ExtendedSounds"="yes" into [HKEY_CURRENT_USER\Control Panel\Sound] "Beep"="no" "ExtendedSounds"="no". </pre> <p>Ahh enjoy the silence...</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-112618057719068123?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1114622007497170412005-04-27T19:13:00.001+02:002008-03-18T18:23:57.627+01:00C# From a Java Developer's Perspective<p>I stumbled upon a pretty extensive comparison between Java and C#. Probably a little pro-MSFT because it&quot;s written by Dare Obasanjo, but still, they&quot;re getting closer to the illusion of an unbiased comparison:</p> <p><a href="http://www.25hoursaday.com/CsharpVsJava.html#1">C# From a Java Developer's Perspective</a></p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-111462200749717041?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1114339736659166062005-04-24T12:48:00.000+02:002006-07-22T03:07:36.726+02:00FlexWiki - Make double click editing a user setting<p>The first time I encountered a WikiWiki site, I immediately mailed the webmaster that there was something seriously wrong with their security. Yes, my only excuse is not reading TFM, and that it's a while ago.</p> <p> <a href="http://flexwiki.sourceforge.net">FlexWiki</a> is a .NET variant to <a href="http://en.wikipedia.org/wiki/Wiki">Wiki</a>, and I've been really annoyed with the fact that if you double click on a page, it starts editing.</p> <p>Like a proper contributor of Open Source projects, I contributed the code that allows a user to save his preferences to a cookie, and disables the double click functionality, also because mr. Candera encouraged me to code it myself: <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1186821&group_id=113273&amp;atid=665399">SourceForge.net: Modify: 1186821 - Make double click editing a user setting</a>, so I did!</p> <h2>Open source the microsoft way</h2> <p>They couldn't accept my contribution because I don't work at Microsoft, and I have to sign an <a href="http://www.flexwiki.com/default.aspx/FlexWiki/AssignmentAgreement">Assignment Agreement</a> before I can contribute anything. You've got to be kidding me. What's the point of creating an open source product in the first place, if only one company is allowed to work on it?</p> <p>I've left this comment (before they're childish enough to remove it);-)</p> <pre> How can you build an open source community like that? Do microsoft guys have to take the fun out of everything? Can't it just be some kind of checkbox? I've requested the assignment agreement, how long is that going to take? </pre> <p>Appearently, this is allowed by the license (<a href="http://www.opensource.org/licenses/cpl.php">CPL, or Common Public License</a>) they're using.</p> <p>Also, I was suprised to see that there are actual <a href="http://www.flexwiki.com/default.aspx/FlexWiki/DeveloperGuidelines.html">Developer Guidelines</a>, as the source code doesn't comply at all, it contains so many unused code blocks and procedures, that I couldn't even find where to add a link in the menu on the left.</p> <p>Update May 8: I've received, signed and sent the assignment agreement back to MS. <br/>Even if it's just for the fun of sending something to </p><pre>One Microsoft Way Redmond, WA 98052</pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-111433973665916606?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0tag:blogger.com,1999:blog-9536722.post-1113557567590227932005-04-15T11:31:00.000+02:002006-08-05T11:26:32.953+02:00Where's the # in C#?<p>I'm one of the lucky ones to go from Delphi to C#. </p> <p>Lucky, because the two languages share their intellectual father, Anders Hejlsberg, who copied many existing Delphi and C++ language concepts to C#</p> <p>This means that Delphi programmers have a big advantage to Visual Basic programmers because they're already familiar with inheritance, polymorphism. Even to C++ coders who lack interfaces, events and delegates, and a even proper IDE (except for the very underrated Borland C++ Builder maybe).</p> <p>I know that c++ got it's name from the incremental operator (c++ as a next iteration of C), but where did C# get it's pound suffix from?</p> <p>Still I'm disappointed to miss some features that are available in Delphi, but not implemented in C#, like: </p> <h3>Delegate by Interface</h3> <p> In delphi it's possible to delegate the complete implementation of an Interface to a property. This way you don't have to redeclare each interface member inside the class, but it is possible to pass it to functions that need a IMyInterface Implemenation:</p> <pre>IMyInterface = <strong>interface </strong>(IInterface) <strong>function </strong>Foo() : Boolean; <strong>procedure </strong>Bar(); <strong>end;</strong></pre> <pre>TMyInterfaceImpl = <strong>class</strong> ( IMyInterface ) <strong>function </strong>Foo : Boolean; <strong>procedure </strong>Bar() ; <strong>end;</strong></pre> <pre>TMyType = <strong>class </strong>( TObject, IMyInterface ) <strong>private</strong> FMyImplementation : IMyInterface;<strong> protected</strong> <strong>function</strong> GetImplementation() : IMyInterface; <strong> public property </strong>MyImplementation : IMyInterface <strong>read </strong>GetImplementation <strong>implements </strong>IMyInterface; <strong>end;</strong> <strong>function </strong>TMyType.GetImplementation() <strong> begin</strong> <strong>if not assigned </strong>(FMyImplementation then FMyImplementation := TMyInterfaceImpl.Create(); result := FMyImplementation;<strong> end; </strong></pre> <p>Currently in C# you have to redeclare each member and delegate it to the implementation if you want separate your interface implementation from the class :</p> <pre><span class="keyword">public interface</span> IMyInterface { <span class="keyword">bool</span> Foo(); <span class="keyword">void</span> Bar(); } <span class="keyword">public class</span> MyInterfaceImpl : IMyInterface { <span class="keyword">bool</span> IMyInterface.Foo(){ ... } <span class="keyword">void</span> IMyInterface.Bar(){ ... } } <span class="keyword">public class</span> MyType : IMyInterface { IMyInterface myImplementation; IMyInterface MyImplementation{ <span class="keyword">get</span> { <span class="keyword">if</span> (myImplementation==null) myImplementation = <span class="keyword">new</span> MyInterfaceImpl(); <span class="keyword">return</span> myImplementation; } } <span class="comment">// All members have to be redeclared even though // the implementation is delegated to the // MyImplementation property</span> <span class="keyword">bool</span> IMyInterface.Foo(){ return MyImplementation.Foo(); } <span class="keyword">void</span> IMyInterface.Bar(){ MyImplementation.Bar(); } } </pre> <h3>Strictly Typed Types</h3> <p>In Delphi it's possible to declare a variable, that contains a reference to the class of a type, and can be used as a type. I know that sounds a little complex (don't even know if it's correct) but an example should clarify:</p> <pre>TMyType = <strong>class </strong>( TObject, IMyInterface ) <strong>private</strong> FMyImplementation : IMyInterface;<strong> protected</strong> <strong>function</strong> GetImplementation() : IMyInterface; <strong> public property </strong>MyImplementation : IMyInterface <strong>read </strong>GetImplementation <strong>implements </strong>IMyInterface; <strong>end; </strong> TMyTypeClass = <strong>class of TMyType</strong>; <strong>function </strong>CreateInstance(AType : TMyTypeClass):TMyType<strong> begin</strong> result := AType.Create();<strong> end; procedure </strong>Main<strong>() var </strong>MyType : TMyType;<strong> begin </strong> MyType := CreateInstance(TMyType); <strong> end;</strong></pre> <p> Now it's only possible to pass a type that <strong>inherits from</strong> TMyType.</p> <p>Why doesn't c# have anything like this? C# only knows the <strong>Type</strong> type, and if you would want a method to only accept a certain type, you need to do it like this: </p> <pre><span class="keyword">public</span> MyType CreateInstance(<span class="keyword">Type</span> type){ <span class="keyword">if</span>( !type.IsSubclassOf(<span class="keyword"> typeof</span>(MyType) ) ) <span class="keyword"> throw new</span> ArgumentException(&quot;Type parameter is of incorrect type&quot;); <span class="keyword">return</span> Activator.CreateInstance(type); } <span class="keyword"> public static void</span> Main(){ MyType instance = CreateInstance(typeof(MyType)); }</pre> <h3>Type Suffices and Generics in C# 2.0:</h3> <p>With generics in C# 2.0 it's possible achieve something like <strong>strictly typed types</strong>, using the <strong>where</strong> keyword in generics, wich will force the collection to only accept members that implement <strong>ICloneable</strong>:</p> <pre><span class="keyword">public class </span>CloneableCollection&lt;T&gt; : Collection&lt;T&gt;, ICloneable <span class="keyword">where</span> T : ICloneable { <span class="keyword">public</span> CloneableCollection&lt;T&gt; Clone() { CloneableCollection&lt;T&gt; collection = new CloneableCollection&lt;T&gt;(); <span class="keyword"> foreach</span> (T o <span class="keyword">in this</span>) collection.Add( (T) o.Clone() ); <span class="keyword"> return</span> collection; } <span class="keyword">object</span> ICloneable.Clone() { <span class="keyword">return</span> <span class="keyword">this</span>.Clone(); } }</pre> <p>In C# 2.0, types can contain certain suffices to express additional compiler functionality:</p> <p><strong>&lt;Type&gt; </strong> - expresses a generic type, for example Collection&lt;MyType&gt; for a strictly typed collection.</p> <p><strong>? </strong>- expresses a value type that can contain a null value, for example </p> <pre><span class="keyword">int</span> myValue = null;</pre> <p>is impossible, but when declaring it as Nullable:</p> <pre><span class="keyword">int</span>? myValue = null;</pre> <p>it is possible. The question mark is actually a shorthand for the generic type <strong>Nullable&lt;T&gt;</strong>, so <strong>Nullable&lt;int&gt;</strong> and <strong>int?</strong> are in fact the same. </p> <p>Too bad they didn't implement a NotNullable type for non-value types, using the <strong>!</strong> (exclamation mark):</p> <pre><span class="comment">// doesn't compile</span> MyType! myType =<span class="keyword"> null</span>;</pre> <p>This is however, it is implemented in the <a href="http://research.microsoft.com/COmega/">Cω Language (pronounced COmega)</a>, a C# variant with support for type-safe support for table and document manipulation (in other words: strictly typed SQL and strictly typed XML)</p> <p>COmega also supports for the * (stream) operator. This might confuse C++ developers, however it has nothing to do with a pointer. The stream operator can be seen as a array, but of unspecified length, or a dynamic strictly typed (lazy) collection. If a type contains this suffix, it both implements the C# IENumerable (edit: was C# INumerable) and the IEnumerator interface, and the values are dynamically returned as the collection is iterated:</p> <pre><span class="comment">// generate s, s+1, ..., e</span><br /><span class="keyword">static int</span>* FromTo(<span class="keyword">int</span> s, <span class="keyword">int</span> e) {<br /> <span class="keyword">for</span> (<span class="keyword">int</span> i = s; i &lt;= e; i++) <span class="keyword">yield return</span> i;<br />}<br /> <span class="keyword">public static void</span> Main() {<br /> <span class="keyword">int</span>* OneToTen = FromTo(1,10);<br /> <span class="comment">// prints 1, ..., 10</span><br /> <span class="keyword">foreach</span>(<span class="keyword">int</span> j <span class="keyword">in</span> OneToTen){<br /> Console.WriteLine(j);<br /> };<br />}</pre> <p>In other words, the <span class="keyword">for</span>-loop in FromTo, continues only if the next value is requested by the iterator. In this case the <span class="keyword">foreach</span> loop through the entire collection, so for every value between 1 and 10 the for loop is executed. This creates great possibilities for ASynchronous communication like reading a large recordset from a database, because the next record is only fetched when it's requested, somewhat like the DataReader class, but in a strictly typed way. </p> <h3>And the point is... </h3> <p>Here I finally come to my point. Both the <span class="keyword">where</span> and <span class="keyword">typeof</span> keywords are essentially performing the same function, where I think the typeof isn't event necessary now, because there's no reason why this syntax shouldn't work, because MyType is already a type, why is the extra <span class="keyword">typeof</span>() call necessary?</p> <pre><span class="keyword">public</span> MyType CreateInstance(Type type){ <span class="keyword">return </span>(MyType)<span class="keyword"> </span>Activator.CreateInstance(type); } <span class="keyword"> public static void</span> Main(){ MyType instance = CreateInstance(MyType); <span class="comment"> // instead of</span> <span class="comment"> // MyType instance = CreateInstance(typeof(MyType));</span> }</pre> <p>My proposal for C# 3.0 would be to replace them both with the Type# syntax, finally giving the # (pound) a function in C#, wich performs the same functionality as the Delphi &quot;TMyTypeClass = <strong>class of </strong>TMyType&quot; syntax.</p> <p>Additionally, you would be able to use this as a typeof specifier in a method, and this could be our previous example rewritten, without having to specify:</p> <pre><span class="keyword">public</span> MyType CreateInstance(MyType# type){ <span class="keyword">return </span>(MyType)<span class="keyword"> </span>Activator.CreateInstance(type); } <span class="keyword"> public static void</span> Main(){ MyType instance = CreateInstance(MyType); }</pre> <p>This could even give the previous <strong>ICloneableCollection&lt;T&gt; </strong>a easier to read look, and conforms more to the C# syntax:</p> <pre><span class="comment">//public class CloneableCollection&lt;T&gt; : Collection&lt;T&gt;, ICloneable where T : ICloneable</span><span class="keyword"> public class </span>CloneableCollection&lt;ICloneable# T&gt; : Collection&lt;T&gt;, ICloneable { <span class="keyword">public</span> CloneableCollection&lt;T&gt; Clone() { CloneableCollection&lt;T&gt; collection = new CloneableCollection&lt;T&gt;(); <span class="keyword"> foreach</span> (T o <span class="keyword">in this</span>) collection.Add( (T) o.Clone() ); <span class="keyword"> return</span> collection; } <span class="keyword">object</span> ICloneable.Clone() { <span class="keyword">return</span> <span class="keyword">this</span>.Clone(); } }</pre> <p>And, last but not least, it would eliminate 2 extra keywords, wich must be important to Microsoft as well, because they're very proud of the low amount of keywords in C#. </p> <p>I'd like to hear your comments on this. </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-111355756759022793?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com5tag:blogger.com,1999:blog-9536722.post-1110904776757918062005-03-15T17:30:00.000+01:002005-03-15T18:00:39.086+01:00Google defining Yahoo?<p class="MsoNormal">Today I was doing some research for school. On my search I stumbled across a feature in <a href="http://www.google.com/">Google</a> named "definitions". </p> <p class="MsoNormal"> It works as follows: you type "define:" followed by the word you want defined. Of course, curious as I am, I wondered how Google would be defined. Because they say that <a href="http://www.google.com/help/features.html">Google definitions</a>, "(...) get glossary definitions gathered from various online sources." and "If Google has seen a definition for the word or phrase on the Web, it will retrieve that information and display it at the top of your search results". This suggests that there is no filtering what so ever on the given results, right? </p> <p class="MsoNormal">Well after typing "<a href="http://www.google.com/search?hl=en&q=define%3Agoogle">define:google</a>", it returned 8 results. A bit less then I expected, as Google is "Currently the most important spidering search engine by far". Believing of course the first result in the list.</p> <p class="MsoNormal"> Then I typed "<a href="http://www.google.com/search?hl=en&amp;q=define%3Ayahoo">define:yahoo</a>". <a href="http://www.yahoo.com/">Yahoo</a> being the biggest competitor of Google. As a result I got around 20 hits... quite more then on my previous search. It became even more interesting when I actually read the results. The second definition in the <a href="http://www.google.com/search?hl=en&amp;q=define%3Ayahoo">result list</a> I got, was the following: "A Web directory created by a couple of guys from Stanford who now have more money than the entire country of <st1:country-region st="on"><st1:place st="on">Luxembourg</st1:place></st1:country-region>. Rumour has it they own one business suit between them." What?! </p> <p class="MsoNormal">Apparently the Google search engine for definitions considers the word "rumour" as being part of a definition. Very interesting indeed.</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-111090477675791806?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>d669http://www.blogger.com/profile/14739997098882991466noreply@blogger.com1tag:blogger.com,1999:blog-9536722.post-1108982448309214832005-02-21T11:40:00.001+01:002008-03-18T18:24:40.298+01:00Proposion N2N Review<p>For my current employer <a href="http://www.vitronics-soltec.com/">Vitronics Soltec</a>, I had to build a coupling between Lotus Notes and SQL Server.</p> <p><a href="http://www.proposion.com/">Proposion N2N</a> is an excellent library to achieve this. Basically, it's a (partial) implementation of an ADO.NET DataProvider for Lotus Notes. It has many advantages (and way less bugs) over the Notes ODBC Connector, as it can even query for attachments, retrieve rich textfields and retrieve field values not included in a view. You can even dynamically execute Lotus Notes Formula's from the SQL query</p> <p>The SQL isn't close to any SQL standard, but the resemblance is good enough. However, it is very well documented, and examples for almost every possible usage is provided, so learning is very easy, though knowledge of both SQL and Lotus Notes will help a lot</p> <p>The current version (version 2.11) still contains several bugs, of wich the most annoying is that the IDbDataAdapter methods aren't implemented correctly, wich you can call the methods directly (NsfDataAdapter.Fill(myDataset), however you can't call them through the interface (IDbDataAdapter.Fill(myDataSet)) as it raises a <a href="https://www.proposion.com/site/Discussion.nsf/8fcda5a283f280b2852565590071d8af/35fae3fab26bcd4e85256f850060ec87%21OpenDocument">NotSupportedException</a>.</p> <h3> .NET Application Blocks </h3> <p>The Proposion variant of some of the Microsoft Application Blocks are freely provided: the Exception Management Application Block, and the Data Access Application Block.</p> <p><a href="http://www.proposion.com/site/Library.nsf/aac7d56ca8fd884b852563be00610639/fd02fd458c284b3785256e5f00481b0a%21OpenDocument">Proposion N2N Application Blocks</a></p> <p>I needed to use the Data Access Application Block, however the FillDataSet caused an endless recursion, so I had to modify the examples. The improved Visual Studio project is available here:</p> <p><a href="http://www.netindustry.nl/N2N-Data-Access-Application-Block">Proposion N2N Data Access Application Block</a></p> <p>I've had good results with Proposion N2N, however there are some issues that would prevent me from deploying it with clients:</p> <h3>Potential Adminstration problems</h3> <p>The Proposion N2N Library comes with a strict Activation, and once installed, it isn't possible to install it again. To move the license to another computer, you would have to mail to Proposion to transfer the license. So far I've had very good responses, but I don't want to know what I'd have to do when their website would go down, or the small company would decide to start doing something else. </p><h3>High priced</h3> <p>The Proposion N2N is quite expensive to deploy, for my development I needed to install a development it on my laptop, and later on another machine to maintain the synchronization between the databases, I'd have to buy another license, or transfer the license from my laptop to another machine, wich would mean I can't develop anymore using the library, and incorporating the problems mentioned before. With a support contract included ($495/y), a developer license ($795) and a processor license ($1395), it would mean I have to pay about $2600 for a ADO.NET driver that can only be used on 1 machine.</p> <h3>conclusion</h3> <p>To us it's well worth the money, because it save's a lot of Domino API programming, but the Activation policy and maintenance contract will definately have me waiting as long as possible before buying a license for the server.</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-110898244830921483?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com2tag:blogger.com,1999:blog-9536722.post-1107620583717437562005-02-05T17:23:00.000+01:002005-04-19T17:56:45.793+02:00XSD2DB: Generate a SQL Server database from a XML schema (XSD)<p><a href="http://xsd2db.sourceforge.net/">XSD2DB</a></p> <p>I've become a developer with XSD2DB, a command line tool written in C#, that will read a Microsoft ADO.NET compatible DataSet Schema File (XSD) and generate a database from it.</p> <p>To make it a little more accessible, I've created the descriptive HTML website for it, and planning on creating new releases.</p> <p>Now all we need is people that want to use it and give us some comments on it...</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9536722-110762058371743756?l=www.netindustry.nl%2Fblog%2Fdefault.aspx' alt='' /></div>Wiebe Tijsmahttp://www.blogger.com/profile/01220731445861224887noreply@blogger.com0