Introduction I’ve written a lot of posts on how to unit test, break dependencies, mocking objects, creating fakes, dependency injection and IOC containers. I am a huge advocate of writing unit tests. Unit tests are not the solution to everything, but they do solve a large number of problems that occur in software that is … Read moreThe Case for Unit Tests
Introduction In this post, I’m going to talk about basic dependency injection and mocking a method that is used to access hardware. The method I’ll be mocking is the System.IO.Directory.Exists(). Mocking Methods One of the biggest headaches with unit testing is that you have to make sure you mock any objects that your method under … Read moreMocking Your File System
The Basics The IBM 701 computer was one of IBM’s first commercially available computers. Here are a few facts about the 701: The 701 was introduced in 1953. IBM sold only 30 units. It used approximately 4,000 tubes. Memory was stored on 72 CRT tubes called Williams Tubes with a total capacity of 2,048 words. … Read moreVintage Hardware – The IBM 701
There is this debate raging among developers: “Is it better to use stored procedures or not use stored procedures”. From first glance, this seems like a simple question, but there are some complicated implications around this question. Here’s the basic pros and cons of using stored procedures in your system: Pros You can isolate table … Read moreStored Procedures Vs. No Stored Procedures
Summary This subject is much larger than the blog title suggests. I’m going to discuss some basics of using a caching system to take the load off of your database and speed up your website. I’ll also discuss how cache should be handled by your software and what the pitfalls of caching can be. Caching … Read moreCaching
Summary In this blog post I’m going to demonstrate a simple .Net MVC project that uses MS SQL server to access data. Then I’m going to show how to use Redis caching to cache your results to reduce the amount of traffic hitting your database. Finally, I’m going to show how to use the AutoFac … Read more.Net MVC Project with AutoFac, SQL and Redis Cache
The Contenders Dapper Dapper is a hybrid ORM. This is a great ORM for those who have a lot of ADO legacy code to convert. Dapper uses SQL queries and parameters can be used just like ADO, but the parameters to a query can be simplified into POCOs. Select queries in Dapper can also be … Read moreDotNet Core vs. NHibernate vs. Dapper Smackdown!