Pure functional HTTP APIs in Scala
Pure functional HTTP APIs in Scala
Free!
Minimum price
$9.99
Suggested price
Pure functional HTTP APIs in Scala

This book is 50% complete

Last updated on 2019-08-20

About the Book

This book is intended for the intermediate Scala programmer who is interested in functional programming and works mainly on the web service backend side. Ideally she has experience with libraries like Akka HTTP and Slick which are in heavy use in that area.

However maybe you have wondered if we can't do better even though aforementioned projects are battle tested and proven.

The answer to this can be found in this book which is intended to be read from cover to cover in the given order. Within the book the following libraries will be used: Cats, Cats Effect, http4s, Doobie, Refined, fs2 and probably others. ;-)

Code and book source can be found in the following repository: https://github.com/jan0sch/pfhais

About the Author

Jens Grassel
Jens Grassel

Jens Grassel is the CTO and founder of Wegtam, a company specialised in data integration and search technology. He is programming in a plethora of languages and engineering software systems since the fall of the Wall. For some years now his focus has shifted to functional programming languages.

He has contributed to numerous free software projects and likes to apply free and open source technologies wherever applicable.

Table of Contents

  • Foreword
    • About this book
    • Copyleft Notice
    • Thanks
  • Our use case
    • Service specification
      • Data model
      • Database
      • HTTP API
  • The state of the art
    • Problems
  • Maybe there is another way
    • Impure implementation
      • Models
      • Database layer
      • Akka-HTTP routes
    • Pure implementation
      • Pure configuration handling
      • Models
      • Database layer
      • http4s routes
    • What about tests?
      • Testing the impure service
      • Testing the pure service
    • Adding benchmarks
    • Comparison
  • Notes

Causes Supported

Electronic Frontier Foundation

Defending your civil liberties in a digital world.
https://www.eff.org/

Based in San Francisco, EFF is a donor-supported membership organization working to protect fundamental rights regardless of technology.

From the Internet to the iPod, technologies are transforming our society and empowering us as speakers, citizens, creators, and consumers. When our freedoms in the networked world come under attack, the Electronic Frontier Foundation (EFF) is the first line of defense. EFF broke new ground when it was founded in 1990—well before the Internet was on most people's radar—and continues to confront cutting-edge issues defending free speech, privacy, innovation, and consumer rights today. From the beginning, EFF has championed the public interest in every critical battle affecting digital rights.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub