forked from ServiceStack/ServiceStack
FSharp
Demis Bellot edited this page Aug 1, 2015
·
16 revisions
Thanks to the simplicity, elegance, strong typing and philosophy of both solutions, FSharp and ServiceStack are quickly becoming a popular choice for creating friction-less REST and message-based remote services.
open System
open ServiceStack
type Hello = { mutable Name: string; }
type HelloResponse = { mutable Result: string; }
type HelloService() =
interface IService
member this.Any (req:Hello) = { Result = "Hello, " + req.Name }
//Define the Web Services AppHost
type AppHost =
inherit AppSelfHostBase
new() = { inherit AppSelfHostBase("Hi F#!", typeof<HelloService>.Assembly) }
override this.Configure container =
base.Routes
.Add<Hello>("/hello")
.Add<Hello>("/hello/{Name}") |> ignore
//Run it!
[<EntryPoint>]
let main args =
let host = if args.Length = 0 then "http://*:1337/" else args.[0]
printfn "listening on %s ..." host
let appHost = new AppHost()
appHost.Init() |> ignore
appHost.Start host |> ignore
Console.ReadLine() |> ignore
0
- SignalR + Servciestack with F# hosted on Azure by @kunjee
- Servicestack F# template. Starting from the Start by @kunjee
- Simple.Web and ServiceStack F# Templates by @dmohl
- Web services using ServiceStack framework in F# by @chirdeeptomar
- Last-Fi (F#, Raspberry Pi, Last.Fm, FunScript and ServiceStack) by @pezi_pink
- ServiceStack, With F# on Linux (inc Vagrant / Puppet) by @mattdrivendev
- Declarative authorization in REST services in SharePoint with F# by @sergey_tihon
- ServiceStack and F# on Heroku (GitHub) by @kunjee
- First hand experience with F# by @d4dilip
- ServiceStack: New API – F# Sample by @sergey_tihon
- Async, Cached Twitter API Proxy in F# by @demisbellot
- F# Web Services on any platform in and out of a web server! by @demisbellot
- Why ServiceStack?
- Important role of DTOs
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
-
Getting Started
-
Designing APIs
-
Reference
-
Clients
-
Formats
-
View Engines 4. Razor & Markdown Razor
-
Hosts
-
Security
-
Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in profiling
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Dump Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- MVC Integration
- ServiceStack Integration
- Embedded Native Desktop Apps
- Auto Batched Requests
- Versioning
- Multitenancy
-
Caching
-
HTTP Caching 1. CacheResponse Attribute 2. Cache Aware Clients
-
Auto Query
-
AutoQuery Data 1. AutoQuery Memory 2. AutoQuery Service 3. AutoQuery DynamoDB
-
Server Events
-
Service Gateway
-
Encrypted Messaging
-
Plugins
-
Tests
-
ServiceStackVS
-
Other Languages
-
Amazon Web Services
-
Deployment
-
Install 3rd Party Products
-
Use Cases
-
Performance
-
Other Products
-
Future