Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Type Providers: 
from the very 
beginning to the 
implementation 
@sergey_tih 
on 
2014
An F# type provider is a 
component that provides types, 
properties, and methods for use 
in your program.
An F# type provider is a 
component that provides types, 
properties, and methods for use 
in your program. 
As well as a ...
How it works in C# world: 
Codegen, codegen, codegen! 
Source 
• WCF 
Services 
• Database 
• OData 
• UI/XAML 
Codegen 
T...
F# 3.0 Built-in Type Provides 
• WsdlService 
• EdmxFile 
• ODataService 
• DbmlFile (DBML file based) 
• SqlDataConnectio...
FSharp.Data 
• CSV Type Provider 
• HTML Type Provider 
• JSON Type Provider 
• XML Type Provider 
• WorldBank Provider 
•...
JSON 
DEM 
O 
WorldBan 
k 
HTML/WSD 
L 
Games 
R 
COM
R Type Provider: Neural Networks
DEMO: Apache 
Hive Type Provider 
Roman Bugaev (@rbugaev) 
Distinguished Technical Architect for 
projects in cloud comput...
Type Provides 
• DBMLFILE 
• EDMXFILE 
• ODATASERVICE 
• SQLDATACONNECTION 
• SQLENTITYCONNECTION 
• WSDLSERVICE 
• APIARY...
CODE QUOTATIONS
CODE QUOTATIONS: BASICS
CODE QUOTATIONS: BASICS
CODE QUOTATIONS: SPLICING
How to create 
New Type Provider
Before You Start 
The type provider mechanism is 
primarily designed for injecting 
stable data and service 
information s...
Before You Start 
This mechanism isn’t designed 
for injecting information spaces 
whose schema changes during 
program ex...
Before You Start: Ask yourself 
questions 
• Do you have a schema for your information source? If so, what’s 
the mapping ...
F# Type Provider Starter Pack 
https://github.com/fsprojects/FSharp.TypeProviders.StarterP 
ack 
Reference from NuGet: 
FS...
ZIP Provider
ZIP Provider
SAMPLE OF USAGE
DEMO
HOW DO I CREATE AN F# TYPE 
PROVIDER THAT CAN BE USED FROM 
C#?
QUESTIONS? 
THANK YOU! 
Ask me @sergey_tihon 
Ask about #FSharp
My turn to ask questions! 
What Type Provider 
would you like to 
have?
Upcoming SlideShare
Loading in …5
×

Type providers(from the very beginning to the implementation)

1,069 views

Published on

http://www.meetup.com/fsharpminsk/events/214812192/

Published in: Software
  • Be the first to comment

Type providers(from the very beginning to the implementation)

  1. 1. Type Providers: from the very beginning to the implementation @sergey_tih on 2014
  2. 2. An F# type provider is a component that provides types, properties, and methods for use in your program.
  3. 3. An F# type provider is a component that provides types, properties, and methods for use in your program. As well as a compiler/IDE extension…
  4. 4. How it works in C# world: Codegen, codegen, codegen! Source • WCF Services • Database • OData • UI/XAML Codegen Tool • svcutil.exe • edmgen.ex e • datrasvcuti l.exe Types +code Program
  5. 5. F# 3.0 Built-in Type Provides • WsdlService • EdmxFile • ODataService • DbmlFile (DBML file based) • SqlDataConnection (LINQ to SQL) • SqlEntityConnection (LINQ to Entities)
  6. 6. FSharp.Data • CSV Type Provider • HTML Type Provider • JSON Type Provider • XML Type Provider • WorldBank Provider • Freebase Provider http://fsharp.github.io/FSharp.Data/
  7. 7. JSON DEM O WorldBan k HTML/WSD L Games R COM
  8. 8. R Type Provider: Neural Networks
  9. 9. DEMO: Apache Hive Type Provider Roman Bugaev (@rbugaev) Distinguished Technical Architect for projects in cloud computing. Excellent public-speaker and acknowledged member of IT/Startup community.
  10. 10. Type Provides • DBMLFILE • EDMXFILE • ODATASERVICE • SQLDATACONNECTION • SQLENTITYCONNECTION • WSDLSERVICE • APIARY • CSV • FREEBASE • JSON • WORLDBANK • XML • HTML • DBPEDIA • APPSETTINGS • EXCEL • GRAPH • MACHINE • MANAGEMENT • MATH • REGEX • XAML • XRM • CRM • TWITTER • RSS • NUGET • MAT • DGML • WORD • DATASTORE • HADOOP/HIVE/HDFS • COM • FUNSCRIPT • R • MATLAB • IKVM • PYTHON • POWERSHELL • AZURE • S3 • GAMES
  11. 11. CODE QUOTATIONS
  12. 12. CODE QUOTATIONS: BASICS
  13. 13. CODE QUOTATIONS: BASICS
  14. 14. CODE QUOTATIONS: SPLICING
  15. 15. How to create New Type Provider
  16. 16. Before You Start The type provider mechanism is primarily designed for injecting stable data and service information spaces into the F# programming experience. materials are from MSDN
  17. 17. Before You Start This mechanism isn’t designed for injecting information spaces whose schema changes during program execution in ways that are relevant to program logic. materials are from MSDN
  18. 18. Before You Start: Ask yourself questions • Do you have a schema for your information source? If so, what’s the mapping into the F# and .NET type system? • Can you use an existing (dynamically typed) API as a starting point for your implementation? • Will you and your organization have enough uses of the type provider to make writing it worthwhile? Would a normal .NET library meet your needs? • How much will your schema change? • Will it change during coding? • Will it change between coding sessions? • Will it change during program execution? materials are from MSDN
  19. 19. F# Type Provider Starter Pack https://github.com/fsprojects/FSharp.TypeProviders.StarterP ack Reference from NuGet: FSharp.TypeProviders.StarterPack @mavnn
  20. 20. ZIP Provider
  21. 21. ZIP Provider
  22. 22. SAMPLE OF USAGE
  23. 23. DEMO
  24. 24. HOW DO I CREATE AN F# TYPE PROVIDER THAT CAN BE USED FROM C#?
  25. 25. QUESTIONS? THANK YOU! Ask me @sergey_tihon Ask about #FSharp
  26. 26. My turn to ask questions! What Type Provider would you like to have?

×