Developing mobile apps
with F#
Gustavo Guerra
F#unctional Londoners Meetup Group
Developing mobile apps with F#
• App Demos
• Why F#
• F# & Mobile Platforms
• Tips &Tricks
Learn OnThe Go
UKTrains
Demo
Why F#?
• Functional First
• Immutability by default
• Powerful functional abstractions (LINQ+++)
• StrongType System
• Fr...
Why F#?
• Powerful but Light Syntax
• Significant whitespace
• Everything is an expression
• Pattern matching
• Type Infer...
Why F#?
• REPL
• Testability
• More productive than compile-run cycle
• Similar to dynamic languages (Python, Ruby, etc…)
...
Why F#?
• Very goodAsync support
• What’s in C# 4.5
• More composable
• Built-in cancellation!!!
• Started explicitly
• ht...
Windows 8 /Windows Phone 8
• No support forWinRT /WinPRT in F#
• View has to be done in C#
• F# only available through Por...
Windows Phone 7
• Almost everything can be done in F#
• Still need wrapper C# project
• FSharp.Core 4.0 (noType Providers)...
Tips &Tricks
• Create F# wrappers tuned for currying & partial application
• LazyAsync
• Interfaces to access view element...
Q & A
• SourceCode
• http://github.com/ovatsus/LearnOnTheGo
• http://github.com/ovatsus/UKTrains
Upcoming SlideShare
Loading in …5
×

Developing mobile apps with f sharp

1,051 views
892 views

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,051
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Developing mobile apps with f sharp

  1. 1. Developing mobile apps with F# Gustavo Guerra F#unctional Londoners Meetup Group
  2. 2. Developing mobile apps with F# • App Demos • Why F# • F# & Mobile Platforms • Tips &Tricks
  3. 3. Learn OnThe Go UKTrains Demo
  4. 4. Why F#? • Functional First • Immutability by default • Powerful functional abstractions (LINQ+++) • StrongType System • Friends don't let friends use null • Option type • Whole class hierarchies in handful of lines • Discriminated unions • Record types
  5. 5. Why F#? • Powerful but Light Syntax • Significant whitespace • Everything is an expression • Pattern matching • Type Inference • Almost feels like a dynamic language like python • Easier to Understand • Declarative feel • Explicit compilation order • Signature files
  6. 6. Why F#? • REPL • Testability • More productive than compile-run cycle • Similar to dynamic languages (Python, Ruby, etc…) • All your types are belong to us • Type Providers
  7. 7. Why F#? • Very goodAsync support • What’s in C# 4.5 • More composable • Built-in cancellation!!! • Started explicitly • http://tomasp.net/blog/csharp-async-gotchas.aspx
  8. 8. Windows 8 /Windows Phone 8 • No support forWinRT /WinPRT in F# • View has to be done in C# • F# only available through Portable Class Library • MVVM doesn’t work as well as inWPF • Data binding works ok-ish • Reflection doesn’t work on erased type providers • ICustomTypeDescriptor & similars not accessible from F# PCL • F# compilation toWinJS • http://funscript.info/ • http://www.websharper.com
  9. 9. Windows Phone 7 • Almost everything can be done in F# • Still need wrapper C# project • FSharp.Core 4.0 (noType Providers) • No PCL support • Xamarin.iOS / Xamarin.Android • Also allows view to be done in F# • Type Providers currently don’t work, but this will probably improve
  10. 10. Tips &Tricks • Create F# wrappers tuned for currying & partial application • LazyAsync • Interfaces to access view elements • Data Binding • Match functions • Option type doesn’t behave like regular DUs • override x.ToString() = sprintf "%A" x
  11. 11. Q & A • SourceCode • http://github.com/ovatsus/LearnOnTheGo • http://github.com/ovatsus/UKTrains

×