From Objects to Functions: Build Your Software Faster and Safer with Functional Programming and Kotlin

Barbini, Uberto

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2023-10-17
  • 售價: $1,900
  • 貴賓價: 9.5$1,805
  • 語言: 英文
  • 頁數: 325
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1680508458
  • ISBN-13: 9781680508451
  • 相關分類: JVM 語言
  • 立即出貨 (庫存 < 3)

商品描述

Build applications quicker and with less effort using functional programming and Kotlin. Learn by building a complete application, from gathering requirements to delivering a microservice architecture following functional programming principles. Learn how to implement CQRS and EventSourcing in a functional way to map the domain into code better and to keep the cost of change low for the whole application life cycle.

If you're curious about functional programming or you are struggling with how to put it into practice, this guide will help you increase your productivity composing small functions together instead of creating fat objects.

Switching to the functional paradigm isn't easy when you're used to object-oriented programming. You need more than just lambdas and mapping over collections to get a declarative style and disentangle the state from the computations. Use transformations and compositions to help you write less code with better results. Boost your productivity and harness the power of functional programming by creating real-world applications rather than focusing on theoretical concepts.

Work through a series of short exercises to find and compose pure functions, and create data structures that work like algebra. Get rid of mutable state in your software to eliminate the main source of bugs. Apply CQRS and EventSourcing patterns to translate stakeholder requirements into functional design and then into code. See how Kotlin's easy-to-learn syntax and functional-friendly approach make it a great option for a pragmatic language that integrates well with existing Java code and libraries.

Leverage functional programming to build and deliver robust applications in less time and with fewer defects.

What You Need:

The code in this book is designed to allow you to build your application from scratch on Windows, Mac and Linux. You will need a recent IDE, we recommend IntelliJ Community Edition, and Kotlin 1.3.x or later.

商品描述(中文翻譯)

使用函數式編程和Kotlin,可以更快地構建應用程序,並且付出更少的努力。通過構建完整的應用程序,從收集需求到提供遵循函數式編程原則的微服務架構,來學習。學習如何以函數式的方式實現CQRS和EventSourcing,以更好地將領域映射到代碼中,並在整個應用程序生命周期中保持低變更成本。

如果你對函數式編程感到好奇,或者你在如何實踐它方面遇到困難,這本指南將幫助你通過組合小函數來提高生產力,而不是創建臃腫的對象。

當你習慣於面向對象編程時,轉向函數式範式並不容易。你需要的不僅僅是lambda和對集合的映射,還需要一種聲明式風格和將狀態與計算分離的方法。使用轉換和組合來幫助你寫出更少的代碼,並獲得更好的結果。通過創建實際應用程序而不是專注於理論概念,提高生產力並利用函數式編程的威力。

通過一系列短練習來查找和組合純函數,並創建像代數一樣工作的數據結構。消除軟件中的可變狀態,以消除錯誤的主要來源。應用CQRS和EventSourcing模式,將利益相關者的需求轉化為函數式設計,然後轉化為代碼。看看Kotlin易於學習的語法和友好的函數式方法如何使其成為一個與現有Java代碼和庫很好集成的實用語言選擇。

利用函數式編程在更短的時間內構建和交付強大的應用程序,並減少缺陷。

你需要什麼:

本書中的代碼設計允許您在Windows、Mac和Linux上從頭開始構建應用程序。您需要一個最新的IDE,我們推薦使用IntelliJ Community Edition,以及Kotlin 1.3.x或更高版本。

作者簡介

Uberto Barbini is a very passionate programmer, starting when he created his first video game on the ZxSpectrum many years ago. He worked in all kinds of organizations, from the very big to the very small, coaching and helping teams build software in an efficient and sustainable way to create value for the company. He has used a range of functional languages (Haskell, Clojure, Scala), and he is currently in love with the simplicity of Kotlin and its productivity. He is a regular speaker at conferences around the world on Kotlin and Java, and he enjoys teaching courses and mentoring young programmers.

作者簡介(中文翻譯)

Uberto Barbini是一位非常熱情的程式設計師,從多年前在ZxSpectrum上創建他的第一個電子遊戲開始,他就開始了他的程式設計之旅。他曾在各種組織中工作,從大型組織到小型組織,指導和幫助團隊以高效和可持續的方式建立軟體,為公司創造價值。他使用過多種函數式語言(如Haskell、Clojure、Scala),目前他非常喜歡Kotlin的簡潔性和高效性。他是一位在世界各地的會議上關於Kotlin和Java的常客演講者,並且喜歡教授課程和指導年輕的程式設計師。