tag:blogger.com,1999:blog-7371009805266520292024-03-13T14:22:01.868-07:00Marcel van Eijkel's blog (Ing. / B ICT)Een dag uit het leven van een Microsoft Solution Architect<br>
A day in the life of a Microsoft Solution Architect<br><br>
About SOA, Career building, Economics, Politics, Modelling and ofcourse Microsoft Developement!<br>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.comBlogger92125tag:blogger.com,1999:blog-737100980526652029.post-26687112792294656252009-05-08T14:04:00.000-07:002009-05-08T14:07:02.524-07:00Quote about understandingTell me and I will forget<br />Show me and I will remember<br />Involve me and I will understand<br /><br />- Confucius -<br /><br /><br />I found this quote on the blog of the problem solver.<br />See: <a href="http://msmvps.com/blogs/theproblemsolver">http://msmvps.com/blogs/theproblemsolver</a>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-24047992052076667872009-05-08T13:22:00.000-07:002009-05-08T13:28:18.526-07:00(Solution) "Secure channel cannot be opened because security negotiation" (Geneva)Today, I was doing some tests with the Geneva (Beta) Framework, again.<br /><br />It took me some time to find the source of the following errors/exceptions my test applications where throwing:<br /><br /><ul><li>Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint.<br /></li><li>The message could not be processed. This is most likely because the action 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.</li></ul><p>The problem was that my testclient was using a different bindingtype then my test Security Token Service. </p><p>For more information about what type of binding to favour, see: <a href="http://webservices20.blogspot.com/2009/04/which-binding-to-use-wshttpbinding-or.html">http://webservices20.blogspot.com/2009/04/which-binding-to-use-wshttpbinding-or.html</a></p><p>Perhaps this is usefull for you.</p><p> </p>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-26333882801025202122009-05-04T02:39:00.000-07:002009-05-04T02:44:41.524-07:00Event ID 1023: Fatal Execution Engine Error (Solved)For some time I have been trying to solve this error that crashed my Visual Studio 2008 when ever I wannted to "Choose Items" for the Toolbox.<br /><br />What worked for me was to uninstall Visual Studio 2008 PowerCommands!<br /><br />Event Type: ErrorEvent<br />Source: .NET RuntimeEvent<br />Category: NoneEvent<br />ID: 1023<br />Date: 2-5-2009Time: 16:54:41<br />User: N/A<br />Computer: TEAMSUIT2008<br />Description:.NET Runtime version 2.0.50727.3082 - Fatal Execution Engine Error (7A035FC0) (80131506)Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com5tag:blogger.com,1999:blog-737100980526652029.post-12201820543355843332009-05-04T02:24:00.000-07:002009-05-04T02:28:44.387-07:00Complemeting FxCop with StyleCop!I guess we all know FxCop by Now. But do you know about StyleCop?<br /><br />StyleCop is a Source Code Style and Consistency Tool.<br /><br />... FxCop performs its analysis on compiled binaries, while StyleCop analyzes the source code directly. For this reason, FxCop focuses more on the design of the code, while StyleCop focuses on layout, readability and documentation. Most of that information is stripped away during the compilation process, and thus cannot be analyzed by FxCop. ....<br /><br />See: <a href="http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx">http://blogs.msdn.com/sourceanalysis/archive/2008/05/23/announcing-the-release-of-microsoft-source-analysis.aspx</a><br /><br />Happy Styling!Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-73590077789250571232009-04-28T01:15:00.000-07:002009-04-28T06:26:39.735-07:00Forget Role Based Security! (Geneva)With the arrival of the Beta 1 of the "Geneva" Claims Based Access Platform you should forget everything you know about role-based security.<div><br /></div><div>Claims based security is everything! It really is!</div><div><br /></div><div>Especially in any SAAS, Heterogeneous or WCF-Services environment using Security Token Services is the technology to use... But honestly, it should be the security route for any solution!</div><div><br /></div><div>I recommend reading <a href="http://download.microsoft.com/download/7/d/0/7d0b5166-6a8a-418a-addd-95ee9b046994/Introducing_Geneva_Beta1_Whitepaper.pdf">this </a>excellent document by David Chappel which gives a perfect conceptual (no code) explanation of what "Claims Based Access" and "Geneva" are about.</div><div><br /></div><div>I also recommend reading <a href="http://download.microsoft.com/download/7/d/0/7d0b5166-6a8a-418a-addd-95ee9b046994/GenevaFrameworkWhitepaperForDevelopers.pdf">this</a> excellent document by Keith Brown which gives a perfect introduction (with code) to the whole "Geneva" suit!</div><div><br /></div><div>For more informatie see msdn: <a href="http://msdn.microsoft.com/en-us/security/aa570351.aspx">http://msdn.microsoft.com/en-us/security/aa570351.aspx</a><br /></div><div><br /></div><div>Note: the "Geneva" framework cannot be installed on Windows XP nor on Windows 2003. A temporarily solution can be found here: <a href="http://travisspencer.com/blog/2009/02/installing-geneva-framework-on.html">http://travisspencer.com/blog/2009/02/installing-geneva-framework-on.html</a></div><div><br /></div><div><br /></div><div>Happy Claiming!</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-43115668277377764202009-04-20T03:02:00.000-07:002009-04-20T03:04:52.215-07:00Quote about planning<span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; "><span class="Apple-style-span" style="font-family: verdana;">Planning is everything, but the plan is simply the starting point...</span></span><div><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; "><span class="Apple-style-span" style="font-family: verdana;"><br /></span></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; "><span class="Apple-style-span" style="font-family: verdana;">(Source: Agile Manivesto 2.0)</span></span></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-78991632559967769662009-04-15T07:11:00.000-07:002009-04-15T07:20:05.238-07:00TestCleanup quirks! (Unittesting)<span class="Apple-style-span" style="font-family: arial;">Today, I am having problems with one of my unittests. The problem is that my resources are not cleanedup when they need to. This has to do with the unexpected time the 'TestCleanup' runs!</span><div><span class="Apple-style-span" style="font-family: arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family: arial;">According to msdn one should use 'TestCleanup' to cleanup resources. Why are my other unittests failing that need to reuse this resource? </span></div><div><span class="Apple-style-span" style="font-family: arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family: arial;">I found a clear description of the 'problem' (is it really a problem or by design?) here:</span></div><div><span class="Apple-style-span" style="font-family: arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family: arial;"><a href="http://blogs.msdn.com/ploeh/archive/2007/01/06/ClassCleanupMayRunLaterThanYouThink.aspx">http://blogs.msdn.com/ploeh/archive/2007/01/06/ClassCleanupMayRunLaterThanYouThink.aspx</a><br /><br /></span></div><div><span class="Apple-style-span" style="font-family: arial;">Anyway, to me it is a pain! </span></div><div><span class="Apple-style-span" style="font-family: arial;">If you have a suggestion, let me know!</span></div><div><span class="Apple-style-span" style="font-family: arial;"><br /></span></div><div><span class="Apple-style-span" style="font-family: arial;">PS: I don't violate the 'do not depend on unittest order' - rule... this is about cleaning!</span></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-6701388144149922222009-04-08T08:45:00.001-07:002009-04-08T08:48:42.593-07:00Generating testrecords for your unittestsIf you are using Visual Studio Database Edition you are able to have VS generate testdata for you. Just what we need to have repeatable testresults.<br /><br />But how does one execute these so called 'Data Generation Plans' from (unittest)code and from your build server?<br /><br />You can find the answer here:<br /><br /><a href="http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/08/kick-off-a-data-generation-plan-programmtically.aspx">http://drowningintechnicaldebt.com/blogs/thomaswaldron/archive/2008/01/08/kick-off-a-data-generation-plan-programmtically.aspx</a><br /><br /><br />Happy testing!Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-54604855354869083992009-04-01T12:30:00.001-07:002009-04-01T12:42:27.542-07:00Harvard Business Video's!<div>IT is about Business in the first place...</div><div><br /></div><div>Therefor, to be succesfull in IT, generally, one needs to really understand the business.</div><div><br /></div><div>To become a succesfull Software or Enterprise Architect you have to know Business Management principles. Therefor my repeating advice, read the Harvard Business Review Magazines and Harvard Business Review Onpoint's, there are just excellent!</div><div><br /></div><div>To make things even more easy for you to start leaning Business Management Principels, Harvard is publishing some Video's on YouTube...</div><div><br /></div><div>In my opnion a perfect place to start, though the magazines are so much better: <a href="http://www.youtube.com/user/HarvardBusiness">http://www.youtube.com/user/HarvardBusiness</a></div><div><br /></div><div>I hope you will enjoy Business Management as I do...</div><div><br /></div><div>Happy learning!</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-57000869985756379262009-04-01T07:50:00.000-07:002009-04-01T08:09:51.127-07:00To MVC or not to MVC?A lot of exposure has been given to the recent releases of the ASP.Net MVC Framework recently.<br /><br />It made me curious what it exactly is and in what projects I should use it and perhaps more importantly in which projects not?<br /><br />After evaluating the current framework version, I have come to the following conclusions:<br /><ul><li>The Framework is perfect for you if you go down the JQuery route;</li><li>The current version is not for you if you go down the 'old' postback / webcontrols route; Currently form support is really limited but open for extention.</li><li>Biggest advantage: by default the urls are decoupled from the filenames. (think about security, flexibility and searchengine friendlyness!) </li></ul><p>Note that this decoupling can just as well be accomplished by using for example:</p><ul><li>UrlRewriter.net </li><li>UrlRewriting.net</li></ul><p>For me, I keep an close eye on new versions hoping to see webcontrols/postback and a richer user interface being supported, soon.</p><p>Happy Viewing and Modelling!</p><p> </p>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-9379365664389066672009-04-01T07:46:00.000-07:002009-04-01T07:50:08.587-07:00No overload for method 'WaitOne' takes '1' arguments (foutmelding)Do you receive the "No overload for method 'WaitOne' takes '1' arguments" error message?<br /><br />Big change that you are need to install .Net Framework 3.5 Servicepack 1!<br /><br />Happy programming...Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-44144963613600040682009-02-02T04:56:00.000-08:002009-02-02T05:01:03.613-08:00Why SOA Works (QUOTE)Object Oriented Design works because an Object represents a real-world "<span class="Apple-style-span" style="font-style: italic;">thing</span>".<div><br /></div><div>Service Oriented Architecture works because a Service represents a real-world "<span class="Apple-style-span" style="font-style: italic;">What we do</span>".</div><div><span class="Apple-style-span" style="font-style: italic;"><br /></span></div><div><span class="Apple-style-span" style="font-style: italic; ">--- </span><br /></div><div><span class="Apple-style-span" style="font-style: italic;"><br /></span></div><div><span class="Apple-style-span" style="font-style: italic;">Not sure whom is being quoted though I found it in "Service Architecture Methodoly, Version 1 - agust 2005, Capgemini".</span></div><div><span class="Apple-style-span" style="font-style: italic;"><br /></span></div><div><span class="Apple-style-span" style="font-style: italic;"><br /></span></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-22804992771486107842008-11-28T02:03:00.000-08:002008-11-30T04:46:15.543-08:00Bad news packaged well<div>Ofcourse I never have bad news....</div><div><br /></div><div>But if you do,<span class="Apple-style-span" style="font-weight: bold;"> make sure you package it well...</span></div><div><br /></div><div>Make damn sure you are able to explain - plain and simple - how we got there, what the benefits are of our current unwanted situation, and how to get out.</div><div><br /></div><div>Packaging does make a difference...</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">I guess I made my point... ;)</span><br /></div><div><br /></div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://thenextweb.com/wp-content/uploads/2008/11/bsod.bmp"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 648px; height: 480px;" src="http://thenextweb.com/wp-content/uploads/2008/11/bsod.bmp" border="0" alt="" /></a>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-53456116488359035662008-11-28T00:56:00.000-08:002008-11-28T01:49:25.539-08:00Unity versus Microsoft Workflow RuntimeBeing a true Framework designer I love Inversion Of Control (IOC).<div><br /></div><div>Microsoft's current tool of choise for IOC is Unity.</div><div><br /></div><div>The other Day, I wanted to use my IOC-container inside the Microsoft Workflow Runtime. The reason for this is that I wanted my custom activities to support IOC;</div><div><br /></div><div>Although the implementation is straightforward, it might save you some time.</div><div><br /></div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';">public class UnityDefaultWorkflowSchedulerService: DefaultWorkflowSchedulerService</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">{</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"> private IUnityContainer _container;</span></div><div><span class="Apple-style-span" style=" ;font-family:'courier new';"> public UnityDefaultWorkflowSchedulerService (IUnityContainer container)</span><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"> {</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"> _container = container;</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"> }</span></div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"> protected override void OnStarted()</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"> {</span></div><div><span class="Apple-style-span" style="font-family: 'courier new';"><span class="Apple-style-span" style="color: rgb(51, 51, 255);"><span class="Apple-style-span" style="font-weight: bold;"> //wrap the container in a singleton to make it global</span></span></span></div><div><span class="Apple-style-span" style="font-family:'courier new';"> ServiceLocator.UseUnityContainer(_container);<br /></span></div><div><span class="Apple-style-span" style=" ;font-family:'courier new';"> base.OnStarted();</span><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';"> }</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">}</span></div></div><div><div><br /></div><div>Please note that the example uses the IUnitityContainer directly. However, I like to wrap unity in my own IOC-container thus making the Inversion Of Control Container Inversionable. Get it?</div><div><br /></div><div>Happy Inversioning.</div><div><br /></div></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com1tag:blogger.com,1999:blog-737100980526652029.post-64629412917144213612008-11-27T14:31:00.000-08:002008-11-27T14:35:17.192-08:00Anger is a gift (quote)<span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 13px; line-height: 19px;">...</span><div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 13px; line-height: 19px;"><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; ">if you're not outraged, you're not paying attention. If you witness someone suffer undeservedly, that ought to madden. If you see someone profit through malice or fraud, that ought to infuriate. When you see cruelty, when you see pain, when you see injustice, and you know it would sacrifice nothing of moral consequence to end that cruelty, to soothe that pain, or right that wrong, and yet it persists, something has to explode inside you if you've got anything resembling a soul.</span><br /></span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 13px; line-height: 19px;">....</span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 13px; line-height: 19px;"><br /></span></div><div><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 13px; line-height: 19px;"><a href="http://philanthropica.blogspot.com/2006/10/anger-is-gift.html">Source: http://philanthropica.blogspot.com/2006/10/anger-is-gift.html</a></span></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-17337180810617018422008-11-25T04:59:00.000-08:002008-12-04T02:23:24.987-08:00Stop Unittesting Its A waste Of Time!?Ever noticed that some professionals (dedicated people most of the time) can have fatigues for certain attitudes or situations?<div><br /></div><div>You know what I am talking about... Just think of Gordan Ramsy for example.</div><div><br /></div><div>Today, I noticed that I am about to have some fatigues myself!</div><div><ul><li>Don't tell me that working with a version control system takes way too much time making it impossible to meet your deadlines! Just don't!</li><li>Don't tell me that spreading (not adding) your code out over an interface, baseclass and factory takes way much more time! Don't!</li><li>Don't tell me that managers won't give you extra time to write unittests for your project! Don't, Don't, Don't!</li></ul>In a desperate attempt to lose these fatigues and, to be honest, in the unrealistic hope to not have these discussions over and over again I will try to explain why this just is not true!</div><div><br /></div><div><br /></div><div><div style="text-align: center; "><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="font-family:Georgia;"><span class="Apple-style-span" style="font-style: italic; "><span class="Apple-style-span" style="font-weight: bold; ">"Managers won't give you extra time to write unittests...?"</span></span></span><br /></span></div><div style="text-align: left; "><span class="Apple-style-span" style="font-style: italic; "><br /></span></div><div style="text-align: left; "><span class="Apple-style-span" style="font-style: italic; "><br /></span></div><div style="text-align: left; ">If you don't get extra time to write unittests it is probably a very good thing! I mean, why do you ask your manager for this in the first place? Are you asking your manager for extra time to have sensible variable names in the code you write? Are you asking for extra time for something "exotic" as comments? Ofcourse you are not! Same goes for (unit)testing! When your manager asked you how long it would take to develop that piece of software he ment "How much time will it take to develop the software in a sensible way!". Asking for extra time for comments or testing or anything else that is normal when it comes to software development is your own attempt to get everybody frustrated... If this would be your attitude I bet that if you would get this mysteriously needed extra time in the first place , your software would still not meet quality standards only to find another excuse... but <span class="Apple-style-span" style="font-size:medium;">that's </span>a different story.</div></div><div><br /></div><div><br /></div><div style="text-align: center;"><span class="Apple-style-span" style="font-style: italic;"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="font-weight: bold;">"</span></span></span><span class="Apple-style-span" style=" white-space: pre; font-family:Arial;"><span class="Apple-style-span" style="font-style: italic;"><span class="Apple-style-span" style="font-size:medium;"><span class="Apple-style-span" style="font-weight: bold;">Unittesting takes way too much time?"</span></span></span></span></div><div style="text-align: center;"><span class="Apple-style-span" style=" font-style: italic; white-space: pre;font-family:Arial;"><br /></span></div><div style="text-align: center;"><span class="Apple-style-span" style=" font-style: italic; white-space: pre;font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;">The first thing that pops into my mind is what do you compare it to? Changes are that you are comparing a well (unit) tested software system with a hardly tested at all software system. Sure testing takes a fair amount of time but this has <span class="Apple-style-span" style="font-size:medium;">nothing </span>to do with unittesting or any other testing methodology.</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;">To make this point extra crystal clear I will give you an example:</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;">Today is your lucky day! Your are asked to extend your Acme-company's intranet with a way too simple news-part. </span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="text-decoration: underline;">Your current "timesaving" scenario:</span></span></div><div style="text-align: left;"><span class="Apple-style-span" style=" text-decoration: underline;font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style=" ;font-family:Arial;">You create the table in your database, write some queries and code to get the data in and out the database, some helper functions probably and finally the User Interfaces. Not using any sensible (unit)testing strategy you probably test the application by inserting, updating and deleting minimal news articles (subject=a, body=a, startdate=select from calendar, department=select from list) as long as it takes for the simple scenario to work. Tired of "testing" you do another test with a large newsarticle. You call it a day and a finished application ready to take into production... only for the nightmare (maybe not your nightmare but definitely mine). When users start using your application bug reports are being made to the helpdesk by phone and by email to be answered, added and forwarded via the bugtrackingsystem only to be discussed with the manager what to do and when. You find the bug, change your code again you do some simple and random testing, do a release (with all the overhead that comes with), close the bug and tell the manager and helpdesk for them to inform the original user.</span><br /></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;">Why did all these bugs hit you in the face? Because you did not test at all... If this is what you call testing I suggest you buy a book about testing software... I call it a waist of time....</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><span class="Apple-style-span" style="text-decoration: underline; -webkit-text-decorations-in-effect: underline; ">Your new "timesaving" scenario:</span><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style=" ;font-family:Arial;">Instead of doing those random dataentry scenarios that usually involve endless logins and selecting the needed menu buttons and options... I will write three simple test that do a "way too simple" insert, update and delete. I know that doing those will save me a lot of time compared to your scenario. I will run the tests and modify my code until it works. The time I have left I spent on writing some extra simple tests for my code (test principle: find defects early). Now that everything works I tie things up to my user interface and do some simple but serious Blackbox testing because the user interface contains hardly any code (test principle: software that is easy to test is easy to maintain).</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;">Now when a bug report comes in I check it against my unittests to see why that situation is not covered. If it is covered it's simply a user interface problem easily fixed.</span></div><div style="text-align: left;"><span class="Apple-style-span" style=" text-decoration: underline;font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style=" ;font-family:Arial;"><span class="Apple-style-span" style="text-decoration: underline; -webkit-text-decorations-in-effect: underline; ">Conclusion:</span></span><br /></div><div style="text-align: left;"><span class="Apple-style-span" style=" ;font-family:Arial;">Unittesting does not take extra time if you don't do extra testing. It does save time because you can just repeat and repeat your tests with one press of a button untill things work.</span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;"><br /></span></div><div style="text-align: left;"><span class="Apple-style-span" style="font-family:Arial;">Of course, even if you would compair proper repetitive manual testing in comparison to proper unitesting, unittesting will saveyou time right from the strart (even before you start refactoring). Not to mention that unittesting not only results in less defects but also leads to better designs....</span></div><div style="text-align: left;"><br /></div><div style="text-align: left;">Happy UnitTesting, Today !</div><div style="text-align: left;"><br /></div><div style="text-align: left;">P.S.: I know the example is not UnitTesting by the book its more integration testing but that's not what this article is about...</div><div style="text-align: left;"><br /></div><div style="text-align: left;"><br /></div>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com5tag:blogger.com,1999:blog-737100980526652029.post-73211452343717589932008-11-21T00:17:00.001-08:002008-11-21T00:37:10.988-08:00What is Architecture (Quote)"Architecture is the continues quest for finding, keeping and sharing the perfect balance between philosphy and pragmatism through continuous evaluation of all stakes in blind justice by utilizing all available creativity and knowledge ."<br /><br />Marcel van Eijkel -Eindhoven, 21 November 2008Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-84798099849831842372008-11-06T01:09:00.000-08:002008-11-06T01:19:10.981-08:00Whats new in DotNet 4.0 (pdf)Take a look at this .pdf to get a good but quick impression about the new types and namespaces included asof Dotnet 4.0 (and 3.5 servicepack 1).<br /><br /><a href="http://brad_abrams.members.winisp.net/Projects/PDC2008/PDC2008-NETFX4.pdf">http://brad_abrams.members.winisp.net/Projects/PDC2008/PDC2008-NETFX4.pdf</a><br /><br />I think there is enough for everybody to benefit.<br /><br />For me I particularly like:<br /><ul><li>the new biginteger datatype that is part of the new core;</li><li>the new concurrent-collection;</li><li>the mvc framework that is included;</li><li>the many new classes for the workflow framework;</li></ul><p>What I like less about this release:</p><ul><li>the entity framework seems part of this release. My experiences sofar before it was included in this release were disappointing;</li><li>in my opinion, the unity should have been part of the core;</li><li>new ajax stuff, but i would bet my money on jquery. No microsoft ajax for me anymore for a while;</li></ul><p> </p>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-59251850681229710822008-11-03T05:08:00.001-08:002008-11-03T05:44:55.673-08:00My Favorite Code Snippets (Visual Studio)<p>Below, my ever growing list of my favorite Code Snippets: </p><ul><li>IDisposable: <a href="http://gotcodesnippets.com/1136.snippet">http://gotcodesnippets.com/1136.snippet</a> (replace destructor in the comments with finalizer) </li><li>Singleton: <a href="http://www.gotcodesnippets.com/1042.snippet">http://www.gotcodesnippets.com/1042.snippet</a> (as per <a href="http://www.yoda.arachsys.com/csharp/singleton.html">http://www.yoda.arachsys.com/csharp/singleton.html</a>)</li></ul><br /><br />happy Snippeting!Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-23906349757813799852008-10-31T04:38:00.000-07:002008-10-31T04:53:03.879-07:00Visual Studio Unittest InheritanceAs your project thus your unittests grow and get more complex you might have to use every Object Oriented "trick" in the book to keep your UnitTests lean/mean/fast and flexible. Of course you don't want any redundant (unittest)code so applying inheritance to your unittests might seem a natural step (especially with provider/Inversion Of Control/Plugins beging used more and more).<br /><br />Inheritance of UnitTests for Visual Studio however, still, is only partly supported by Visual Studio 2005 and Visual Studio 2008 (all editions). You can't define your baseclass/derivedclass in seperate assemblies.<br /><br />To me this is a big limitation and the "obvious" solutions offered by Microsoft (copy/paste or add twice) for me are no option. I rather go for sharing in my version control system.<br /><br />Just an other example of why UnitTesting as offered by Visual Studio so far "feels" a bit unmature. Speaking of which: the atrributename of "fixture" is so much more right then "testmethod"...<br /><br />======== From MSDN =============<br /><br />A test class is any class that is marked with the TestClass attribute. Test classes can now inherit members from other test classes. This means that you can create reusable tests in base test classes; derived test classes can inherit tests from base test classes. This feature eliminates duplicated test code and gives developers more flexibility while unit-testing production code.<br />A test class cannot inherit from a class that is in a different assembly. You can circumvent this limitation in the following way:<br /><ul><li>Define your base test class in a source code file and add the file to Project A. </li><li>Add the same source code file to a different project, Project B. To do this, right-click the project in Solution Explorer, click Add, click Existing Item, and then use the Add Existing Item dialog box to select the file.<br />Although Project B builds into a different assembly, it includes the base test class. Other test classes in Project B can inherit from that base test class</li></ul><br />===============================<br /><br /><br />For more information:<br /><br />Visual Studio 2005: <a href="http://support.microsoft.com/kb/919649">http://support.microsoft.com/kb/919649</a><br />Visual Studio 2008: <a href="http://msdn.microsoft.com/en-us/library/ms182516.aspx">http://msdn.microsoft.com/en-us/library/ms182516.aspx</a><br /><br />Happy Testing!Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-40037878227988029282008-10-30T02:56:00.000-07:002008-10-30T03:57:43.425-07:00Bad Architects (Quote)"We would not discuss so abstract about Architecture if we were not such bad Architects."<br /><br />Marcel van Eijkel, 30 oktober 2008 (based on a quote of Friedrich Nietzsche)Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-45230105925365471612008-10-22T02:38:00.000-07:002008-10-22T02:47:32.260-07:00ASP.Net Ajax Update Panel QuirksMainly as a reference for myself, when working with the ASP.Net UpdatePanel remember the following limitations, I have encountered sofar:<br /><br /><ul><li>Radiobutton-triggers only work if you set no default value (you can set it from the codebhind) see: <a href="http://forums.asp.net/t/1126914.aspx">http://forums.asp.net/t/1126914.aspx</a></li><li>Script-blocks don't work if you want it anyway there is a nice solution here: <a href="http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx">http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx</a></li></ul><p>For now, I am a big fan of the updatepanel because it gives me the user experience benefits of Ajax without the (architectural) impact.</p><p></p>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-16233081054287758002008-10-22T00:09:00.000-07:002008-10-22T00:31:53.778-07:00Microsoft's Ajax StrategyWith only a bugrich codeplex AJAX Toolkit available, professional ASP.Net Developers were forced to count their options outside the Microsoft playfield. Fast amounts of time were and are invested in encorperating Ajax-frameworks into ASP.net. Just think of Backbase, Dojo, Prototype and Yahoo to name a few.<br /><br />But there is hope If you are a fan of Scott Guthrie it can't be a suprise, Microsoft future direction for their Ajax strategy will be "JQuery". Atleast that is what I expect given the influence that Scott has and the recent beta release of the mvc-framework heavily depending on JQuery.<br /><br />My experiences with JQuery are amazin: in the very first place it is very very practical. Its amazing what one can accomplish with a few, intuitive, lines of code.<br /><br />Secondly, the availability of ready-to-use components build on "JQuery" is rapidly increasing.<br /><br />So my advise: start experimenting with "JQuery" today, and learn the basics.<br /><br />See: <a href="http://www.jquery.com/">http://www.jquery.com/</a>Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-72981704454272437902008-10-21T01:11:00.000-07:002008-11-25T07:33:05.262-08:00Quote about recognizing a leaderIedereen met een doel, die van anderen afhankelijk is om dat te bereiken, is een leider.<br /><br />21 oktober 2008, Marcel van Eijkel<br /><br />=====<br /><br />(translation)<br />Anyone, who has a goal being dependent on others to accomplish it, is a leader.Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0tag:blogger.com,1999:blog-737100980526652029.post-51217908785989707182008-10-20T11:44:00.000-07:002008-10-20T11:52:14.869-07:00Null Column Values in Linq2SQL ( isNull, Linq )Just wanted to share that a common mistake using Linq2SQL is to use the "equals operator" if you want to find a row that has null-values in certain columns.<br /><br />Wrong:<br />From table in context.Table where<span style="color:#ff0000;"> (searchValue == table.Column)</span><br />Results in "from Table where Column=null"<br /><br />Right:<br />From table in context.Table where (<span style="color:#009900;">Object.Equals(searchValue, table.Column))</span><br />Results in "from Table where Column is null";<br /><br />Happy Linqing!<br /><br />PS: the reason I am using Linq2Sql and not Linq2Entities because of the current lack of disconnected entities support. I tried it but it was way too time consuming to use the conceptual layer as a business/object layer.Marcel van Eijkelhttp://www.blogger.com/profile/13020976692117196364noreply@blogger.com0