21

A source code companion to Elixir's official Mix/OTP guide

 4 years ago
source link: https://www.tuicool.com/articles/7RFBJjR
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Introduction

The source code for the official guide to build a complete Elixir application, with its own supervision tree, configuration, tests and more at: Elixir Docs

Modules

KV:

This repository translates the instructions from Chapter 1-6 of the official guide, You can browse any of the below commits to the position where that chapter ends:

  1. Chapter 1-3: Agent & GenServer Implementation
  2. Chapter 4: Supervisor & Applications Implementation
  3. Chapter 5: Dynamic Supervisors Implementation
  4. Chapter 6: ETS Implementation

Chapter 6-11 covers the new structure of the application that can be found at Elixir-Mix-Otp-Guide , the KV module changes following after each iteration of the chapter:

  1. Chapter 7: Managing Dependencies & Umbrella Project Structure
  2. Chapter 8: No Changes needed.
  3. Chapter 9: Writing Doctests, Patterns & with keyword
  4. Chapter 10: Distributed Tasks & Tags Implemented
  5. Chapter 11: Configurations & Releases Deployment

KV Umbrella:

This repository can be found at: Elixir-Mix-Otp-Guide , It came to existence from Chapter 7 where we go from an application -> project structure built of various applications (KV and KVServer in our case).

  1. Chapter 7: Managing Dependencies & Umbrella Project Structure
  2. Chapter 8: Tasks & gen_tcp implementation
  3. Chapter 9: Writing Doctests, Patterns & with keyword
  4. Chapter 10: Distributed Tasks & Tags Implemented
  5. Chapter 11: Configurations & Releases Deployment

Why?

While working throughout the guide - there were multiple positions where the ideolog seemed overwhelming resulting to various logical bugs because of shorthand syntax mismatch. There is no repository available to cross-check your results either to fix your bugs. Hence - I thought it would be nice to have this as a reference guide to how you need to implement your project.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK