4 ms·
Anyone doing some interesting Scala front and back projects? I'd love to hear some success (or lessons learned) stories. Is there a good "skeleton" project for
by eranation 11y ago
Anyone doing some interesting Scala front and back projects? I'd love to hear some success (or lessons learned) stories.
Is there a good "skeleton" project for a front end Scala.js + back end Scala.
I'm especially interested in reusing model objects between front and back, or is the best practice still to just use REST services the "old fashioned" way? (vs a more GWT-like approach that feels a little more like an RPC)
I would love to have my next project be all Scala but I wonder what are the benefits beyond just having a single language in the project. Is there a good sbt plugin / template that has a good workflow for continuous development/integration/deployment using Scala+Scala.js?
- easel 11y agoThere's a list of sites using scala.js on the website that evolves quite regularly. The scalajs-spa-tutorial at https://github.com/ochrons/scalajs-spa-tutorial https://github.com/ochrons/scalajs-spa-tutorial is probably the best place to see a full stack app that you can poke and prod at. It's been through a few iterations by now and represents a number of best practices The biggest benefit is probably having a solid type system that's isomorphic. Large, complex responses and post bodies can be seamlessly passed around with full IDE support and refactoring. Beyond that, it's scala.
- redtuesday 11y agoYou could take a look at the stuff that li haoyi does: https://github.com/lihaoyi/autowire https://github.com/lihaoyi/autowire (because you mentioned rpc, but also his other stuff. His output is amazing).
- kyle_u 11y agoI built Boilerplay for that exact purpose - https://github.com/KyleU/boilerplay https://github.com/KyleU/boilerplay It uses the excellent sbt-scalajs to provide code shared between server and client, and a websocket controller that can receive those shared messages. It's tied to Play, sihouette, and postgres-async.
- ybx 11y agoThe best skeleton I've found (if anything, it does too much even) is Otto Chrons' SPA tutorial: https://github.com/ochrons/scalajs-spa-tutorial https://github.com/ochrons/scalajs-spa-tutorial That's what I've used for one of my projects and it's worked out pretty well!