Web Development · WDC-01-25

Web Application with Yii3

Web Application with Yii3 is a course in building web applications with Yii3, the latest generation of Yii, from project structure, the DI container and routing to databases with migrations and Active Record, forms, membership and RBAC permissions. It suits web developers who write object-oriented PHP and teams maintaining Yii 2 systems who want to plan a move.

Updated
From 6,210 THB / person 6,900 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration18 hours · 3 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Yii is a PHP framework that many organisations use to build medium to large web applications. Its latest generation, Yii3, reached its first stable release at the end of 2025. It is a complete rewrite as a set of separate packages built on PSR standards and dependency injection instead of a global application object, while Yii 2 has moved to security fixes only. New projects should therefore start on Yii3, and teams maintaining older systems need to understand the new approach before planning a migration.

This course builds a web application with Yii3, starting from the application template running in Docker and covering the DI container, middleware, routing and views. Learners then connect to a database with yiisoft/db, migrations and Active Record, build forms with validation, CRUD pages, membership and RBAC permissions, a bilingual site and tests, and finish with a workshop: an article site with an admin area, ready to deploy. (3 days, 6 hours per day, 18 hours in total, Intermediate level.)

What you’ll gain

  • Understand the ideas behind Yii3: separate packages, PSR standards and dependency injection
  • Create and structure a Yii3 project from the application template and run it in Docker
  • Build pages with Yii3 routing, actions, middleware and views
  • Work safely with a database using yiisoft/db, migrations and Active Record
  • Build forms with validation and CRUD pages with pagination and search
  • Add membership, RBAC permissions and multiple languages
  • Write tests and prepare a Yii3 application for production

Who this course is for

  • Web developers who already write PHP and want to use a framework in a structured way
  • Teams maintaining Yii 2 or Yii 1.1 systems who want to understand Yii3 before planning a migration
  • Developers building medium to large web applications that must grow over time
  • Anyone who has built websites with HTML, CSS and PHP for some time

Prerequisites

  • Able to write PHP, with a basic understanding of classes, interfaces and namespaces
  • Basic knowledge of HTML, CSS and how websites work
  • Able to write basic SQL, with some experience of MySQL or MariaDB
  • A laptop that can run Docker Desktop or PHP 8.4 or later, Composer and VS Code, with permission to install software

Curriculum

Course Details

This course is the 2026 edition of Web Application with Yii Framework. It runs for 3 days, 6 hours per day (18 hours in total, 09:00-16:00), as lectures with labs and a workshop. Intermediate level. This edition moves to Yii3, which reached its first stable release at the end of 2025 and is a complete rewrite as separate packages built on PSR standards, using dependency injection instead of the Yii 2 global application

object. Eclipse and jQuery are dropped in favour of VS Code, Docker and htmx or the Fetch API. Because the Gii code generator is not yet available for Yii3, CRUD pages are written step by step so learners understand every part. Middleware, RBAC, migrations, tests and deployment are new. Every lab runs on the learner's own machine with open source tools. Learners take home a lab guide, source code for every lab and their workshop project.

Day 1 Yii3 Foundations and a First Page

Section 1: Getting to Know PHP Frameworks and Yii3

  • The benefits and trade-offs of a framework compared with plain PHP
  • How Yii 1.1, Yii 2 and Yii3 differ, and the support status of each
  • Separate packages, PSR standards and dependency injection
  • Choosing a version for new projects and existing systems

Section 2: Lab: Installing Tools and Creating a Yii3 Project

  • Install Composer, Docker Desktop and VS Code
  • Create a project with composer create-project yiisoft/app
  • Run it with Docker (FrankenPHP and Caddy) or ./yii serve
  • Lab: open the home page and explore the config, src and public folders

Section 3: Application Structure and the DI Container

  • Config and params files per environment
  • The DI container and receiving services through constructors
  • PSR-15 middleware and the path of a request
  • Lab: create your own service and use it in an action

Section 4: Routing, Actions and Views

  • Define routes with Route::get, Route::post and groups
  • Invokable action classes and reading values from the URL
  • Render with WebViewRenderer, layouts and output escaping
  • Lab: an article list page and an article detail page

Section 5: Lab: Assets, Bootstrap 5 and Page Design

  • Manage CSS and JavaScript with asset bundles
  • Use Bootstrap 5 for layout, menus and responsive design
  • Build links with UrlGenerator instead of hard-coded URLs
  • Lab: the main site layout with navigation
