Browse by Tags

  • Singular Reponsibility Principle (SRP) could have came in handy....

    I was going back through an application I am currently working on for a client and trying to come up with a way to bridge a gap between that application and a new web site they want, which has two separate application architectures and ORM solutions. I realized how some of my errors have come to light...
    Posted to Brian Mains Blog (Weblog) by bmains on 11-14-2009
  • Been Thinking About: Controlling Flow of Classes - Props vs Methods

    I been thinking about when I should differentiate between methods and properties. For instance, suppose that I have the following class: public class OrderProcessor { public bool RoundToNearestCent { get; set; } public bool RoundDown { get; set; } } This class has two boolean properties, and you would...
    Posted to Brian Mains Blog (Weblog) by bmains on 08-19-2009
  • List-Based Programming Styles

    When designing your applications to expose list-based data, there is a difference between styles of programming. For instance, suppose you wanted to expose a collection of objects to the consumer. This could be simply done using the following class: public class Customer { private List<Order> _orders...
    Posted to Brian Mains Blog (Weblog) by bmains on 06-29-2009
  • A Variant of the Strategy/State Pattern Example

    This is one common variant to the strategy/state pattern that I commonly use. It varies in that I use a second object to actually figure out which stategy/state pattern object should be used in a given situation. For instance, suppose we had the following strategy pattern base class. public abstract...
    Posted to Brian Mains Blog (Weblog) by bmains on 01-31-2009
  • A Downside to TDD

    You may have noticed that I tend to shift subjects quite a bit. I talked about Agile a while ago, and have moved away from talking about it. I needed to grow and learn about the processes, which I have done a little. I'll always be a student in this subject, never fully grasping all that it has to...
    Posted to Brian Mains Blog (Weblog) by bmains on 01-15-2009
  • Developing For Reusability

    As software developers, we try to keep reusability in mind. To figure out whether a particular solution is reusable, take a look at what you have to do to use it. For instance, if you are developing an ASP.NET user control, does the developer who consumes that user control have to only write 2, 20, or...
    Posted to Brian Mains Blog (Weblog) by bmains on 06-03-2008
  • Encapsulating State Changes

    Whenever it comes to determining whether a business object meets a certain state, I like to do create a property or method for this. For instance, evaluate the property below: public bool IsCompleted { get { return this.CompletedDate != null; } } The IsCompleted property checks to see if a completed...
    Posted to Brian Mains Blog (Weblog) by bmains on 05-20-2008
  • Calendar Day View: TDD Breakdown

    If you haven't heard about the series I'm doing, the Calendar Day View project is one that I'm trying to use TDD practices to show the process creating a custom control. However, there are times when TDD breaks down, not because TDD fails, but because I failed to implement TDD. Now, that's...
    Posted to Brian Mains Blog (Weblog) by bmains on 05-16-2008
  • Calendar Day View: TDD and Refactoring at work

    So, to start out, I thought a little bit about the initial setup for how I could do some testing on the server side of the control. You have to understand the inner workings of server controls to understand. At the end of the process, no matter whether the control is a simple control, a composite control...
    Posted to Brian Mains Blog (Weblog) by bmains on 05-10-2008
  • CalendarDayView: Initial Design Specs and Setup

    I've come up with some preliminary design specs of the initial functionality that I want in this control. I've included some of the interactions that can happen in the control, and the basic view (once I figure out how to attach an image, I'll make that available on this post). I want to...
    Posted to Brian Mains Blog (Weblog) by bmains on 05-09-2008
Page 1 of 4 (40 items) 1 2 3 4 Next >