Elm Web Development

Want to download or buy Elm Web Development?

Click to download from Amazon →

Explore why ELM is a great alternative to using pure JavaScript and other JS-based solutions by building complete apps and websites. Key Features Develop your own scalable and modular web applications with Elm to make web development less messy compared to your JavaScript apps Create personal portfolio website, a weather application, and a unit conversion website, and integrate your Elm apps with Rails 5 Boost the performance of your application with no runtime exceptions and JavaScript interoperability Book Description Web development with JavaScript usually involves dealing with performance and maintenance issues. JavaScript fatigue makes it difficult for many developers to keep up with the increasing complexity posed by the multitude of JavaScript frameworks with changing versions, and the need to use different tools such as task runners, module bundlers, compilers, testing suites, linting and debuggers. Elm is an easy-to-learn, functional programming language that simplifies web development by eliminating the complexity associated with using JavaScript for web development. Elm is a statically typed language and thus makes a front end web developer’s life easier by preventing run-time errors. You will begin by seeing the bigger picture of where Elm fits into the web development world and learning the basics of Elm programming. Firstly, you will get a taste for web development with Elm by developing a simple fizz-buzz app. Next you will get hands-on with advanced Elm concepts as you develop your own personal blogging website, a unit conversion app and a weather app with Elm. Finally, you will also learn how to integrate Elm with a Rails 5 app with the help of Webpack. By the end of the book you will have learned Elm programming, and its applications, and will appreciate how Elm simplifies web development for you. What you will learn Programming with the Elm language, its syntax and core concepts Using Elm for front end web development projects Developing complete websites with Elm Decoding JSON into Elm Integrating Elm with the standard front end web development technologies Integrating Elm with back-end frameworks Testing your applications in Elm Who this book is for This book is for frontend web developers who want to learn a simpler way of developing their applications. A knowledge of the basics of CSS and Bootstrap is required.

Table of contents

Title Page
Copyright and Credits
Elm Web Development
www.packtpub.com
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Why learn Elm?
The goal of this book
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Why is This a Great Time to Learn Elm?
What is Elm?
Why is it worth learning Elm?
Blazing-fast virtual DOM
Friendly compile-time errors
Zero runtime exceptions
Constraints as guarantees
Piped syntax
Easy refactoring
Helpful type system
Increased productivity
Getting started with writing Elm code
Getting started fast with Ellie-app
Adding type annotations
Getting started fast with create-elm-app
Getting started with Elm on Windows 10
Installing apm (Atom Package Manager)
Summary
Building Your First Elm App
Let’s build an app
Immutable data structures
The Elm architecture
The Model
The View
The Message
The Update
Unidirectional data flows
Our app requirements
Building the Fruit Counter app
Exposing everything we need
The Model
The View
The Message
The Update
Adding the beginnerProgram function
Views, buttons, and events
Constraining the Decrement message
Values, expressions, data structures, and types in Elm
Primitive types in Elm
Char and String types
The number type
Booleans
Data structures: lists, tuples, records, sets, arrays, and dictionaries
Lists
Tuples
Records
Sets
Arrays
Dictionaries
Functions, if expressions, and types
Revisiting Elm messages
Functions, pattern matching, and case expressions
Improving the Fruit Counter app
Building a simple FizzBuzz app in Elm
Summary
Creating Your Personal Portfolio with Elm
Creating our portfolio with elm-make-app
Building a static single-page portfolio
HTML for Elm
Function signatures for HTML elements
Function signature for text function
Adding our view function
Calling the view function from another file
Adding some style
Splitting the view into multiple files
Completing our Writer’s portfolio
Rendering sections of our page using case expressions
Improving our messages
Adding the type alias of Model
Working with List.map and List.filter
Revisiting the FizzBuzz app
Implementing FizzBuzz with List.map
Summary
Preparing a Unit Conversion Website in Elm
What are we going to build?
Building our Unit Conversion app
Updating the init function
Type annotations and type aliases
Updating the view and update functions
Adding the conversion logic
Improving the input function
The stumbling block
Dealing with the Result.Result error
Using the Result type to fix our app
Calculating the conversion
Refactoring our app using a let expression
Making our app look nicer
Adding Bootstrap styles
Revisiting the FizzBuzz app
Giving our FizzBuzz app some logic
Summary
Completing the Unit Conversion Website in Elm
Improving the Unit Converter app
Separating UnitConverter into a different module
Adding type alias Model, initModel, and Main
Updating the Main.view function
Understanding Html.map
Updating the Main.update function
Learning from compiler error messages
A Bootstrap-based HTML layout for our app
Converting an HTML layout into an Elm view
Adding the improved view to our functioning app
Summary
Exploring Elm in Greater Detail
Destructuring values in Elm
Destructuring tuples in Elm using let-in expressions
Destructuring tuples in Elm using case-of expressions
Building a FizzBuzz app using tuple destructuring inside of a case-of expression
Destructuring nested tuples using let-in expressions
Destructuring records in Elm using let-in expressions
Destructuring records on the fly
Dealing with randomness in Elm
Commands in Elm
Subscriptions in Elm
Improving the Elm architecture by adding effects
Understanding partial application
Summary
Making a Weather App in Elm
Obtaining the weather data from a third-party API
What are we going to build?
Building our weather app
Installing the HTTP package
Adding all the imports
Conceptualizing the model
Setting up Msg union type
Result and Maybe
Working with Result
Working with Maybe
Result and Maybe with Defaults
Updating the update function
Decoders and encoders
Decoding primitive values
Decoding a JSON string returned from the API
Decoding nested objects
Adding getTemperature and decodeTemperatureInfo
Updating the view
Summary
Adding More Features to the Weather App
Importing Material and Round modules
Adding elm-mdl to our Model
Updating the init function
Updating the Msg union type and the update function
Updating the view function
Understanding the Textfield function
Understanding the Button function
Understanding the Card function
Understanding the use of Card.view
Rendering the Card.title content block
Understanding the Card.actions code
Adding color schemes
Updating decodeTemperatureInfo
Summary
Testing in Elm
Introduction to Elm testing
Understanding how testing works in Elm
The describe function 
The test and Expect functions
Writing unit tests in Elm
Using let-in expressions in our tests
Decoding JSON in our tests
Building custom expectations while decoding JSON
Writing fuzz tests in Elm
Working with more than one fuzzer
Summary
Integrating Elm with Rails
Setting up a basic Rails 5.1.5 app using Codeanywhere
Installing Ruby 2.5.0 and Rails 5.1.5 on Codeanywhere
Creating a brand new Rails project
Integrating Elm with Rails 5.1.5
Adding our Elm weather app to our Rails app
Summary
Visit elmcasts.com
Other Books You May Enjoy
Leave a review – let other readers know what you think


Is Elm Web Development Free to Download?

No, i'm afraid not. Every single book that we feature on Allbooks.co is a paid-for, premium publication that you have to part your hard earned cash for. There is no point trying to find a free download of Elm Web Development so please don't waste your time looking. Head over to Amazon to buy a physical or digital copy of Elm Web Development. You can also buy a subscription from Perlego and gain access to over 500k textbooks and educational resources.

It is highly unlikely that you'll be able to find Elm Web Development for free. There's a lot of websites that will say "Free Download" but these are just attempts to get you to click on a link which will either take you to an ad landing page or you risk getting viruses on your computer. In the rare occasion that you do find a free download for Elm Web Development remember that it's illegal to download a book if you didn't pay for it!

If you really want Elm Web Development and you want to truly own it the legal and safe way, then click here to visit the download and purchase page on Amazon.com. The author and publisher deserves to be paid for their work, as they have put in the hours and the creativity to produce such an amazing publication / book.