• .NET

    Why Mocking Matters

    October 10, 2012 Share
    How does mocking benefit me?  That’s a question I hear a lot as I travel around the world giving talks.  So before we dive into how to use a mocking tool like JustMock, let’s discuss why this is important and the benefit that mocking provides over other techniques like Fakes. In my post on Why SOLID Matters, we refactored a small piece of code to be more SOLID.  Granted, it was a simplistic example, but good for illustrating several key points on SOLID.  We will continue using the same code to discuss the benefits of Mocking.  As a refresher, we ended...
  • Testing & ALM

    Get your Learn on With Telerik 2012 Q3 Webinar Week

    October 09, 2012 Share
    Webinar week is coming!  From October 22 to October 26, we will be hosting nine webinars showing off the best of what’s new, including an incredible level of support for Visual Studio 2012 and Windows 8.  In addition to seeing all of the cool new features in Telerik’s ever expanding suite of products, you can have a chance to win valuable prizes, including DevCraft Ultimate licenses.  Please visit this link to register: http://www.telerik.com/developer-productivity-tools/whats-new.aspx I will personally be involved in three of the webinars, on Telerik Reporting, the Just suite of products, and support for Windows8 development. The Telerik Report Designer: More Powerful...
  • .NET

    JustCode 2012 Q2 Service Pack 2 Makes Navigation Even Easier

    September 27, 2012 Share
    JustCode has long been helping developers navigate their code and quickly find Files, Types, Members, and Symbols.  The most recent Service Pack (released 12-September 2012) has made it even easier!  Go To File (Ctl-Alt-G) Camel Case Searching Entering capital letters (or a combination of capital letters and lowercase letters) into the search box will filter the files accordingly.  For example, I know that I have two BDD concerns that test logging in, both starting with “When_Logging_In”.  By Typing “WLI”, the Go To File dialog filters down to the files that have the capital letters W,L,I in their name (in order).  The result is...
  • .NET

    Why SOLID Matters

    September 25, 2012 Share
    One of the biggest struggles that developers have with adopting Unit Testing, whether it’s Test Driven Development (TDD), Behavior Driven Development (BDD) or even just Test Eventual Development (TED), is the difficulty some code is to test.  This is typically when code doesn’t follow the SOLID design principles. If you aren’t familiar with Robert C. Martin’s SOLID Principles, here is a quick summary. There are five SOLID principles put forth by Robert (Uncle Bob) C. Martin. Single Responsibility Principle A class should have one, and only one, reason to change Did you ever have a Swiss Army knife?  64 features, but you could never...
  • .NET Mobile

    Migrating OnClientClick handlers from ASP button to Telerik’s ASP.NET AJAX Button

    Let’s start with some background – a common need is for a button to execute some JavaScript code in order to create a more responsive page. With the standard ASP:Button the OnClientClick is used to specify this execution statement. Take the following simple example: <script type="text/javascript">     function ButtonClick(button) {         alert("The Button with ID " + button.id + " was clicked.");     } </script> <asp:Button ID="Button1" Text="Regular Button" OnClientClick="ButtonClick(this); return false;" runat="server" />   What you can see here is a function called with parentheses, an argument provided to the function and the return false; statement that prevents the postback. The case with Telerik’s ASP.NET AJAX Button is slightly different, however. It follows the convention all other Telerik ASP.NET AJAX...