BT

F# Type Providers – Why And How

by Roopesh Shenoy on Sep 25, 2012 |

Microsoft Research has published a white paper explaining how Type Providers makes F# useful for accessing and processing “internet scale” information sources.

What problems are Type Providers intended to solve?

  • Non-uniform schematization of data in various sources across the internet
  • Need to have a parsing layer (either auto-generated or manually written) for accessing each of these sources in a target language

Type Providers provide a standard mechanism to wrap an existing type of data source such that the data and matadata is available to the F# programmer – there is no need to create a separate wrapper for different data sources and schemas for that type once a provider is created. The data structure is inferred by the type provider by connecting to the data source at design time (assuming connectivity to the source).

This data can also be accessed by the the F# compiler and allows various IDE features such as intellisense and in-line documentation, with schema and metadata pulled from the data-source on demand.

Combined with LINQ, this makes F# extremely useful in manipulating data directly from various sources. You can have a look at this presentation by Joe Pamer for more details.

F# 3.0 was released along with .NET framework 4.5. Microsoft recently announced a Code-drop for it - you can now see how this feature is implemented under-the-hood.  

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT