Learning Yii 2

First steps into web application development with Yii 2
3.2 (23 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
131 students enrolled
$19
$75
75% off
Take This Course
  • Lectures 31
  • Length 3 hours
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 11/2015 English

Course Description

Yii is the premium PHP framework for developing web applications. It provides components to simplify every aspect of web development, including authentication, authorization, and automated testing, offering a comprehensive ORM called ActiveRecord, and the option to perform performance tuning. We can use all of these features out-of-the-box, or even customize them based on our project requirements.

The more applications we develop for the web, the more aware we become that we’re spending time on the same repetitive tasks. Learning Yii 2 demonstrates how it is entirely possible to write quality applications fast. This course will show you how to create a basic but fully functional dating site for monsters. All this with minimal effort on your part, because the Yii framework simplifies the overhead work.

We’ll start by installing Yii's basic application template via Vagrant. Before you know it, you’ll have a fully-functional web application that is ready to be customized. You’ll learn to generate Models, Views, and Controllers, and debug and test them with the Debug Toolbar and Codeception. As we continue, you’ll learn to modify that generated code to create a registration page, a profile page, and a listing page, as well as a search interface using ActiveQuery and TypeAhead. We’ll also use ACF and RBAC to boost the security of our website.

By the end, you’ll be comfortable using Yii 2 to develop your own personal and professional web applications.

About The Author

Matthew Beaumont has been interested in technology since his father brought home a Radio Shack TRS-80 in the late 1980s. After six years in music school, he returned to the technology field and founded Beaumont Web Development, LLC, which is a boutique web-development firm located just across the Hudson River from New York City. In addition to his development work, he also plays classical percussion and has appeared in concerts at Lincoln Center, Carnegie Hall, and Radio City Music Hall. He has also published several articles on web development for Sitepoint.


What are the requirements?

  • It would also be helpful to have a basic understanding of HTML, CSS, and Twitter Bootstrap.

What am I going to get from this course?

  • Set up a development environment for your application
  • Scaffold Models, Views and Controllers quickly using Gii
  • Write automated tests using the Codeception testing framework
  • Make a secure environment using ACF and RBAC
  • Manage stylesheets and Javascript with the AssetManager
  • Keep view code clean with HTMLHelper
  • Build a robust search UI with ActiveQuery and TypeAhead
  • Create alternate themes for your site
  • Send e-mails using SwiftMailer
  • Translate your application into multiple languages

What is the target audience?

  • While no previous experience with the Yii framework is required for you to benefit from this course, it is recommended that have a good understanding of PHP’s object-oriented features.
  • This course will walk you through every step of building a basic functional web application in a practical and detailed but fun way.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introducing Yii 2.0
03:19

This video will offer the overview of the course.

05:42

It takes a lot of time to set up a development environment for an application. Learn how to quickly create and configure a development environment on our local PC, so we can begin programming our application.

03:13

Learn how to easily install the Yii 2 basic application template, which is the starting point for any Yii-based project.

05:08

Understand where Yii stores various files within the basic application template.

07:04

Introduce application components, describe how to change their default configuration, and then explain how to extend a core component to add functionality.

Section 2: Introducing Yii's Development Tools
03:02

Learn how to configure Gii, which is a tool that quickly generates code templates in order to cut development time dramatically.

05:01

Learn to generate models with Yii, and then describe Yii’s model features.

05:23

Learn to generate controllers with Gii, and then describe Yii’s controller features.

04:45

The presentation logic in an application should be isolated, and contain a minimal amount of PHP. We’ll learn how to generate views using Gii as well as how to use them.

04:42

Learn how to configure and use Yii's built-in debugging module.

Section 3: Testing with Yii and Codeception
05:19

Automated testing can be difficult to configure and implement. Yii ships with an integrated version of the Codeception testing framework in order to simplify the process of writing automated tests.

05:29

Learn how to use Codeception to write and execute unit tests for our application.

04:49

Learn how to use Codeception to write and execute functional tests for our application.

05:32

Learn how to use Codeception to write and execute acceptance tests for our application.

Section 4: Creating and Managing Users
05:16

Every application needs a means to authenticate users. We’ll explore the auto-generated User model that comes with the Yii 2 basic application template.

06:16

The default user is very limited and requires changes to the code to add users or edit their data. We’ll create a better user using the database and then learn how to easily hash their password.

06:11

The application doesn’t have a way to easily create new users. We will create a registration page to allow new users to create accounts.

05:05

Guests (users who have not logged in) should not be able to update and delete profiles. Use Access Control Filter to restrict access to these pages.

06:52

ACF only allows the ability to block access to controller actions. For finer-grained over access to application features, use the AuthManager component to implement Role Based Access Control (RBAC).

Section 5: Adding Some Style
06:57

Some visual aspects of a web application are common to multiple pages, and having to update those aspects in each page would be very tedious. We’ll learn how to use Yii layouts to manage our common UI elements.

03:39

Applications often have many frontend assets that have dependencies as well as potential conflicts. The Yii 2 AssetBundle class helps keep Javascript and CSS organized.

06:49

Dynamic web applications often mix too much HTML and PHP in order to generate HTML content. The HtmlHelper attempts to solve this by providing PHP methods to generate clean HTML.

06:45

The current profile (view) page is not very appealing, so we'll use some of the skills we've learned in the previous videos to spice it up.

Section 6: Finding Love
06:44

A dating site needs a method for users to search for their match. Yii’s ActiveQuery component makes generating complex SQL queries very easy.

05:13

Sometimes, simply presenting a user with a text field in a search UI leaves them feeling overwhelmed. We can use the TypeAhead widget to provide meaningful suggestions for search terms.

05:34

We've been using the GridView widget to display results, but it is really more suitable in an admin panel than a customer-facing page. We’ll learn how to use the ListView widget to improve the appearance of our listing page.

06:25

Sometimes, an application needs multiple themes in order to display data in different ways to different users or under different circumstances. We’ll learn how to use themes to address this issue.

Section 7: Beyond the Basics
06:02

Applications frequently need to send e-mails. We’ll learn how to use the built-in Swiftmailer component in order to easily send HTML e-mails.

06:13

Our application requires users to manually copy images to the photo directory, which they wouldn’t have access to in production. We’ll learn how to upload files through a form with Yii, and then learn how to manipulate them using the Imagine extension.

06:26

Managing database changes with multiple .sql files is slow and prone to error. Yii’s migration class helps manage database changes.

06:29

Not everyone speaks the same language. So, we’ll learn how to use the i18n component of Yii in order to translate our application into other languages.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Over the past ten years Packt Publishing has developed an extensive catalogue of over 2000 books, e-books and video courses aimed at keeping IT professionals ahead of the technology curve. From new takes on established technologies through to the latest guides on emerging platforms, topics and trends – Packt's focus has always been on giving our customers the working knowledge they need to get the job done. Our Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course