Tag Archives: Software Sagacity

C# Design Patterns: #7 – Bridge

BridgeThe Bridge pattern is ideal for building cross-platform applications.  By completely separating the class interface from the implementation, programs can interchange the actual implementation of a particular subsystem without requiring any changes in other parts of the code.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #6 – Adapter

AdapterThe Adapter pattern helps provide a better way to leverage existing code.  Instead of requiring the developer to redesign components from scratch, the Adapter can integrate work from previous projects or other libraries.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #5 – Builder

BuilderThe Builder pattern is a narrowly-focused pattern that enables incremental creation of new products. This pattern, though limited in application, when applied correctly, brings significant power and flexibility.

The guiding concept behind the Builder pattern is separation of the actual “building” of an product from its design plan. The prototypical example of the builder pattern is saving files to multiple formats. If an application allows saving files to different formats, it will have an internal representation of the data, and will need to “build” different formats dynamically from the same source object.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #4 – Abstract Factory

Abstract FactoryThe Abstract Factory pattern, although not present in many end-user applications, finds ample grace in the development of user-configurable toolkits and frameworks. Instead of locking the developer into a particular set of controls or objects that will be used by the framework, the abstract factory instead lets developers substitute their own controls when necessary.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #3 – The Prototype

PrototypeWhat do CAD design tools, workflow automation, and digital audio synthesizers have in common?  They can all benefit from the Prototype pattern in their software architecture.

Although the Prototype pattern achieves true glory in languages such as JavaScript, which base their entire class structures on Prototypes instead of traditional classes, the pattern still brings powerful functionality to C#.  Its primary use is in a very specific niche: when the users of the application will perform design work, and then group those designs into reusable subcomponents.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #2 – The Factory Method

Factory MethodOne of the less useful C# design patterns is the Factory Method.  Primarily used for framework and toolkit development, this design pattern is rarely used in a language like C# that has templated classes, anonymous functions, interfaces, and reflection.
Continue reading

RSS Twitter LinkedIn Facebook Email

C# Design Patterns: #1 – The Singleton

SingletonThe Singleton is one of the simpler design patterns. As the name suggests, the Singleton creates a single, static, globally accessible class. It is an alternative to global variables and static classes, each which come with their own limitations.

Singletons are excellent areas to store global information, such as database connection strings, system paths, and parsed XML configurations. In addition, Singletons can be used to store global image caches so that images can be shared between functions.
Continue reading

RSS Twitter LinkedIn Facebook Email

When Optimization Breaks Software

LightningIt’s well known that most of the code we write is not what the computer actually runs. When writing a program, the compiler or runtime will take the code and perform a process called “optimization,” where various methods are applied to make the code more efficient so that it will execute faster.
Continue reading

RSS Twitter LinkedIn Facebook Email

Database Design Principles – Part 5: Isolate Semantically Related Multiple Relationships

Custom Database ProgrammingIn the previous database design post, we discussed isolating independent multiple relationships. The goal was to find relationships in the database that were independent, yet incorrectly bound to the same row. This last and final database design principle helps us find data that is too flexible, and can instead be combined to help reduce database size and optimize speed.
Continue reading

RSS Twitter LinkedIn Facebook Email