One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
-- Api Effect Manager | |
effect module Api where { command = MyCmd } exposing (request, Response) | |
import Task exposing (..) | |
import Http | |
import Process | |
import Json.Decode as Json exposing ((:=)) | |
import Native.Api |
module TextThing exposing (..) | |
import Html.App as App | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Dom.Scroll | |
import Dom.Size | |
import Task |
module A exposing (..) | |
import Json.Decode as JD | |
import Json.Encode as JE | |
type alias User = | |
{ id : Int | |
, theme : Theme | |
} |
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
module Main exposing (main) | |
import Browser | |
import Browser.Navigation | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (preventDefaultOn) | |
import Json.Decode as Json | |
import Url exposing (Url) |
This document describes how to build a statically linked binary of Elm 0.19.1 for Linux x64 using docker. The binary is built using Alpine Linux in order to easily link it statically to musl libc. This is how the official Elm 0.19.1 Linux binary is built.
Elm is currently distributed using npm
. For Linux x64 (but this applies to any architecture), this requires to have a single x64 binary that works on all Linux x64 distributions. This is considerably easier to achieve by building a statically linked binary that will only depend on the Linux kernel ABI and System Call Interface but not on userpace libraries (see here for a compatibility survey of a dynamically built executable).
There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.