September 2012 - Posts

23 September 2012
Template Method Implementation in C#: An Easy Way to Make Your Code Hum Along
A pet project I’ve been working on (on and off, time permitting) has been in need of some serious refactoring, so I finally sat down to eliminate some redundancy, and work on some design pattern work. A common problem in software design is making sure base class implementation is always called from overrides, but also deferring finer grained details to subclasses without changing the base class implementation, without having to always specify base.<implementation> in every single override in subclasses. Enter, the Template Method design pattern, which encompasses the polymorphic aspect of Object Oriented Design (which in my opinion is the most important of the 3 pillars: Encapsulation, Inheritance (aka Specialization) being the other two). The premise is simple, and here’s a very simple UML diagram that outlines the functionality: The base class specifies stubs (abstract methods, or protected virtual method implementations that all subclasses need base functionality for), and a public... Read More...
16 September 2012
Visual Studio 2012/TFS 2012: A Breath of Fresh Air
Visual Studio 2012 hasn’t been released to the general public yet, but a friend of mine was nice enough to lend me his MSDN copy of both VS and Team Foundation Server (I run Sharepoint 2010 on my intranet, which is a requirement for TFS…the integration is incredible). While you’re at it, do yourself a favor and install the new (and free) decompiler from JetBrains: DotPeek , which also integrates into Visual Studio. But, I digress. First off, I swore I would never migrate my source control over to TFS. For the better part of a decade, I’ve been using SourceGear’s Vault solution to house my code, and provide versioning control; the single license version is free. But after watching several webcasts on TFS 2012, I decided to take the plunge (getting it installed is not for the faint of heart by the way, block off half a day to get it up and running). It is leaps and bounds beyond any previous version of TFS, and the Sharepoint integration is nothing short of amazing, especially the reporting... Read More...
05 September 2012
Adding DISQUS to Community Server Sites
DISQUS.com is awesome. Finally, a centralized location for comment conversations to occur. Plus, they manage all the comment spam for you. Here’s how to add it to Community Server blog (I have not done this for the forum section, but I assume it’s just as easy). In your theme folder, in themes\blogs\NAME\ you are using, find the post.aspx file and add the code supplied by disqus. just below the </CSBlog:PostAttachmentData> tag. Also, disqus doesn’t play nice with the default <!DOCTYPE> in Community Server, so change/add a META tag to <meta content='IE=edge' http-equiv='X-UA-Compatible'/> in the themes\NAME\Common\master.Master file. What disqus accomplishes is something I touched on in my last post : Consolidation of information on the web. I look forward to having a better way to keep up with discussions. Read More...