Explore Blog

Auckland Functional Programming MeetUp - Elm

Movio regularly hosts the Auckland Functional Programming MeetUpsand in March we covered Elm. Below are some summaries and videos of our presentations.

Randall Britten kicked off with an Intro on Elm - a strongly-typed pure functional programming (FP) language that can be used to create rich interactive in-browser apps.  The language is designed to make it nearly impossible to have runtime errors.  The Elm compiler generates efficient JavaScript, with a rich set of libraries available.  The presentation or view is constructed using the Elm presentation domain specific language (DSL) that makes advanced geometry and HTML layout as easy as child's play, including generating scalable vector graphics (SVG).  As an alternative, low-level HTML can be generated, and the virtual DOM approach made possible by Elm’s purity (referential transparency and only immutable values) makes this highly performant.

The Elm community has adopted a standard architecture for designing interactive applications based on a clear separation of the view, the model and the actions that represent the dynamic aspects of the application.  Randall showed how Elm’s pure functional nature enables a high degree of code reuse due to the ability to reliably compose components.  This is an era ahead of the state of traditional languages which rely on side effects which thwart efforts at reliable compostability.

Elm Tooling and time travelling

Up next Wasiq Kashkari presented Awesome Elm! Time travelling debugging and side effects.

Elm programs are composed of pure functions, this means we can create powerful debugging and development tools. In this talk we discuss 2 such tools: 1. Time Travelling Debugger, 2. Hot swapper, and how they can aid you in your debugging process. We also discuss the impact of side effects and the limitations that they place on such tools.

Interfacing Elm with legacy JavaScript applications

Raghu Kasturi presented Elm in the real world. Introducing Elm into your front end codes. Elm can be introduced into an existing front-end codebase via embeds in HTML on either a component or page level, or via workers that can communicate with JavaScript through ports. The talk focused on demonstrating how easy it is to move existing business logic to Elm while keeping content and presentation layers in HTML/CSS/JS, by writing a simple counter using Redux and then re-implementing it in Elm. In closing, Raghu discussed the practicality of using Elm in an existing codebase, citing lack of adequate interop tooling and the small size of the Elm community as reasons why Elm may not be production ready at the moment in cases where legacy integration is a significant requirement.

Comments

cancel replyPlease wait . . .Your comment has been posted!
Your comment has been posted, it will be visible for other users after approval.

Subscribe to our newsletter

Keep me
in the loop

Our monthly email update with marketing tips, audience insights and Movio news.