SlideShare ist ein Scribd-Unternehmen logo
1 von 35
itcampro@ itcamp13# Premium conference on Microsoft technologies
Developing for Windows 8
with F# and WebSharper
Adam Granicz, CEO, IntelliFactory
#granicz, #websharper
http://fpish.net/blog/adam.granicz/all/0
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileHuge thanks to our sponsors!
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
3x F# MVP – 2010, 2011, 2012
(Most Valuable Professional)
Coauthor of 4 F# books, 3 of
them with Don Syme, the
designer of F#
CEO of IntelliFactory,
The F# Company
Regular speaker in numerous
conferences and developer
workshops
About me
Steering Committee member
of the Commercial Users of
Functional Programming
(CUFP) workshop,
representing F#
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Expert F# - 2007
Expert F# 2.0 – 2010
Visual Studio 2010 and .NET 4 Six-in-One – 2010
Expert F# 3.0 – 2012
F# Books I coauthored
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
We see how to do the following:
• Doing web development in F#
• Binding JavaScript libraries for F# use
• Developing a Win 8/Surface application in F#
• Sneak preview of an online development
environment that enables quick exploration
and embedded applications
• .. that makes data visualization easy and fun
In this talk…
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Functional core language
Powerful functional abstractions
Functional data structures
Immutability
Cool features
Active patterns
Units of measure
Type Providers
Object-orientation to interoperate with other .NET
languages
Why F#?
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Mature, enterprise-ready framework
Write all your server+client code in F#
Get a complete web or mobile application
Interface with any client-side JS library via F#
Powerful functional abstractions
Automatic resource management
Safe URLs, type-safe URLs
and much-much more…
WebSharper
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Open source project, available at:
https://bitbucket.org/IntelliFactory/websharper
Dual licensed for closed source use
Dedicated support – new features, bugfix
releases
WebSharper
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
open IntelliFactory.WebSharper
module Server =
[<Rpc>]
let MyServerFunction(...) = ...
module Client =
[<JavaScript>]
let MyClientFunction(...) =
...
let v = MyServerFunction(...)
...
Bridging the language mismatch
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
WebSharper sitelets
• Type-safe
• Composable
• First-class
Parameterized over a union type:
type Action =
| Home
| Contact
| Protected
| Login of option<Action>
| Logout
| Echo of string
Representing web applications as values
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileSitelets – dynamic templating
Runtime-checked, safe URLs
module Skin =
type Page = { Body : Content.HtmlElement list }
let MainTemplate =
let path = Path.Combine(__SOURCE_DIRECTORY__, "Main.html")
Content.Template<Page>(path)
.With("body", fun x -> x.Body)
let WithTemplate body : Content<Action> =
Content.WithTemplate MainTemplate <| fun context ->
{ Body = body context }
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Composing web applications from smaller ones
let EntireSite =
let home = Sitelet.Content ...
let authenticated = Sitelet.Protect filter <| ...
let basic = Sitelet.Infer <| fun action -> ...
Sitelet.Sum
[
home
authenticated
basic
]
Representing web applications as values
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Describing client-side
APIs in F# via
WebSharper
Interface
Generator (WIG)
Binding JavaScript libraries
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
namespace IntelliFactory.WebSharper.Facebook
module Definition =
...
let FB =
Class "FB"
|+> [ ...
"login" => ...
"getLoginStatus" => ...
"api" => ...
]
|> Requires [Res.FacebookAPI]
let Assembly =
Assembly [
Namespace
"IntelliFactory.WebSharper.Facebook" [
...; FB
] ...
]
Binding JavaScript libraries
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileBinding JavaScript libraries
Defining classes – useful operators
let FlashHidingArgs =
Class "FB.FlashHidingArgs"
|+> Protocol [
"state" =? T<string>
"elem" =? T<Element>
]
=? : Member
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileBinding JavaScript libraries
Defining optional members
let InitOptions =
Pattern.Config "FB.InitOptions" {
Required = []
Optional =
[
"appId", T<string>
"cookie", T<bool>
...
"hideFlashCallback", FlashHidingArgs ^-> T<unit>
]
}
• Typical in most JavaScript libraries
• Used heavily in configuration objects
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileBinding JavaScript libraries
Defining safe enumerations
let UserStatus =
Pattern.EnumStrings "FB.UserStatus"
["connected"; "not_authorized"; "unknown"]
• Typical in most JavaScript libraries
• Used heavily in configuration objects
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileBinding JavaScript libraries
eDSL to describe JavaScript APIs
Type Provider for TypeScript definitions
F#
WebSharper
extension
TypeScript
TypeScript
Type Provider
WebSharper
extension
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileBinding JavaScript libraries
Describing client-side
APIs via
TypeScript
declarations
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Type Provider for TypeScript definitions
type Facebook =
IntelliFactory.TypeScript.Generator<"Facebook.d.ts">
Facebook.***
Binding JavaScript libraries
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
An F#/WebSharper application using jQuery
Mobile
Total size: 150 LOC in F#
My Facebook Wall for tablets
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileMy Facebook Wall for tablets
WebSharper Facebook application showing wall posts
• Using the Facebook bindings generated via WIG and TypeScript.
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileIntelliMath for WinRT/8
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
An F#/WebSharper application using WinJS
Size: 1100 LOC in F#
IntelliMath for WinRT/8
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Promises
type Promise<'T> =
[<Inline "$this.then($f)">]
member this.Then(f: 'T -> 'U) = X<Promise<'U>>
[<Inline "$this.done($f)">]
member this.Done(f: 'T -> unit) = ()
Binding WinJS
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
module Application =
[<Inline "WinJSSetOnActivated($f)">]
let OnActivated(f: unit -> unit) = ()
module Local =
[<Inline "WinJS.Application.local.exists($f)">]
let Exists (f: string) = X<Promise<bool>>
[<Inline "WinJS.Application.local.readText($f)">]
let ReadText (f: string) = X<Promise<string>>
...
Binding WinJS
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Going to TypeScript declarations or WIG is the
full solution
Binding WinJS
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
[<JavaScript>]
let rec (|Factor|_|) = function
| NUMBER (n, rest) ->
Some (Expr.Const (Const.Number n), rest)
| ID ("x", rest) ->
Some (Expr.Const Const.X, rest)
| ID ("pi", rest) ->
Some (Expr.Const Const.Pi, rest)
| ID ("e", rest) ->
Some (Expr.Const Const.E, rest)
| LPAREN (Expression (e, RPAREN rest)) ->
(e, rest) |> Some
| _ ->
None
Parsing with active patterns
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
/// Pixels on the screen
[<Measure>] type px
module Events =
type Point = { x: int<px>; y: int<px> }
[<Sealed>]
type PointerPoint =
[<Stub>]
member this.pointerId = X<int>
[<Stub>]
member this.position = X<Point>
Using units of measure
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
MobileExtras
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Aggregates and catalogs FP content about:
Q&A
Events/Conferences
Courses
User Groups
Blogs
Jobs
Developers
etc…
FPish.net
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
• Full F# language support
• Multi-project solutions
• Web and mobile Apps
• Syntax highlighting
• On the fly type checking
• Interactive exploration
• Integration with data
• Support for type providers
CloudSharper
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Develop, deploy, and run full web and mobile
applications with interactive programming
CloudSharper
itcampro@ itcamp13# Premium conference on Microsoft technologies
Development &
Mobile
Video…
CloudSharper
itcampro@ itcamp13# Premium conference on Microsoft technologies
Q & A
Get in touch
#granicz #websharper #fpishnet
http://websharper.com
http://intellifactory.com
http://fpish.net
http://www.facebook.com/intellifactory

Weitere ähnliche Inhalte

Ähnlich wie ITCamp 2013 - Adam Granicz - Developing for W8 with F# and WebSharper

ITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp
 
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSITCamp
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0Thomas Conté
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Enea Gabriel
 
Introduction of Pharo 5.0
Introduction of Pharo 5.0Introduction of Pharo 5.0
Introduction of Pharo 5.0Masashi Umezawa
 
Developing for Windows Phone 8.1
Developing for Windows Phone 8.1Developing for Windows Phone 8.1
Developing for Windows Phone 8.1Dan Ardelean
 
Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)ITCamp
 
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance ToolsITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance ToolsITCamp
 
Mix 2010 twilight
Mix 2010 twilightMix 2010 twilight
Mix 2010 twilightIntergen
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp
 
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...ITCamp
 
ITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Melania Andrisan (Danciu)
 
Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)ITCamp
 
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Heiko Behrens
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalAlessandro Pilotti
 

Ähnlich wie ITCamp 2013 - Adam Granicz - Developing for W8 with F# and WebSharper (20)

ITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystemsITCamp 2013 - Petru Jucovschi - Application ecosystems
ITCamp 2013 - Petru Jucovschi - Application ecosystems
 
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep diveITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
ITCamp 2013 - Raffaele Rialdi - Windows Runtime (WinRT) deep dive
 
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
 
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
MS Day EPITA 2010: Visual Studio 2010 et Framework .NET 4.0
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
Elements of DDD with ASP.NET MVC & Entity Framework Code First v2
 
Introduction of Pharo 5.0
Introduction of Pharo 5.0Introduction of Pharo 5.0
Introduction of Pharo 5.0
 
Developing for Windows Phone 8.1
Developing for Windows Phone 8.1Developing for Windows Phone 8.1
Developing for Windows Phone 8.1
 
Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)Developing for Windows Phone 8.1 (Dan Ardelean)
Developing for Windows Phone 8.1 (Dan Ardelean)
 
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance ToolsITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
ITCamp 2013 - Martin Kulov - Demystifying Visual Studio 2012 Performance Tools
 
