Categories
Programming

AOP in TypeScript Using Aspect

Update! I am actually using decorators for this kind of thing these days. Original article below. I recently wrote about using an existing JavaScript AOP framework with TypeScript, but in this article I’m going to talk about using Aspect, an AOP framework written for, and in, TypeScript. Why? Aspect is small, completely stand alone and […]

Categories
Programming

AOP with TypeScript

For this example, I am using the jquery.aop plugin to weave aspects into the TypeScript program. Other Aspect-Oriented Programming frameworks are available for JavaScript – but this is the one I have used in JavaScript and is a good example of bringing a JavaScript framework into TypeScript. I will create a follow up to discuss […]

Categories
Programming

Using Code Contracts to Separate Your Concerns

I’m not going to talk to much about this one, I’m just going to show you an example because in the case of Code Contracts, the actual code speaks for itself. The existing code that I’m working on is a simple repository, but I’m sure you’ll see this kind of code in many places in […]

Categories
Programming

Code Contracts Fail to Fire

If you are using Code Contracts in .NET and you find that they aren’t running, there are a few simple checks to perform to work out why those clever little definitions aren’t working. If you have used Code Contracts a couple of times, these are the most likely reasons the Code Contracts aren’t doing anything […]