Skip to main content
CF

Phlex on Rails

7h 58m 57s
English
Paid

Phlex helps you build clean and fast views in Rails. This course shows you how to use it to make clear and stable UIs without heavy templates or large JavaScript tools. You will learn how to add Phlex to a current app step by step, and how to build with small, clear parts that are easy to test and change.

Why Use Phlex in Rails

Many Rails apps have slow or messy view code. Partials pile up. Helpers grow large. Frontend tools add stress. Phlex gives you a simple way to write views with plain Ruby. It removes the guesswork and keeps the view layer small and clear.

Build Views With Hotwire

You will learn how Phlex works with Hotwire to make fast pages without React or complex builds. You will see how Turbo and Stimulus cover most client needs and cut out heavy logic on the browser.

Use Superform for Forms

Forms are hard to manage in large apps. Superform helps you build forms as reusable components. You get full control over fields, errors, and layout while keeping the code short and easy to read.

Replace ERB With Components

Old ERB, Haml, or Slim files can grow wild over time. Phlex components keep structure clear. Each part does one thing. You can follow the flow of the page with less jumping around. This makes testing and scaling easier.

Grow Your App Slowly

You do not need a full rewrite. You can start small and move one view at a time. This lets you improve your code while keeping your app stable. Over time, you build a stronger and simpler view layer.

About the Author: Brad Gessler

Brad Gessler thumbnail

Brad Gessler is a US software engineer and Ruby on Rails educator focused on the modern Phlex view-component library — a Ruby-native alternative to ERB templates that has become one of the more interesting recent additions to the Rails ecosystem.

His CourseFlix listing carries Phlex on Rails — a comprehensive treatment of Phlex, covering the component model, integration with Rails, the testing patterns, and the architectural decisions involved in moving a Rails view layer from ERB to Phlex.

Material is paid and aimed at Rails developers ready to adopt Phlex in production codebases. For broader content, see CourseFlix's Ruby on Rails category page.

Watch Online 45 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 45 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: 001 Introduction
All Course Lessons (45)
#Lesson TitleDurationAccess
1
001 Introduction Demo
10:09
2
002 Why Phlex
20:32
3
003 Why Rails_
06:47
4
004 Why components
07:21
5
005 Phlex is Ruby
07:32
6
006 Rendering
20:21
7
007 Tags, attributes, & text
16:31
8
008 Blocks, slots, & yielding
11:13
9
009 Inheritance
07:08
10
010 Compositions
12:33
11
011 Testing
06:32
12
012 Getting Started
08:39
13
013 Components
09:53
14
014 Rendering from templates
16:01
15
015 Helpers
17:01
16
016 Staying organized
13:10
17
017 Views
11:28
18
018 Layouts
26:11
19
019 Caching
05:59
20
020 Action Mailer
15:36
21
021 Why Superform
23:03
22
022 Getting Started
14:39
23
023 Extending forms with inheritance
07:14
24
024 Reusing forms
03:55
25
025 Customizing
08:33
26
026 Automatic strong parameters
10:28
27
027 Overview
09:06
28
028 Stimulus ERB to Phlex components
08:11
29
029 Seperating Stimulus Concerns
10:57
30
030 Implement Stimulus Component in ERB
07:29
31
031 Stimulus Base Component
07:11
32
032 Turbo Frame DOM IDs
10:14
33
033 Turbo Broadcast
11:52
34
034 Turbo Broadcast Extraction
03:05
35
035 Turbo Pagemorphs
10:56
36
036 Overview
02:43
37
037 Composition
10:03
38
038 Tailwind CSS
10:17
39
039 DaisyUI
06:29
40
040 Overview
02:50
41
041 Install Superview
10:44
42
042 Views in controllers
15:02
43
043 Superform
07:04
44
044 Extracting Superviews
05:01
45
045 Layouts
11:14
Unlock unlimited learning

Get instant access to all 44 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What prerequisites are needed before taking this course?
Before enrolling, you should have a basic understanding of Ruby on Rails, as the course builds on this framework to teach Phlex. Familiarity with concepts like ERB, Rails views, and partials will be helpful, as the course involves replacing these with Phlex components. An understanding of web development fundamentals is also beneficial.
What projects or outcomes can I expect to build during the course?
Throughout the course, you will learn to build clear and efficient user interfaces in Rails using Phlex. You will work on replacing traditional ERB views with Phlex components, integrating Hotwire for fast page loads, and using Superform to create reusable form components. These projects aim to improve your app's view layer by making it cleaner and more maintainable.
Who is the target audience for this course?
The course is designed for Rails developers looking to improve their view layer by using Phlex. It is ideal for those who have experienced challenges with traditional view templates and wish to simplify their UI development process. The course is also suitable for developers interested in reducing frontend complexity by utilizing Hotwire and Phlex instead of heavy JavaScript frameworks.
How does this course compare in depth and scope to other Rails courses?
This course uniquely focuses on optimizing the view layer of Rails applications using Phlex, rather than covering full-stack Rails development. It provides detailed insights into moving away from traditional view templates like ERB towards component-based views. The integration with Hotwire and Superform is also covered, providing a specialized scope that may not be extensively addressed in more general Rails courses.
What specific tools or platforms are covered in the course?
The course covers Phlex for building views, Hotwire for enhancing page speed without complex JavaScript, and Superform for managing forms as components. It also discusses using Turbo and Stimulus to cover client-side needs, and includes lessons on integrating Tailwind CSS and DaisyUI for styling.
What topics are specifically not covered in this course?
The course does not cover backend Rails development, database management, or in-depth JavaScript frameworks like React or Angular. The focus is strictly on improving the view layer with Phlex, Hotwire, and Superform, and it assumes a basic understanding of Rails fundamentals.
What is the expected time commitment for completing the course?
The course consists of 45 lessons, each designed to be concise yet informative. While the total runtime is unspecified, prospective students should expect to dedicate sufficient time to practice building components, integrating Hotwire, and using Superform, alongside watching the instructional content.