Building Reactive Apps with the Typesafe Platform

It is becoming pretty clear that Reactive is the next big thing in software. But there aren’t very many resources yet about how to actually build a Reactive application. Recently I hosted a webinar about “Building Reactive Apps with the Typesafe Platform” where I tried to explain Reactive in a tangible way using the Reactive Stocks sample app from Typesafe Activator. Here is the recording of that presentation:

Let me know what you think. Thanks!

  • Patrick

    Thanks, James. Great overview. I downloaded the framework and got the demo stock app running in no time. It all worked as described. Now pushing deeper into it all… very excited to get realtime development going. Not sure how I’m going to keep up with hacker news without my usual deploy times, though.

    • Awesome! Thanks Patrick. Let me know if I can help with anything.

  • Steven Elliott

    This is awesome! I am a .NET guy by day but I’ve decided to get an app going with a few people and we’ve settled on using Play! with Scala. I’ve tinkered with it before when it was back in its early 2.0 days but never did anything serious. This was a great intro and I am excited to go strong with this. Have you noticed any major problems developing with Windows as opposed to some *nix OS? I have a ThinkPad W530 and an X1 Carbon both running Win8. I don’t really feel like dual-booting or buying a Mac or something. Anyway, thanks again!

    • Things on Windows should work well. We’ve put a lot of time into making sure Typesafe Activator works correctly on Windows (with a modern browser). Let me know if you have any issues.

  • Martin Hansen

    Great Tutorial!


    I’m wondering how we can do things like

    switch message.type
    when “stockhistory”

    in a more type safe way?

    In templates we could do

    switch message.type
    when “@Message.getClass”

    But what would be the type safe solution with compiled assets?

    • This is on the JS side so there isn’t any type-safety. If we switched the code to TypeScript or Scala.js then we could have a type-safe way to do this.

      • Martin Hansen

        Thanks for responding so quickly! :-)

        I guess

        switch message.type
        when “@Message.getClass”

        _is_ (somewhat) type safe. I get a compile error if I write “@Message.getClazzz” instead of “@Message.getClass”. This is in _templates_.

        My question is, if we can have the same kind of type safety with _compiled assests_?

        • You can’t / shouldn’t combine server-side templates with client-side assets.

          • Martin Hansen

            I guess not, but I sure want to :-)

            Also, instead of

            ws = new WebSocket $(“body”).data(“ws-url”)

            I would like to write

            ws = new WebSocket “”

            which is type safe (as far as the @-part goes) and is possible in templates.

            I would like the best of the two worlds:
            – the @-type-safety of templates, and
            – the performance* of compiled assets.

            Is that really not possible?

          • The reason that I’m using $("body").data("ws-url") is because the server-side template puts the type-safe URL into that field. That way my static assets remain static assets. But my server-side template still have the type-safety in them.

            Static assets should be static. If you mix server-side templating with static assets then they become dynamic assets. That is why you shouldn’t mix the two.