Mix 2010 twilight
Mix 2010 twilightMix 2010 twilight
Mix 2010 twilight
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
 
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
Programming on Windows 8.1: The New Stream and Storage Paradigm (Raffaele Ria...
 
ITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile apps
 
Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017Serverless Single Page Apps with React and Redux at ItCamp 2017
Serverless Single Page Apps with React and Redux at ItCamp 2017
 
Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)Busy Developers Guide to AngularJS (Tiberiu Covaci)
Busy Developers Guide to AngularJS (Tiberiu Covaci)
 
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - KeynoteITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
ITCamp 2011 - Mihai Tataran, Tudor Damian - Keynote
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
 
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignalBuilding modern web sites with ASP .Net Web API, WebSockets and RSignal
Building modern web sites with ASP .Net Web API, WebSockets and RSignal
 

Mehr von ITCamp

ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp
 
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp
 
ITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp
 
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp
 
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp
 
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...ITCamp
 
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...ITCamp
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp
 
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp
 
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp
 
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp
 
ITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp
 
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp
 
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp
 
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp
 
ITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp
 
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp
 
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp
 

Mehr von ITCamp (20)

ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
 
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
 
ITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing Skills
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
 
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
 
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
 
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
 
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
 
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
 
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
 
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
 
ITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AI
 
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
 
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
 
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
 
ITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian Quality
 
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
 
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
 

Kürzlich hochgeladen

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Kürzlich hochgeladen (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

ITCamp 2013 - Adam Granicz - Developing for W8 with F# and WebSharper

  • 1. itcampro@ itcamp13# Premium conference on Microsoft technologies Developing for Windows 8 with F# and WebSharper Adam Granicz, CEO, IntelliFactory #granicz, #websharper http://fpish.net/blog/adam.granicz/all/0
  • 2. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileHuge thanks to our sponsors!
  • 3. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile 3x F# MVP – 2010, 2011, 2012 (Most Valuable Professional) Coauthor of 4 F# books, 3 of them with Don Syme, the designer of F# CEO of IntelliFactory, The F# Company Regular speaker in numerous conferences and developer workshops About me Steering Committee member of the Commercial Users of Functional Programming (CUFP) workshop, representing F#
  • 4. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Expert F# - 2007 Expert F# 2.0 – 2010 Visual Studio 2010 and .NET 4 Six-in-One – 2010 Expert F# 3.0 – 2012 F# Books I coauthored
  • 5. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile We see how to do the following: • Doing web development in F# • Binding JavaScript libraries for F# use • Developing a Win 8/Surface application in F# • Sneak preview of an online development environment that enables quick exploration and embedded applications • .. that makes data visualization easy and fun In this talk…
  • 6. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Functional core language Powerful functional abstractions Functional data structures Immutability Cool features Active patterns Units of measure Type Providers Object-orientation to interoperate with other .NET languages Why F#?
  • 7. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Mature, enterprise-ready framework Write all your server+client code in F# Get a complete web or mobile application Interface with any client-side JS library via F# Powerful functional abstractions Automatic resource management Safe URLs, type-safe URLs and much-much more… WebSharper
  • 8. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Open source project, available at: https://bitbucket.org/IntelliFactory/websharper Dual licensed for closed source use Dedicated support – new features, bugfix releases WebSharper
  • 9. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile open IntelliFactory.WebSharper module Server = [<Rpc>] let MyServerFunction(...) = ... module Client = [<JavaScript>] let MyClientFunction(...) = ... let v = MyServerFunction(...) ... Bridging the language mismatch
  • 10. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile WebSharper sitelets • Type-safe • Composable • First-class Parameterized over a union type: type Action = | Home | Contact | Protected | Login of option<Action> | Logout | Echo of string Representing web applications as values
  • 11. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileSitelets – dynamic templating Runtime-checked, safe URLs module Skin = type Page = { Body : Content.HtmlElement list } let MainTemplate = let path = Path.Combine(__SOURCE_DIRECTORY__, "Main.html") Content.Template<Page>(path) .With("body", fun x -> x.Body) let WithTemplate body : Content<Action> = Content.WithTemplate MainTemplate <| fun context -> { Body = body context }
  • 12. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Composing web applications from smaller ones let EntireSite = let home = Sitelet.Content ... let authenticated = Sitelet.Protect filter <| ... let basic = Sitelet.Infer <| fun action -> ... Sitelet.Sum [ home authenticated basic ] Representing web applications as values
  • 13. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Describing client-side APIs in F# via WebSharper Interface Generator (WIG) Binding JavaScript libraries
  • 14. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile namespace IntelliFactory.WebSharper.Facebook module Definition = ... let FB = Class "FB" |+> [ ... "login" => ... "getLoginStatus" => ... "api" => ... ] |> Requires [Res.FacebookAPI] let Assembly = Assembly [ Namespace "IntelliFactory.WebSharper.Facebook" [ ...; FB ] ... ] Binding JavaScript libraries
  • 15. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileBinding JavaScript libraries Defining classes – useful operators let FlashHidingArgs = Class "FB.FlashHidingArgs" |+> Protocol [ "state" =? T<string> "elem" =? T<Element> ] =? : Member
  • 16. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileBinding JavaScript libraries Defining optional members let InitOptions = Pattern.Config "FB.InitOptions" { Required = [] Optional = [ "appId", T<string> "cookie", T<bool> ... "hideFlashCallback", FlashHidingArgs ^-> T<unit> ] } • Typical in most JavaScript libraries • Used heavily in configuration objects
  • 17. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileBinding JavaScript libraries Defining safe enumerations let UserStatus = Pattern.EnumStrings "FB.UserStatus" ["connected"; "not_authorized"; "unknown"] • Typical in most JavaScript libraries • Used heavily in configuration objects
  • 18. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileBinding JavaScript libraries eDSL to describe JavaScript APIs Type Provider for TypeScript definitions F# WebSharper extension TypeScript TypeScript Type Provider WebSharper extension
  • 19. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileBinding JavaScript libraries Describing client-side APIs via TypeScript declarations
  • 20. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Type Provider for TypeScript definitions type Facebook = IntelliFactory.TypeScript.Generator<"Facebook.d.ts"> Facebook.*** Binding JavaScript libraries
  • 21. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile An F#/WebSharper application using jQuery Mobile Total size: 150 LOC in F# My Facebook Wall for tablets
  • 22. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileMy Facebook Wall for tablets WebSharper Facebook application showing wall posts • Using the Facebook bindings generated via WIG and TypeScript.
  • 23. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileIntelliMath for WinRT/8
  • 24. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile An F#/WebSharper application using WinJS Size: 1100 LOC in F# IntelliMath for WinRT/8
  • 25. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Promises type Promise<'T> = [<Inline "$this.then($f)">] member this.Then(f: 'T -> 'U) = X<Promise<'U>> [<Inline "$this.done($f)">] member this.Done(f: 'T -> unit) = () Binding WinJS
  • 26. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile module Application = [<Inline "WinJSSetOnActivated($f)">] let OnActivated(f: unit -> unit) = () module Local = [<Inline "WinJS.Application.local.exists($f)">] let Exists (f: string) = X<Promise<bool>> [<Inline "WinJS.Application.local.readText($f)">] let ReadText (f: string) = X<Promise<string>> ... Binding WinJS
  • 27. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Going to TypeScript declarations or WIG is the full solution Binding WinJS
  • 28. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile [<JavaScript>] let rec (|Factor|_|) = function | NUMBER (n, rest) -> Some (Expr.Const (Const.Number n), rest) | ID ("x", rest) -> Some (Expr.Const Const.X, rest) | ID ("pi", rest) -> Some (Expr.Const Const.Pi, rest) | ID ("e", rest) -> Some (Expr.Const Const.E, rest) | LPAREN (Expression (e, RPAREN rest)) -> (e, rest) |> Some | _ -> None Parsing with active patterns
  • 29. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile /// Pixels on the screen [<Measure>] type px module Events = type Point = { x: int<px>; y: int<px> } [<Sealed>] type PointerPoint = [<Stub>] member this.pointerId = X<int> [<Stub>] member this.position = X<Point> Using units of measure
  • 30. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & MobileExtras
  • 31. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Aggregates and catalogs FP content about: Q&A Events/Conferences Courses User Groups Blogs Jobs Developers etc… FPish.net
  • 32. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile • Full F# language support • Multi-project solutions • Web and mobile Apps • Syntax highlighting • On the fly type checking • Interactive exploration • Integration with data • Support for type providers CloudSharper
  • 33. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Develop, deploy, and run full web and mobile applications with interactive programming CloudSharper
  • 34. itcampro@ itcamp13# Premium conference on Microsoft technologies Development & Mobile Video… CloudSharper
  • 35. itcampro@ itcamp13# Premium conference on Microsoft technologies Q & A Get in touch #granicz #websharper #fpishnet http://websharper.com http://intellifactory.com http://fpish.net http://www.facebook.com/intellifactory