Description
In this course, you will :
- Think with a Functional Programming mindset.
- Use Phoenix to build compelling and FAST web apps.
- Understand common Elixir syntax and design patterns.
- Master the OAuth flow with Phoenix for authentication.
- Learn the hidden secrets of Phoenix.
Syllabus :
1. An Elixir Warmup
- Generating a Project
- Elixir Modules and Methods
- Method Arguments
- The Enum Module
- Searching a List
- Comprehensions Over Lists
- Not Everything Works the First Time
- Solving Nested Arrays
2. Elixir's Amazing Pattern Matching
- Pattern Matching
- Elixir's Relationship with Erlang
- Saving a Deck
- Pattern Matching Continued
- Pattern Matching in Case Statements
- The Pipe Operator
- The Pipe Operator Continued
- Module Documentation
3. Testing and Documentation
- Writing and Generating Documentation
- Creating Function Docs
- Introduction to Testing
- Amazingly Productive Doctests
- Writing Effective Doctests
- Case Tests
4. A Few Side Topics
- Introduction to Maps
- Updating Values in a Map
- Keyword Lists
5. Image Manipulation with Elixir
- Identicon Generation Process
- Identicon Generation Process Continued
- The Main Pipeline
- Hashing a String
- The Purpose of the Hex List
6. Structs - Elixir's Data Modeling Tool
- Modeling Data with Structs
- Pattern Matching Structs
- Updating Structs
- Building the Grid
- Mirroring a Row
- Mapping with Custom Functions
- Grid Structure
- Giving an Identicon Shape
- Planning Image Creation
- Creating the Pixel Map
- Drawing Rectangles
7. On to Phoenix
- Quick Note About Phoenix
- Phoenix Installation
- Postgres Setup on OSX
- What is Phoenix?
- App Overview
- Into Phoenix We Go
- Server Side Templating
- Templates vs Layouts
8. MVC in Phoenix
- Phoenix's MVC Model
- Exploring the Router and Controller
- Views vs Templates
- The Model Layer in Phoenix
- Migration Files
- A Game Plan for Creating Topics
- Routing to the Topic Controller
- Setting Up the Topic Controller
- Code Reuse with Import, Alias, and Use
- Phoenix's Code Sharing Model
- Phoenix's Conn Struct
- A Phoenix Approach to Forms
9. Models in Phoenix
- The Topic Model
- Model Changesets and Validations
- More on Changesets
- Generating Changesets for the Form
- New Topic Form
- Phoenix Template Syntax
- Handling Form Submissions
- A Quick Review and Breather
10. Working with Postgres
- Introduction to the Repo Module
- Handling Failed Form Submissions
- Styling with CSS in Phoenix
- Breaking Restful Conventions Safely
- Using the Repo Module for Queries
- Building Lists in EEX Templates
- Redirects in the Controller
- Generating Anchors with Link Tags
- Router Wildcards
- Setting up the Edit Form
- Defining the Update Route
- Editing a Topic
- Linking to the Edit Topic Form
- The Resources Helper
- Deleting a Topic
11. Handling Authentication with OAuth
- OAuth Overview
- OAuth Setup with Ueberauth
- Creating a Github OAuth App
- Defining OAuth Routes
- Receiving User Info From Github
- Users Migration
- Digesting the OAuth Response
- The User Changeset
- Creating New Users
- Our Auth Grand Plan
- Handling OAuth Success
12. Transforming Requests with Plugs
- Introduction to Plugs
- Using a Module Plug to Set the User
- Implementing Module Plugs
- Allowing Users to Signout
- Restricting Access of Users
- The Require Auth Plug
- Controller Scoped Plugs
- Associating Users with Topics
- Altering Existing Tables
- Playing Around with Associations
- Using the Build Assoc Function
- Finalizing the Association
- Checking the Topics Owner
13. Websockets in Phoenix
- Introduction to Websockets
- Showing Individual Topics
- Making the Comments Migration
- The Comments Model
- Overview of Channels in Phoenix
- RallyCoding
- Introducing the Comments Channel
- Making Progress with Sockets
- Quick Breather and Review
- Publishing Messages
- Figuring Out What Topics to Show
- Refactoring to Determine Topic Id
- Fetching Topics on Join
- Debugging Topic Fetching
- Building the Comment Form
- Inserting Comments into the Database
- Remaining Items with Sockets
- Poison Encoder
- Rendering a List of Comments
- Broadcasting Updates
- Updating the Client
- The Socket Event Object
- Authentication with Sockets
- Transporting Tokens to the Server
- Verifying the Current Socket User
- Associating Comments with Users
- Fetching Users with Comments
- Rendering Associated Users
14. Phoenix 1.3 Update
- New in Phoenix 1.3
- CLI Command Changes
- Assets Folder Changes
- Directory Structure Changes
- Contexts
- More on Contexts