In this chapter, we learned what single-page apps are and how to build them in Elm. We also learned how to Create, Read, Update, and Delete (CRUD) resources on a server from an Elm app. The built-in modules — Http, Json.Decode, and Json.Encode — provide everything we need for creating CRUD requests.

As we started adding more features to our app, we realized that we needed to split our code into smaller modules. We followed a simple yet highly scalable structure recommended by Evan Czaplicki — the creator of Elm — to organize our code.

We built separate pages for creating, updating, and retrieving resources from a server. The elm/browser and elm/url packages allowed us to build a robust navigation system for routing users to correct pages based on paths.

In the next chapter, we’ll learn how to interact with JavaScript from Elm using ports.

Back to top