The TestApi

TestApi is a library of tools to assist with testing software. One of the tools that comes with it are Fault Injection routines. Fault injection is the process of deliberately putting errors in an app to see if they are handled gracefully.

You can use fault injection to test those hard to reproduce situation. You know the kind. They are the exceptions that only happen once your app has shipped to production.

The two key pieces to TestApi are the "TestApiCore.dll" file, and the FaultInjectionEngine folder. One last note is that fault injection is different than mutation testing. In mutation testing you put an error in you app to see if your unit tests pick it up.

Good luck with your testing. I am currently in the design phase of the software development life cycle. So I don't have a lot of hands on testing just yet.

Entity Framework Tricks

The Entity Framework allows the developer to create a model against which the programmers do queries. The Entity Framework then translates these model queries to SQL against the actual data store.

In the end, the Entity Framework is generating your typical database commands such as insert, update, and delete. But hey. You want to lock down such real database objects to ensure they remain consistent.

The tried and true method to lock down your database is to require all access to go through stored procedures and views. The good news is that you can train the Entity Framework to do just that.

The Entity Framework does not need to go against base tables. It can run against views. In fact, you could even create some views that are identical to the base tables. Good stuff.

Running Zork on .NET

Remember the Infocom games from the good old days? I am talking about games like Zork. Well there is an Infocom game interpreter called Frotz out there. It allows you to play Infocom games on modern day PCs. Frotz is written in the C programming language.

Well guess what? Frotz has been ported to C#. It now has a WPF front end as well. This thing needs the .NET 4.0 runtime to work. I just read a blog post that some guy tried this newly ported interpreter, and had Zork I up and running fine. This sounds like good stuff.

Silverlight Media Framework

Microsoft has an open source framework called the Silverlight Media Framework, or SMF for short. It is a framework for video. This allows you to create your own media player. Cool stuff.

SMF makes use of the Smooth Streaming Player Development Kit. This additional kit is not open source. You create your own Silverlight project. Then you use SMF and this kit within it.

The technique is to inherit from the SMF player. Then you extend the capabilities as you see fit. Settings are downloaded from a server via an XML file. Check it out.

Complaints Against Microsoft

Let us all admit Microsoft’s goals for the .NET framework. They want to go for the enterprise market. They target high end systems. This is the same market that Java is going after. Some people are not happy with how Microsoft has been proceeding with expanding the .NET framework.

On a positive note, .NET provides you with great plumbing. But it seems as if Microsoft is not collecting feedback from users and developers when deciding the new things they are adding to the framework. There are also complaints that .NET is becoming very bloated.

Take the ADO.NET Entity Framework for example. This is an object relational mapping. It is now Microsoft’s recommended data access solution. People think the database layer is big, maybe too big. What happened to support for LINQ to SQL? Developers want to spend time learning and using technologies that will stick around. Microsoft needs to keep an ear on the developer community.


I want to talk about this new Managed Extensibility Framework (MEF) idea. It is a library that ships with the .NET Framework 4, as well as Silverlight 4. It allows third parties to extend systems after they are deployed.

There are other technologies which implement the same thing. These include Enterprise Java Beans, Corba, Spring, and the Component Object Model. However some of these competing or legacy technologies are heavyweight. The competitors may also require a lot of developer work.

Let us discuss some of the MEF terminology. A part provides services to other parts. An export is another name for a service. An import is the service that you part uses. And a contract is an identifier.

MEF comes with an attribute programming model. You can achieve the import using constructors. That is called constructor injection. All part instances are currently implemented as singletons. Finally there is a “lazy” framework where instantiation is delayed until the value of the object Is accessed.

.NET 4

The .NET framework initially came out as a replacement for the legacy MFC. Since then it has changed rapidly. This makes for much developer learning. The most recent version changes ASP.NET significantly.

Silverlight 4 is set to come out towards the end of 2010. It will get access to the Component Object Model in the next release. This technology is Microsoft's weapon to combat Adobe.

Last time .NET was upgrade to include Windows Presentation Foundation and Windows Communications Foundations. Then a minor update added Language Integrated Query (LINQ). All the good new technologies coming out of Microsoft are part of .NET.

Microsoft is getting into the component market. Silverlight 3 contained over 100 new controls with it. This has given consultants something to sell to their customers. Such consultants have custom tool sets to sell. Third party control manufacturers are hurting though.


Microsoft continues to offer the F# programming language in Visual Studio. This relatively new language incorporates functional programming with the existing object oriented language features. The language supports multiprocessor machines. It also supports preemptive multitasking.

F# is a strongly typed language. It has a number of features that have not made it into other .NET languages like C#. However developers have not flocked to the new language in great numbers. If you do specialized parallel programming projects, F# might be for you. Otherwise there may not be a strong reason to try out this new language.


ASP.NET is starting to get old. It seems that just the other day it was taking over where classic ASP left off. Well now there is another twist on an old technology. It is ASP.NET MVC 2.0.

The MVC stands for model view controller. It is a web framework that is compatible with both Visual Studio 2008 and 2010. This technology is an alternative to using web forms.

Don't fret if you are a web forms programmer. That technology is not dead. But ASP.NET is getting a face lift. Leave it to Microsoft to keep the technology pace moving quickly.

Mono Tools

Mono is an implementation of Microsoft .NET for Linux. To be exact it implements C# and the Common Language Runtime (CLR). These implementations are compatible with .NET. A new add-on to Visual Studio 2008 called Mono Tools has now been released. It allows a developer to target Mono apps for the SUSE Linux distribution. It falls into the broad category of cross platform development tools.

Mono Tools are available at different price points. An individual license costs $99. It is good for a single person. The enterprise license costs $245. It allows one person in your organization to use the product. However the license can be transferred between developers in your organization. Finally there is a five seat developer license goes for $2499.

There are plans to enhance Mono Tools to target other Linux distributions. Here is a tip if you decide to buy a copy of Mono Tools: You need to close Visual Studio before you start the Mono Tools install. Enjoy all you Linux .NET folks.