Day 2 Databases, Forms and CRUD

Section 6: Lab: Connecting to a Database with yiisoft/db

  • Configure a MySQL or MariaDB connection in the DI container
  • The query builder and value binding to prevent SQL injection
  • Create tables with migrations and ./yii migrate:up
  • Lab: article, category and user tables

Section 7: Active Record and Repositories

  • Yii3 Active Record and how it differs from Yii 2
  • Relations between tables, such as articles and categories
  • Repositories to separate data access and make testing easier
  • Lab: a repository to find and save articles

Section 8: Forms and Validation

  • Form models and validation rules as attributes, such as Required and Email
  • FormHydrator to load POST data and validate it
  • Render forms with Field and protect them against CSRF
  • Lab: add and edit article forms with feedback messages

Section 9: Lab: A Complete CRUD System

  • Write create, edit, delete and list pages step by step
  • Show tables with GridView, sorting and pagination
  • Search and filter data from query parameters
  • Lab: an article management page for administrators

Section 10: File Uploads and URL Management

  • Receive uploaded files and check their type and size
  • Readable slug URLs and routes with parameters
  • 404 pages and exception handling
  • Lab: attach a cover image to an article
Day 3 Membership, Permissions, Languages and Workshop

Section 11: Lab: Membership and Authentication

  • Identity and CurrentUser for login and logout
  • Store passwords safely with password_hash
  • Protect pages that need a login with middleware
  • Lab: sign-up, login and logout pages

Section 12: Permissions with RBAC

  • Roles, permissions and how to assign them
  • Configure yiisoft/rbac and the access checker
  • Check permissions in actions and hide menus by role
  • Lab: separate rights for administrators, editors and members

Section 13: Translation and Extra Packages

  • Translate messages with yiisoft/translator and per-language message files
  • Pick the language from the URL with a route group and middleware
  • Find and install extra packages with Composer
  • Lab: a site in Thai and English

Section 14: Modern JavaScript, Caching and Tests

  • Load parts of a page with htmx or the Fetch API instead of jQuery
  • Cache frequently used data to speed up pages
  • Write functional tests with Codeception
  • Lab: search articles without reloading the page

Section 15: Workshop: An Article Site with an Admin Area, Deployed

  • Combine every part into an article site with an admin area
  • Configure the production environment and Docker for deployment
  • A security checklist before going live
  • Use an AI assistant to review code with care, and next steps

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is MVC, and how does it help web application development?

MVC splits code into three parts: the model handles data and business rules, the view handles presentation, and the controller receives the user's request, calls the model and passes the result to the view. In Yii3 the controller part is usually an action class that receives services through its constructor. With clear responsibilities you can change the design without touching the logic, share work across a team and test each part separately.

How does Yii3 differ from Yii 2, and can an existing system be moved straight across?

Yii3 is a complete rewrite as separate packages built on PSR standards. There is no global Yii::$app; services arrive through dependency injection, middleware handles requests, and database access, forms and validation are separate packages. So a system cannot be moved straight across. The recommended path is to reduce the Yii 2 system's reliance on global state and move data access into repositories first, then migrate one part at a time.

Can Gii still generate CRUD pages automatically in Yii3?

The Yii3 guide currently states that Gii is still under development and not yet available. This course therefore writes the create, edit, delete and list pages step by step, using form models and the validator for checks, repositories to load and save data, and GridView for tables with sorting and pagination. This helps you understand every part of the code and customise it easily.

Who is the Web Application with Yii3 course for, and what should I know beforehand?

It suits web developers who already write PHP and want to use a framework in a structured way, teams maintaining Yii 2 or Yii 1.1 systems, and people who have built websites with HTML, CSS and PHP for some time. You should understand PHP classes, interfaces and namespaces at a basic level, write basic SQL and bring a laptop that can run Docker Desktop or PHP 8.4 or later.

What will I be able to do after the Web Application with Yii3 course?

You will be able to create a Yii3 project and run it in Docker, use the DI container, middleware, routing and views, work with a database through migrations and Active Record, build forms with validation and CRUD pages with pagination and search, add membership and RBAC permissions, build a bilingual site, write tests and prepare the application for production. Participants receive a Certificate of Completion with its own number that can be verified online.

Can the Web Application with Yii3 course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your work, such as practising on your own database structure or planning a move from Yii 2 to Yii3. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.