Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Type providers(from the very beginning to the implementation)
1. Type Providers:
from the very
beginning to the
implementation
@sergey_tih
on
2014
2. An F# type provider is a
component that provides types,
properties, and methods for use
in your program.
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. 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. F# 3.0 Built-in Type Provides
• WsdlService
• EdmxFile
• ODataService
• DbmlFile (DBML file based)
• SqlDataConnection (LINQ to SQL)
• SqlEntityConnection (LINQ to Entities)
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/
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. 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
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. 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. 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. F# Type Provider Starter Pack
https://github.com/fsprojects/FSharp.TypeProviders.StarterP
ack
Reference from NuGet:
FSharp.TypeProviders.StarterPack
@mavnn