Название: From Objects to Functions: Build Your Software Faster and Safer With Functional Programming and Kotlin Автор: Uberto Barbini Издательство: Pragmatic Bookshelf Год: September 2023 (Version: P1.0) Страниц: 674 Язык: английский Формат: epub (true), mobi Размер: 11.3 MB
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.
So why choose Kotlin out of all possible mixed-paradigm languages? Well, nothing is perfect in this world, but Kotlin is kind of a “Goldilocks language” that allows us to get most of the benefits of both functional and object-oriented programming. It has a smoother learning curve than Scala or Clojure and an easier integration with Java libraries. In addition, its type system is more functional friendly than Java’s, and a few other nice features make it quite productive. Finally, at least for me, Kotlin is a really fun language to work with. It’s a language that naturally helps you where you need assistance and gets out of the way when you just want to write things down.
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.
Скачать From Objects to Functions: Build Your Software Faster and Safer With Functional Programming and Kotlin
Внимание
Уважаемый посетитель, Вы зашли на сайт как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.