Elixir Cookbook

Paulo A Pereira

  • 出版商: Packt Publishing
  • 出版日期: 2015-02-23
  • 售價: $1,930
  • 貴賓價: 9.5$1,834
  • 語言: 英文
  • 頁數: 270
  • 裝訂: Paperback
  • ISBN: 1784397512
  • ISBN-13: 9781784397517
  • 相關分類: Functional-programming
  • 海外代購書籍(需單獨結帳)

商品描述

Unleash the full power of programming in Elixir with over 60 incredibly effective recipes

About This Book

  • Use Elixir to solve common problems associated with scalability, concurrency, fault tolerance, and high availability
  • From command line to external API interaction, experience the joy of using this new language
  • Explore the concepts of data structures, immutability, and data transformation with the help of practical recipes

Who This Book Is For

This book is intended for users with some knowledge of the Elixir language syntax and basic data types/structures. Although this is a cookbook and no sequential reading is required, the book's structure will allow less advanced users who follow it to be gradually exposed to some of Elixir's features and concepts specific to functional programming. To get the most out of this book, you need to be well versed with Erlang.

What You Will Learn

  • Utilize Erlang code seamlessly from Elixir, leveraging a huge amount of battle-tested libraries
  • Use the Mix tool to generate applications and manage dependencies
  • Create modules and functions and use them from different machines, taking advantage of Elixir's integrated distribution mechanism
  • Implement OTP behaviors in Elixir
  • Package and deploy applications on running systems
  • Work with the Phoenix framework to generate a basic web application
  • Interact with external programs and APIs
  • Serve static files and implement websockets

In Detail

This book is a set of recipes grouped by topic that acts as a good reference to get ideas from or to quickly search for a solution to a problem. You will begin by launching an IEx session and using it to test some ideas. Next, you will perform various operations like loading and compiling modules, inspecting your system, generating a supervised app, and so on. Furthermore, you will be introduced to immutability, working with data structures, performing pattern matching, and using stream modules to generate infinite data sequences. You will learn about everything from joining strings to determining the word frequency in text. With respect to modules and functions, you will also discover how to load code from other modules and use guards and pattern matching in functions.

商品描述(中文翻譯)

發揮 Elixir 程式設計的全部威力,透過超過 60 個極為有效的食譜

關於本書
- 使用 Elixir 解決與可擴展性、並行性、容錯性和高可用性相關的常見問題
- 從命令列到外部 API 互動,體驗使用這種新語言的樂趣
- 透過實用的食譜探索資料結構、不可變性和資料轉換的概念

本書適合對 Elixir 語法和基本資料類型/結構有一定了解的使用者。雖然這是一本食譜,不需要按順序閱讀,但本書的結構將使初學者逐漸接觸到一些特定於函數式編程的 Elixir 功能和概念。要充分利用本書,您需要對 Erlang 有很好的了解。

您將學到什麼
- 從 Elixir 無縫使用 Erlang 代碼,利用大量經過實戰驗證的庫
- 使用 Mix 工具生成應用程序並管理依賴關係
- 創建模塊和函數,並從不同的機器上使用它們,利用 Elixir 的集成分佈機制
- 在 Elixir 中實現 OTP 行為
- 在運行中的系統上打包和部署應用程序
- 使用 Phoenix 框架生成基本的 Web 應用程序
- 與外部程序和 API 互動
- 提供靜態文件並實現 Websockets

詳細內容
本書是按主題分組的食譜集,可作為從中獲取想法或快速尋找解決問題的參考。您將首先啟動 IEx 會話並使用它來測試一些想法。接下來,您將執行各種操作,如加載和編譯模塊、檢查系統、生成受監管的應用程序等等。此外,您還將介紹不可變性、使用資料結構、執行模式匹配以及使用流模塊生成無窮數據序列。您將學習從連接字符串到確定文本中單詞頻率的所有內容。關於模塊和函數,您還將發現如何從其他模塊加載代碼,以及在函數中使用守衛和模式匹配。