Learning Yii 2
4.1 (45 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.
233 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learning Yii 2 to your Wishlist.

Add to Wishlist

Learning Yii 2

First steps into web application development with Yii 2
4.1 (45 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.
233 students enrolled
Created by Packt Publishing
Last updated 11/2015
English
Current price: $10 Original price: $75 Discount: 87% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 3 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • 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
View Curriculum
Requirements
  • It would also be helpful to have a basic understanding of HTML, CSS, and Twitter Bootstrap.
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.


Who 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.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
31 Lectures
02:51:24
+
Introducing Yii 2.0
5 Lectures 24:26

This video will offer the overview of the course.

The Course Overview
03:19

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.

Creating a Development Environment Using Vagrant and PuPHPet
05:42

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

Installing the Basic Application Template
03:13

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

An Overview of the Yii 2 Directory Structure
05:08

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

Configuring and Extending Yii 2 Components
07:04
+
Introducing Yii's Development Tools
5 Lectures 22:53

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

Preview 03:02

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

Generating and Working with Models
05:01

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

Generating the Controllers
05:23

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.

Generating the Views
04:45

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

Configuring and Using the Debug Module
04:42
+
Testing with Yii and Codeception
4 Lectures 21:09

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.

Preview 05:19

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

Unit Testing
05:29

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

Functional Testing
04:49

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

Installing Selenium and Acceptance Testing
05:32
+
Creating and Managing Users
5 Lectures 29:40

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.

Preview 05: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.

Warding Off Evil
06:16

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.

Registering Our Ghouls, Goblins, and Vampires
06:11

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.

Access Control Filter – The Silver Bullet
05:05

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).

Implementing Role Based Access Control
06:52
+
Adding Some Style
4 Lectures 24:10

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.

Preview 06:57

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.

Managing JavaScript and CSS
03:39

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.

Introducing the Yii 2 HTMLHelper
06:49

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.

Monster Profiling – The Scary Details
06:45
+
Finding Love
4 Lectures 23:56

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

Preview 06:44

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.

Enhancing the Search UI
05:13

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.

Displaying and Sorting Results
05:34

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.

Adding New Themes
06:25
+
Beyond the Basics
4 Lectures 25:10

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.

Preview 06:02

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.

Working with Images
06:13

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

Tracking Database Changes Using Migrations
06:26

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.

Love, the International Language (i18N)
06:29
Frequently Bought Together
About the Instructor
Packt Publishing
4.0 Average rating
6,556 Reviews
48,523 Students
569 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.