Valdis Iljuconoks - Loving data with F#

26
Partners:

Transcript of Valdis Iljuconoks - Loving data with F#

Page 1: Valdis Iljuconoks -  Loving data with F#

Partners:

Page 2: Valdis Iljuconoks -  Loving data with F#

Valdis Iļjučonoks

Technical Fellow, Software ArchitectVisual Studio ALM evangelistMicrosoft MVP

http://www.tech-fellow.net | @tech_fellow

Geta AS, Tech Fellow Consulting, Latvian .Net [email protected]

Page 3: Valdis Iljuconoks -  Loving data with F#

Loving data with F#

Valdis Iļjučonoks

Page 4: Valdis Iljuconoks -  Loving data with F#
Page 5: Valdis Iljuconoks -  Loving data with F#

There are three kinds of lies: lies,damned lies, and statistics.

-- Benjamin Disraeli

Page 6: Valdis Iljuconoks -  Loving data with F#

Information rich programming

Page 7: Valdis Iljuconoks -  Loving data with F#

Bring data source closer to program

Page 8: Valdis Iljuconoks -  Loving data with F#

Barrier to include data sources: Need to represent data as types, properties and methods Generated code must be replaced every time service

reference is adjusted

Page 9: Valdis Iljuconoks -  Loving data with F#

Type Providers

Page 10: Valdis Iljuconoks -  Loving data with F#

From1k feet: Compile-time type provider Erased or generated types approach Data set schema as type info source

Page 11: Valdis Iljuconoks -  Loving data with F#

Driven by F# team and community

Page 12: Valdis Iljuconoks -  Loving data with F#

DbmlFileEdmxFile

ODataServiceSqlDataConnectionSqlEntityConnection

WsdlServiceAppSettings

ExcelGraph

MachineManagement

MathRegexXamlXrm

ApiaryCsv

FreebaseJson

WorldBankXml

DGMLWordCsv

DataStoreHadoop/Hive/Hdfs

HelloWorldManagement

MiniCvsXrm

FunScript…

Page 13: Valdis Iljuconoks -  Loving data with F#

{Demo image}

Page 14: Valdis Iljuconoks -  Loving data with F#

Json Provider

Page 15: Valdis Iljuconoks -  Loving data with F#

WorldBank Provider

Page 16: Valdis Iljuconoks -  Loving data with F#

Xml Provider

Page 17: Valdis Iljuconoks -  Loving data with F#

OData Service Provider

Page 18: Valdis Iljuconoks -  Loving data with F#

Is it worth to develop custom provider?

Page 19: Valdis Iljuconoks -  Loving data with F#

Is schema available? Will provider have enough usage it’s worthwhile to write? Will schema change during coding? Will it change during program execution?

Page 20: Valdis Iljuconoks -  Loving data with F#

Authoring TypeProvider

Page 21: Valdis Iljuconoks -  Loving data with F#

Uses F# Code Quotations AddMember() AddMemberDelayed()

Page 22: Valdis Iljuconoks -  Loving data with F#

let staticProp = ProvidedProperty(propertyName = "StaticProperty", propertyType = typeof<string>, IsStatic = true, GetterCode = (fun args -> <@@ "Hello!" @@>))

staticProp.AddXmlDocDelayed(fun () -> "This is a static property")

t.AddMember staticProp

let t = ProvidedTypeDefinition(thisAssembly,namespaceName, "Type" + string n, baseType = Some typeof<obj>)

Page 23: Valdis Iljuconoks -  Loving data with F#

Type Providers

Page 24: Valdis Iljuconoks -  Loving data with F#

Bring data source closer to program

Page 25: Valdis Iljuconoks -  Loving data with F#

Feedback

Page 26: Valdis Iljuconoks -  Loving data with F#

Partners: