Using the Strategy Pattern to Reduce Complexity in Your JavaScript

Problem: Do you ever find yourself writing a lengthy switch statements or if statements structured like a switch. Luckily there is the Strategy Pattern to help alleviate this complex, sometimes unintelligible code. You may have also noticed that this code … Continue reading 

Posted in Javascript, Readability | Tagged , , | 17 Comments

Simple Async HTTP Module for Appcelerator

Hello techies, I have been using Appcelerator recently. It is a pretty cool tool, it allows you to create cross platform mobile applications for iOS and Android, writing JavaScript. Appcelerator’s Titanium Framework uses the CommonJS API so you can reference … Continue reading 

Posted in Appcelerator, Javascript | Tagged , , , , | 6 Comments

Simple XML to JSON with PHP

Hello all, it’s been a while since I have blogged anything, been extremely busy with personal events in my life. So to get back into the swing of things I am going to KISS this post. I recently needed to … Continue reading 

Posted in JSON, PHP, Web Service, XML | 36 Comments

Serving Images from an Image Controller

Found this solution rather simple when you want to serve images from your database. public class ImageController { readonly IImageQueries Queries; public ImageController(IImageQueries queries) { Queries = queries; } public FileResult Show(int id) { DateTime? dateCreated = Queries.GetDateCreatedById(id); //invalid image, … Continue reading 

Posted in .NET, ASP.NET MVC, C# | Leave a comment

Dynamic View Page, MVC without a View Model

Hello fellow techies on this roller coaster called life. It has been a while since my last post, I have been focusing on some other more important aspects of my life. What I want to talk about in this post … Continue reading 

Posted in .NET, ASP.NET MVC, C#, DTO, dynamic, model, MVC, View | 6 Comments

Step by Step to Using MSpec (Machine.Specifications) with ReSharper

Whilst researching using MSpec with ReSharper I found it difficult to find all the resources I needed in one place. This is an attempt to condense everything into that one place and facilitate those seeking to accomplish the same task. … Continue reading 

Posted in BDD, Behavior Driven Design, Git, MSpec, ReSharper, Specifications, Unit Test | 13 Comments

Configuring Fluent NHibernate with an External NHibernate Config File

A while ago I was having issues using configuring fluent NHibernate with an external configuration file. I kept running into the issue of mappings not being registered. I was finally able to get it working appropriately and thought I would … Continue reading 

Posted in configuration, Fluent NHibernate, infrastructure, Nhibernate | 4 Comments

Testing with a Compiled Class that Doesn’t Implement an Interface – Adapter Pattern

*UPDATE: Per sean chambers, this is an example of the adapter pattern I recently ran into an issue where I needed to implement a simple email service to send users a randomly generated PIN when they are first entered into the system. … Continue reading 

Posted in Adapter Patter, C#, Compiled Class, Implement Interface, Specification, Unit Test | 2 Comments

Updated MonoChrome Firefox theme

Hey just wanted to let everyone know that I updated my Firefox theme, MonoChrome, for version 3.5b4pre.You can grab it from the link below: Screen shot: If you would like to contribute or grab the source, it is hosted … Continue reading 

Posted in Firefox, monochrome, theme | Leave a comment

My Visual Studio Twilight theme

I just finalized my text color theme for visual studio. Just thought I would share it with everyone. It is geared towards those of you who have resharper installed, but it should still work fine without it. The theme is … Continue reading 

Posted in Color Scheme, Visual Studio | 33 Comments