SPA in Elm: Intro

What is Single Page Application and why Elm matters

T0ha
3∑: Elm, Erlang & Elixir
2 min readApr 9, 2018

--

Single page application is a global trend in web-app building. The main idea around it is that your app loads all its UI elements and entire logic once and then it just exchanges data with backend side in JSON, or XML, or what else format. It’s very convenient for mobile users with slow internet connection as it avoids them to load one piece of code more than once and saves their time. SPAs as well is good for making MVP of mobile apps. You can easily create Webview app for target platform and incapsulate your SPA into it, so you have a “native” mobile app quick and easy.

Problem definition

In this tutorial we’ll create a simple multiscreen single page application that will use Google Material design (MDL) as its UI. It then can be easily converted into mobile shopping app or news reader, but it’s out of the scope of this article. For the purpose of simplicity in this exact tutorial we’ll just use button click counters as main functionality. But you can place anything you like instead of it.

Table of Contents

  1. Intro (this article)
  2. Part 1: Basic application structure and single screen code
  3. Part 2: Screen Based Routing with Navigation
  4. Part 3: Adding reliable UI with Google Material Design (MDL)

PS. If you have a great startup idea and want to discuss it contact me on twitter, email or telegram. You are welcome to subscribe to our publication and newsletter.

--

--

T0ha
3∑: Elm, Erlang & Elixir

#Founder & #developer focused on #startups rocketing and #socialimpact.