Elm in Action
Richard Feldman
  • MEAP began July 2016
  • Publication in Summer 2017 (estimated)
  • ISBN 9781617294044
  • 375 pages (estimated)
  • printed in black & white

Elm is more than just a cutting-edge programming language, it’s a chance to upgrade the way you think about building web applications. Once you get comfortable with Elm’s refreshingly different approach to application development, you’ll be working with a clean syntax, dependable libraries, and a delightful compiler that essentially eliminates runtime exceptions. Elm compiles to JavaScript, so your code runs in any browser, and Elm’s best-in-class rendering speed will knock your socks off. Let’s get started!

Elm in Action teaches you how to build well-designed, highly performant web applications using the Elm language. As you read, you’ll follow an application called Photo Groove that will show you how to structure your application’s domain and behavior, how to maintain a pleasantly modular architecture, and how to deliver a quality product using the Elm language. Along the way, you’ll learn how to interact smoothly with browser functionality, servers, and JavaScript libraries, as well and picking up a few tricks for building fluid, intuitive user experiences. If you’re new to functional programming, you’ll also gain a practical understanding of techniques that will make you a better developer no matter what you’re writing!

Table of Contents detailed table of contents

Part 1: Getting Started

1. Welcome to Elm

1.1. How Elm Fits In

1.2. Expressions

1.2.1. Using elm-repl

1.2.2. Building Expressions

1.2.3. Booleans and Conditionals

1.3. Functions

1.3.1. Defining Functions

1.3.2. Importing Functions

1.3.3. Creating scope with let-expressions

1.3.4. Anonymous Functions

1.3.5. Operators

1.4. Collections

1.4.1. Lists

1.4.2. Records

1.4.3. Tuples

1.5. Summary

2. Your First Elm Application

2.1. Rendering a Page

2.1.1. Describing a page using the Html Module

2.1.2. Building a Project

2.2. Handling User Input with the Elm Architecture

2.2.1. Representing Application State with a Model

2.2.2. Handling Events with Messages and Updates

2.3. Summary

3. Compiler as Assistant

3.1. Documenting Guarantees with Type Annotations

3.1.1. Adding Optional Type Annotations

3.1.2. Annotating Functions with Type Variables

3.1.3. Reusing Annotations with Type Aliases

3.1.4. Annotating Longer Functions

3.2. Case-expressions and Union Types

3.2.1. Using case-expressions

3.2.2. Enumerating possibilities with Union Types

3.2.3. Holding Data in Union Types

3.2.4. Representing Flexible Messages with Union Types

3.3. Generating Random Numbers with Commands

3.3.1. Describing Random Values with Random.Generator

3.3.2. Introducing Commands to the Elm Architecture

3.3.3. Generating Random Values with Random.generate

3.4. Summary

Part 2: Production-Grade Elm

4. Talking to Servers

4.1. Preparing for Server-Loaded Data

4.1.1. Modeling Incremental Initialization

4.1.2. Resolving Data Dependencies

4.2. Fetching Data from a Server

4.2.1. Describing HTTP Requests

4.2.2. Handling HTTP Responses

4.2.3. Sending HTTP Requests

4.2.4. Gracefully Handling Errors

4.3. Decoding JSON

4.3.1. Decoding JSON Strings into Results

4.3.2. Decoding JSON Collections

4.3.3. Decoding JSON HTTP Responses

4.4. Summary

5. Talking to JavaScript

6. Testing

7. Tools

Part 3: Building Bigger

8. Single-Page Applications

9. Scaling Elm Code

10. Performance Optimization

Appendixes

Appendix A: Getting Set Up

What's inside

  • Getting started with the Elm language
  • Scalable design for production web applications
  • Single-page applications in Elm
  • Testing your applications

About the reader

Written for readers comfortable with web application development in JavaScript. No experience with Elm or functional programming required.

About the author

Richard Feldman is a programmer and entrepreneur who loves to push the limits of browser-based programming. He’s a front-end engineer at NoRedInk and a well-known member of the Elm community.


Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
  • MEAP combo $49.99 pBook + eBook
  • MEAP eBook $39.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks