0
comment
on 2/11/2015 11:03 AM

Here comes another release of CloudSharper! Version 0.9.27 comes with a number of enhancements:

  • It is now possible to write RPC functions in F# interactive. When you call an [<Rpc>]-annotated function from the client side, the arguments are serialized and sent through the WebSocket used by F# Interactive, passed to the function, and the response is sent back the same way.
    Here is an example where two separate widgets share a common server-side state:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    
    let serverSideCounter = ref 0
    
    [<Rpc>]
    let increment() =
        serverSideCounter := !serverSideCounter + 1
    
    [<Rpc>]
    let get() =
        async { return !serverSideCounter }
    
    let x =
        <@ Button [Text "Increment"]
            |>! OnClick (fun _ _ -> increment()) @>
    
    let y =
        <@ Button [Text "Get the current value"]
            |>! OnClick (fun button _ ->
                async {
                    let! value = get()
                    button.Text <- "The value is " + string value
                }
                |> Async.Start) @>
  • The first time experience is largely improved. When entering CloudSharper without a local component running, instead of a message that could easily be mistaken for an error, CloudSharper now displays a friendly screen with install instructions.
  • The project templates are updated to the latest WebSharper (3.0.26-alpha).

We are now planning a major rework of the dashboard screen which will contain a lot of cool new features, including GitHub integration and statistics about your workspaces. We can't wait to have them ready for you to enjoy!

Happy coding!

.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper