Programming Elm: Build Safe, Sane, and Maintainable Front-End Applications

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Elm brings the safety and stability of functional programing to front-end development, making it one of the most popular new languages. Elm's functional nature and static typing means that run-time errors are nearly impossible, and it compiles to JavaScript for easy web deployment. This book helps you take advantage of this new language in your web site development. Learn how the Elm Architecture will help you create fast applications. Discover how to integrate Elm with JavaScript so you can update legacy applications. See how Elm tooling makes deployment quicker and easier. Functional programming offers safer applications with decreased runtime errors, but functional solutions that are type safe and easy to use have been hard to find, until the Elm language. Elm has the benefits of functional languages while compiling to JavaScript. This book provides a complete tutorial for the Elm language, starting with a simple static application that introduces Elm syntax, modules, and the virtual DOM, to exploring how to create a UI using functions. See how Elm handles the issues of state in functional languages. You'll continue to build up larger applications involving HTTP requests for communication. Integrate your Elm applications with JavaScript so you can update legacy applications or take advantage of JavaScript resources. Elm also provides built-in tooling to alleviate the tooling creep that's so common in JavaScript. This book covers Elm's deployment and testing tools that ease development confusion. Dive into advanced concepts including creating single-page applications, and creating performance improvements. Elm expert Jeremy Fairbank brings his years of web development experience to teaching how to use Elm for front-end development. Your web UIs will be faster, safer, and easier to develop with Elm and this tutorial. What You Need: You will need the latest version of Elm, 0.19, along with a browser to run the examples in this book.

Author(s): Jeremy Fairbank
Edition: 1
Publisher: Pragmatic Bookshelf
Year: 2019

Language: English
Commentary: True PDF
Pages: 310
City: Raleigh, NC
Tags: Programming; Debugging; Web Applications; Deployment; Refactoring; WebSockets; Testing; Elm; Stateful Applications; Single-Page Applications

Cover
Table of Contents
Preface
Why Elm?
Who Is This Book For?
What’s In This Book?
How to Read This Book
Online Resources
Acknowledgements
1. Get Started with Elm
Get Started with Functions
Use Static Types
Build a Static App
What You Learned
2. Create Stateful Elm Applications
Apply the Elm Architecture
Create the View
Handle State Changes
The Elm Architecture Life Cycle
What You Learned
3. Refactor and Enhance Elm Applications
Refactor with Good Practices
Comment on Photos
What You Learned
4. Communicate with Servers
Safely Decode JSON
Fetch from HTTP APIs
What You Learned
5. Go Real-Time with WebSockets
Load Multiple Photos
Receive Photos from WebSockets
What You Learned
6. Build Larger Applications
Organize the View
Simplify Messages
Use Nested State
Use Extensible Records
Remove View Duplication
Prevent Invalid States
What You Learned
7. Develop, Debug, and Deploy with Powerful Tooling
Debug Code with the Debug Module
Rapidly Develop and Deploy Elm Applications
What You Learned
8. Integrate with JavaScript
Embed an Elm Application
Upload Images with Ports
Display Uploaded Images
What You Learned
9. Test Elm Applications
Test-Driven Development in Elm
What to Expect When You’re Expecting
Fuzz Your Tests
Test an Application
What You Learned
10. Build Single-Page Applications
Build a Skeleton SPA
Route to a Component Page
Welcome Back Picshare
Handle Dynamic Routes
What You Learned
11. Write Fast Applications
Benchmark Code
Traverse Large Lists
Get Lazy
Build Lazy Applications
What You Learned
A1. Install Elm
All Roads Lead to Node
Install the Elm Compiler
Install Development Tools
A2. Run the Local Server
Install and Run the Server
A3. Elm Package Versions
Install an Older Package Version
Bibliography
Index