SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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...
 

Último

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

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