Elm in Action

Book description

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!

About the Technology
Simply put, the Elm programming language transforms the way you think about frontend web development.

Elm’s legendary compiler is an incredible assistant, giving you the precise and user-friendly support you need to work efficiently. Elm applications have small bundle sizes that run faster than JavaScript frameworks and are famously easy to maintain as they grow. The catch? Elm isn’t JavaScript, so you’ll have some new skills to learn.

About the Book
Elm in Action teaches you the Elm language along with a new approach to coding frontend applications. Chapter by chapter, you’ll create a full-featured photo-browsing app, learning as you go about Elm’s modular architecture, Elm testing, and how to work seamlessly with your favorite JavaScript libraries. You’ll especially appreciate author and Elm core team member Richard Feldman’s unique insights, based on his thousands of hours writing production code in Elm. When you’re done, you’ll have a toolbox of new development skills and a stunning web app for your portfolio.

What's Inside
  • Scalable design for production web applications
  • Single-page applications in Elm
  • Data modeling in Elm
  • Accessing JavaScript from Elm


About the Reader
For web developers with no prior experience in Elm or functional programming.

About the Author
Richard Feldman is a software engineer at NoRedInk and a well-known member of the Elm community.

Quotes
This is the definitive book to learn Elm!
- Ubaldo Pescatore, Generali

A solid, evenly paced introduction to the Elm language as well as the fundamentals of functional programming.
- Daniel Carl, Oatey

If you are looking to learn Elm, this book is a must-have. Richard is a master instructor and the best ambassador for the Elm ecosystem.
- Tahir Awan, Saudi Aramco

A practical introduction to Elm grounded in a thorough and well-developed elaboration of the Elm Architecture.
- Jake Romer, Bike Index

Table of contents

  1. Copyright
  2. Brief Table of Contents
  3. Table of Contents
  4. Preface
  5. Acknowledgments
  6. About this book
  7. About the author
  8. About the cover illustration
  9. Part 1. Getting started
    1. Chapter 1. Welcome to Elm
      1. 1.1. How Elm fits in
      2. 1.2. Expressions
      3. 1.3. Functions
      4. 1.4. Collections
      5. Summary
    2. Chapter 2. Your first Elm application
      1. 2.1. Rendering a page
      2. 2.2. Handling user input with The Elm Architecture
      3. Summary
    3. Chapter 3. Compiler as assistant
      1. 3.1. Documenting guarantees with type annotations
      2. 3.2. Using case-expressions and custom types
      3. 3.3. Generating random numbers with commands
      4. Summary
  10. Part 2. Production-grade Elm
    1. Chapter 4. Talking to servers
      1. 4.1. Preparing for server-loaded data
      2. 4.2. Fetching data from a server
      3. 4.3. Decoding JSON
      4. Summary
    2. Chapter 5. Talking to JavaScript
      1. 5.1. Using custom elements
      2. 5.2. Sending data to JavaScript
      3. 5.3. Receiving data from JavaScript
      4. Summary
    3. Chapter 6. Testing
      1. 6.1. Writing unit tests
      2. 6.2. Writing fuzz tests
      3. 6.3. Testing views
      4. Summary
  11. Part 3. Building bigger
    1. Chapter 7. Data modeling
      1. 7.1. Storing values by keys in dictionaries
      2. 7.2. Modeling trees by using recursive custom types
      3. 7.3. Decoding graphs and trees
      4. Summary
    2. Chapter 8. Single-page applications
      1. 8.1. Framing the page
      2. 8.2. Routing
      3. 8.3. Delegating pages
      4. Summary
  12. Appendix A. Getting set up
    1. A.1. Installing Node.js and NPM
    2. A.2. Installing command-line tools
    3. A.3. Obtaining the Elm in Action repository
    4. A.4. Installing recommended optional tools
  13. Appendix B. Installing Elm packages
    1. B.1. Direct and indirect dependencies
    2. B.2. Semantic versioning in packages
    3. B.3. Example: Installing elm/url
  14. Appendix C. Html.Lazy’s change check
    1. C.1. lazy’s check for strings and numbers
    2. C.2. lazy’s check for everything else
    3. C.3. When memory locations stay the same
  15. Index
  16. List of Figures
  17. List of Tables
  18. List of Listings

Product information

  • Title: Elm in Action
  • Author(s): Richard Feldman
  • Release date: April 2020
  • Publisher(s): Manning Publications
  • ISBN: 9781617294044