Creating an OData Web Service with F#

Jomo Fisher—I’ve spent a little time looking at the OData Web Service Protocol. There is quite a lot to like about it. It is an open, REST-ful format for communicating with a web service as if it were a database. You can query an OData service with LINQ. To help me learn about it I…

0

How to Enumerate all WMI Classes

Jomo Fisher—Quick sample today. I’m mainly posting this because it took me a while to figure it out and I hope it might save someone some time. This is the F# code you would useto enumerate all WMI classes on your system and show the properties of each. of each.   Code Snippet // WalkWmiTypes.fsx…

0

Neat Samples: MEF in F# Scripts

Jomo Fisher—I posted yesterday about using MEF in F# programs. In the comments Oldrich asked if it was possible to do the same thing in F# scripts. It is indeed possible. It actually looks like a really powerful combination because you can naturally extend your scripts just by adding new #load directives at the top….

1

Neat Samples: Extend your F# program with MEF

Jomo Fisher—The Managed Extensibility Framework is an interesting new technology in .NET 4.0. It lets you set up a plug in system for your application so that your program can acquire new functionality just by, for example, adding a .dll into a particular directory. This is a simple example in F#. This code sets up…

1

Neat Samples: F#, Freebase and DGML

Jomo Fisher – I recently posted about the freebase web service here. This sample reads biological classifications and renders them in DGML. The result is a huge graph, here’s a little piece of it: Code Snippet // FreebaseDgml.fsx // Example of reading from freebase.com in F# using DataContract and JSON serializer and write the result…

0

Neat Sample: F# and Bing API

Jomo Fisher – I recently posted an sample of calling the Freebase web service with F#. Here’s another F# web service sample. This one uses the Bing Phone API to do a query. This time the code uses Xml instead of JSON and XmlDocument instead of a DataContract deserializer. This is pretty much a straight…

0