This podcast is very interesting and well worth listening to if you are interested in web application architecture – even if you don’t ever intend to use Elm, because it gives you a better understanding of fundamental problems and possible solutions.
In this discussion, Mario Rogic provides some thoughts on semantic boundaries and removing glue code. In the end, he has distilled web applications into 6 basic concepts:
- Stuff that happens for the client (in the browser)
- Stuff that happens in the server (like scheduled job)
- Data from client to backend
- Data from backend to client
- Frontend knows what it knows
- Backend knows what it knows
The same programming model that is used in the frontend (model, messages, view, etc) is also used in the backend. There is no database – just your model in the backend. Elm types translate seamlessly between the backend and frontend. You can do HTTP requests in the backend (I assume use the standard Elm API) which allows you to interact with other systems.
My initial experiments with the platform/tool are positive. You can develop your app locally with the
lamdera tool, and then deploy to Lamdera’s hosted service. Deployment is very simple – just a Git push.
Mario made a comment that really resonated with me:
when you actually use it (Elm) and feel the ergonomics, its not just the fact that Elm has that type safety, it’s instant, it’s fast, one of the banes of having to build a platform is you never get to use the platform, I feel 90% of my time is writing Haskell in the Elm compiler – that’s where most of Lamdera’s stuff is – it’s Haskell. And, it’s not nice – I love Haskell – it has so many cool things and was my gateway drug into FP, but man – waiting 30-40 seconds just to type things is like – yeah – it’s so understated how Evan’s focus on making that performance and that speed fast – it just changes – fast type inference and slow type inference may as well be two completely different things in my eyes. The way that you build things and the way you approach stuff when you have it be that quick is completely different, and the way I approach full stack apps with Lamdera is just completely different – the confidence you have to charge into wide sweeping changes …
I feel the same way. Programming in Elm and Go is a much more than just the language paradigm – both compilers are fast and efficient – the tooling is excellent. It is a completely different experience.
Again, well worth a listen.