Description
In this course, you will learn :
- Strong understanding of the Open Telecom Platform (OTP) design environment
- Working knowledge of the various layers of Elixir built using OTP
- Deep familiarity with Elixir’s different data types, their pros, cons, and applications
- Hands-on experience with best practices for coding in Elixir
- Hands-on experience leveraging OTP GenServers in your application design
- Hands-on experience testing Elixir projects with a variety of testing techniques
Syllabus :
1. Building Our Project in Layers
- Who Should Take this Course and Why?
- Introduction to Building Projects
- Reimagining Design Choices
- Choosing Our Layers
- Thinking Before We Start
- Beginning with the Right Datatypes
- Creating a Mix project
- Building Our Functional Core
- Establishing Our Boundaries
- OTP, State, and the Functional Core
- Testing Our Code
- Planning Our LifecycleInvoking Our Workers
2. Knowing Our Elixir Datatypes
- Introduction to Datatypes
- Primitive TypesLists
- Streams
- Maps and Structs
- Uses of Maps
- Map Traps
- Strings
- String Representation in Elixir
- Tuples
- Functions as Data
- When to Leave Elixir
3. Starting With the Right Data Layer
- Introduction to the Data Layer
- Access Patterns Shape Data Structures
- A Different Approach
- Immutability Drives Everything
- Functional Data Structures
- Creating Our Mastery Project
- Identifying the Data of Our Project
- Identifying the Data of Our Project—Continued
4. Building Our Functional Core
- Introduction to Our Functional Core
- Organize Core Functions by Purpose
- Commencing Our Quizzes
- Functions are Data
- Naming Concepts with Functions
- Composing a Quiz from Functions
- Building Single Purpose Functions
- Building at a Single Level of Abstraction
- Moving Our Tokens Through Transformations
- Keeping the Left Margin SkinnyTrying Out the Core
5. Testing Our Core
- Introduction to Writing Tests
- Simplifying Tests with Common Setup Functions
- Improving the Ex
- Unit Infrastructure
- Providing Test Data with Fixtures
- Building Our Quizzes
- Using Fixture Functions Directly
- Prime Tests with Named Setups
- Applying Named Setup Functions to Our Tests
- Making Tests Repeatable
- Making Tests Repeatable—Continued
- Composing Within TestsTesting Our Quiz
- Taking Tests Beyond the Elixir Base
6. Isolating Process Machinery in a Boundary
- Introduction to the Boundary Layer
- Maintaining Composition Through UncertaintyTreating Errors as Data
- Reporting Successes and Errors
- Using with to Compose Uncertain StructuresBuilding Our Optional Server
- Blueprint of Our Boundary Layer
- Implementing the Quiz
- Manager with Processes
- Adding More Functionality to the Quiz
- ManagerTrying Out the Quiz Manager
- Laying Grounds for Quiz
- Session ImplementationImplementing Quiz
- SessionTest Driving the Quiz Session
- Wrapping the Server in an API
- Validating Our Quizzes
- Validating Our Templates
- Building the API LayerTest Driving the API
- Call over Cast
- Configuring Options
- Extending our APIs SafelySummary: Isolating Process Machinery in a BoundaryQuiz: Boundaries and GenServers
7. Customizing Our Lifecycle
- Introduction to the Lifecycle Layer
- Understanding the Lifecycle Building Blocks
- Elixir Functions to Manage Processes
- Starting Processes with Links
- Configuring Applications to Start Supervisors
- Creating a start_link
- Configuring the Application
- Additional Options to Manipulate Supervisors
- Starting Per-User Processes with a Dynamic Supervisor
- Adding a Start Link
- Using Names to Find Services
- Adding the Registry and Dynamic Supervisor to application.ex
- Establishing Supervision StrategiesObserving It
- Running with Multiple Users
8. Invoking Our Workers
- Introduction to the Worker Layer
- Knowing Our Motivations
- Leveraging Workers in Dependencies
- Making Serial Code Concurrent with Tasks
- Building Pools of Common Resources with Poolboy
- Adding a Proctor to Run Timed Quizzes
- Writing the Proctor Boundary ServerLaying Grounds for the Proctor Boundary Server
- Completing the Implementation of the Proctor Boundary Server
- Integrating the Proctor into the Boundary — QuizManager
- Putting the Proctor to WorkSummary: Invoking Our Workers
9. Assembling Our Components
- Introducing Persistence
- Adding Persistence as a Boundary Service
- Managing Persistence with Callbacks
- Building a Poncho Project
- Persisting the Responses
- Establishing an API
- Building Our Postgres Table
- Integrating MasteryPersistence into Mastery
- Integrating a Function to Persist Records
- Integrating Our OTP Dependencies into Phoenix
- Integrating Our OTP Dependencies into Phoenix—Continued
- Organizing Code for OTP Abstractions
- Adding Layers to Phoenix Channels
- Adding Layers to LiveView
- Building Scenic Projects with Layers
10. Testing the Boundary
- Introduction to Testing Our Boundary
- Tests Call the API as a User Would—Setting Up
- Tests Call the API as a User Would—Helper Functions
- Running the Test for Our API
- Testing Poncho Projects Directly
- Isolating the Proctor’s Boundary Concerns
- Modifying the Boundary of the Mastery Project
- Adding Notifications to Mastery and the Boundary
- Working with the New Notifications