-
In the previous post , we covered various scenarios around how we’d make the syntax around using the MongoDB C# Driver a little nicer and less stringy. And before that we looked at using and abusing these so called dynamic lookup operators . In the F# language, we have the ability to define...
-
Lately in my series on the Reactive Extensions, you’ll have noticed I focused quite a bit on the IObservable<T> and IObserver interfaces as well as the extensions methods that are included. There is one thing, however, that might have been missed with the release of the Reactive Extensions...
-
In the previous post of the Introduction to the Reactive Framework series, we covered how to create new IObservable<T> instances, either from scratch or from existing sequences. What this allowed us to do was turn an operation which was previously interactive, such as iterating over a collection...
-
As you may have noticed, I’ve been blogging a bit about the Reactive Framework , now the Reactive Extensions for .NET (Rx) and how it will change the way we approach asynchronous and event-based programming. Just as LINQ to Objects changed the way we deal with collections, The Reactive Extensions...
-
In the previous post in this series, we covered how to turn .NET events into first class values through IObservable instances. By doing so, we were able to do much more interesting things than just subscribe and unsubscribe, instead we were able to create a mouse drag event with little effort through...
-
In my previous post in the Introduction to the Reactive Framework series, I discussed the duality between the IEnumerable/IEnumerator and IObservable/IObserver and how that enables us to generalize the ideas from LINQ to Objects to LINQ to Observables/Events. After the last post, I was asked how...
-
In my previous post , I talked a little bit about the parts of the Reactive Framework that are coming to the .NET 4 BCL as well as their implementation in F# as part of F# First Class Events. This time, let’s come back to the Reactive Framework itself from which the IObservable<T> and IObserver<T>...
-
During my series about first class events in F#, I made frequent mention of the LiveLabs Reactive Framework (Rx), without going into much detail as to what it is. Now that the series is complete and we understand both how F# first class events work, as well as their integration into F# async workflows...
-
Generic constraints inside .NET has always been a fun enterprise, especially given how C# handles them There has been some discussion on Jon Skeet’s blog about the fact that C# does not allow for generic constraints referring to a number of types. These include: System.Array System.Delegate...
-
I watched Sean Chambers deliver an excellent talk about S.O.L.I.D. principles last weekend at Tallahassee CodeCamp . It motivated me to look a little deeper into the Liskov Substitution Principle , which states: Functions that use pointers or references to base classes must be able to use objects of...
-
When you call a query method that returns true or false, I highly suggest that you make true results trip conditional logic / guard clauses / etc. I was driving out some code today in an MVC controller that had a dependency on an type who's responsibility it is to check for unique email addresses...
-
Recently, there has been an effort launched called the “Anti-If Campaign” in which they deride the use of if statements and instead, focus on Object Oriented Principles in order to create more flexible designs. Now certainly, I have a sympathetic ear to this cause as I’ve seen code that literally...
-
In the past couple of posts, I’ve been talking about functional composition in regards to explaining its relevance to C#. I thought I’d step back just a little though and explain more of the fundamentals in a more natural functional language such as Haskell or F#. C# has a tendency to be...
-
In the previous post, I covered currying as well as left to right functional composition. I showed that with a few extensions methods to our functions, we can create rich, albeit verbose, solutions through functional composition. But, what about going from right to left in functional composition...
-
In the last post , we talked about partial application and currying with respect to functional composition. I showed the power of functional composition in regards to a real-world example of how to calculate a book price given the chain of potential discounts, taxes, shipping, etc. Through...