PHP Projects: Finding Real World Solutions with PHP
4.0 (1 rating)
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.
31 students enrolled
Wishlisted Wishlist

Please confirm that you want to add PHP Projects: Finding Real World Solutions with PHP to your Wishlist.

Add to Wishlist

PHP Projects: Finding Real World Solutions with PHP

Build product ready applications and find real world solutions with PHP
4.0 (1 rating)
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.
31 students enrolled
Created by Packt Publishing
Last updated 10/2016
English
Curiosity Sale
Current price: $10 Original price: $95 Discount: 89% off
30-Day Money-Back Guarantee
Includes:
  • 5 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Quickly create isolated development virtual machines for your projects
  • Learn the new features of PHP 7 that make it well suited to quickly create web applications
  • Use PHP’s object oriented features to implement the Model-View-Controller pattern
  • Write tests in PHP Unit to create an automated test suite for your application
  • Use test driven development to help produce and refactor reusable code in a web application
  • Convert single server sites using technologies like file backed storage into highly scalable sites that can be ran on multiple servers
  • Use a micro framework called silex to quickly develop complex web applications
  • Use PHP to create real-time streaming functionality using the Comet model
View Curriculum
Requirements
  • The video is filled with real world projects which are fun, exciting and practical. The codes are explained in detail and there are ready to use solutions for developers
Description

The latest release of PHP has created a massive spark among developers, needless to say how popular a back-end scripting language it is. With this course, you'll get a deep insight into 3 cool projects that are built on PHP, and you'll learn different ways to improve your development.

Once you're familiar with setting up your environment and using the basic syntax of PHP, we'll begin with an entry-level project, where we'll show you how to build a URL shortener. You'll understand how to make effective use of MVC and how to connect up to the database. From there, we'll show you how to automate testing for our project and how to create functional tests. Next, we'll jump on to building an authentication platform, where you'll be introduced to Test Driven Development and CRUD, to create persistence storage. We'll show you the beauty of using the REST API and you'll also learn how to alleviate the load on the database. Finally, we'll build a social sharing platform, where we'll tighten the security and let users interact with each other in real-time.

With this course in your hands, you'll be confident of the practical use cases of PHP and will be ready to take your development skills to the next level.

About the Author

Michael Lively has worked in a variety of roles in the software development industry for over 15 years, from developer to development director. He has worked on a variety of different projects and a variety of different technologies over that time, from small home-grown sites serving a handful of regular users to large enterprise platforms serving millions of consumers.

His current job is with Slickdeals.net, the largest and most trusted deal sharing community and a routine presence in the top 100 sites in the US. In addition to his professional work, he has been an active member of the PHP open source community. Some of his contributions include the database extension for PHPUnit and an alternative mocking framework for PHP called Phake.


Who is the target audience?
  • The video is for all PHP programmers. It will benefit not only begineers but also expert programmers. The viewer will learn how to solve important problems relating to scalbility and performance through the help of projects.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
42 Lectures
05:13:34
+
Starting a PHP Project
4 Lectures 24:55

This video provides an overview of the entire course.

Preview 03:37

In this video, we will walk through creating a brand new PHP development environment that we will be using throughout the course.

Creating the Development Environment
08:12

We need an editor that allows us to easily update our projects and integrates well with how vagrant works. We will install PhpStorm. PhpStorm is a commercial solution that has excellent integration with vagrant.

Setting Up PhpStorm
08:42

As mentioned before, PhpStorm is a commercial solution. Some developers may not want to pay for an editor. NetBeans is a free solution that is not as feature filled but will get the job done.

Setting Up NetBeans
04:24
+
Introduction to PHP
5 Lectures 33:29

We want to build a simple website. We will see how PHP can be used to create a simple form and process that form.

Preview 06:27

We need to store the data submitted by forms for more than just a single page request. We can use PHP's built-in session handling to do this for us.

Using PHP Sessions
04:43

PHP has a large number of functions to cover a vast array of functionality. It can sometimes get difficult to navigate through them. Using PHP's documentation, you can start to understand the functionality available for you through PHP and its many extensions.

Useful PHP Functions
04:11

We know how to store data for a session, but how can we persist data for longer? Using PHP's PDO extension and a SQLite database, we can store data in an external database for use later.

Using PDO to Connect to a Database
09:55

We have built up a fair amount of code now and some of it is duplicated across files. We are going to use classes to isolate some core concepts of our project to make them easier to reuse.

Basic Object Oriented Features
08:13
+
Turning Long URLs into Short Ones
5 Lectures 38:18

We need to learn how to set up actual projects. We will use PHPStorm, composer, and our VM to create a new project for our shortener.

Preview 07:41

We need a well-defined and flexible way to add content and functionality to our site. We can use the MVC pattern to achieve this.

Using MVC in the Right Way
09:25

Our site accepts any data right now, either when submitting a URL or when viewing a URL. This could cause weird errors on our part that we probably don't want to see. This can be fixed by implementing code in the model and controller to validate the state of objects.

Securing and Validating Our Data
05:22

We have a working form, but it is saving data only to the session. To make our application useful, we need it to record data to the database instead.

Wiring Up to the Database
08:55

The only thing missing now is the ability of our application to redirect users using the short URLs. We will implement this functionality in our MVC framework with some help from PuPHPet's default configuration for nginx.

Redirecting Our Users
06:55
+
Automated Testing of Our Shortener
5 Lectures 42:33

If we want to write unit tests, we need to install a proper unit testing library. We will install PHPUnit, the most widely used unit testing framework for PHP.

Preview 05:44

Now that we have PHPUnit installed and working, we need to learn how to use it. We will use our UrlEntity as an example to see how we can build an effective unit test.

Understanding PHPUnit
06:50

The first class that we tested was a simple class with really no dependencies. However, our remaining classes have dependencies that make setting up a test difficult. We will use a mocking framework to help us simplify the setup of these dependencies.

Using Mock Objects in a Test
09:48

We have learned how to use mock objects to test classes with code dependencies. Now we need to learn how to test classes with database dependencies. We can leverage PHPUnit's database testing extension to simplify the testing of our database interaction in the repository.

Testing Database Interaction
09:43

We can now test most of the types of classes we will find in our applications. However, we need a way to validate that our various units work together properly. We will use Selenium to create functional tests that will allow us to test our website from end-to-end.

Functional Tests with Selenium
10:28
+
Creating an Authentication Platform
6 Lectures 47:09

Now that we have an understanding of all the fundamental building blocks of testing, we need to learn how to apply those to our projects. Using a new project, we will apply a test-driven development approach to ensure proper coverage of our project with functional tests.

Preview 09:43

With our feature test for user management in place, we need to get started on our code. We will use our feature test to help guide the development of the entire user management feature.

Implementing User Management
09:42

Now that we have our first feature under our belt, we need to expand our functionality. We are going to use the user management code as an example to quickly implement group management.

Managing Groups for the Users
06:00

Most of ourcurrent implementation of group management is identical, Instead of continuing on with copy-and-paste programming, we should generalize the CRUD functionality in our system and abstract into a separate class that can easily be reused.

DRYing Out Group and User CRUD
06:51

Now that we have a base set of classes for implementing CRUD for an entity in our system we should start taking advantage of it. We will use our CRUD classes to create management functionality for permissions.

Giving Permissions to Our Groups
05:19

We now have a fully functional management interface for users, groups, and permissions. Now we need a way to secure our interface. What better way to set up accounts for our user management system than to use the authentication management system itself? To do this, we will add authentication and access control to our system.

Bootstrapping Authentication to Our Management System
09:34
+
Converting Our User Management Application into a Scalable Service
5 Lectures 43:48

A common need for many projects is a lightweight, easy to understand, easy to maintain API. We can leverage RESTful API architecture to provide such an API for clients.

Preview 07:50

We now have a solid strategy to build a REST API and a test to make sure we complete it, but we don't have an implementation. We are going to leverage our existing domain model to create a new API controller

Creating a REST Interface for User Management
10:32

Set up our MySQL server so we can login and use it from the application.

Moving from SQLite to MySQL
08:17

We are now leveraging our database for all of our data. Before too long it is likely that we will start seeing bottlenecks form in our database. Leveraging Memcache we can increase the amount of head room we have in MySQL by offloading reads from the database to a quicker memcache solution.

Introducing Memcache for Caching and Session Management
07:03

We now have a performant database but we are still stuck using files to hold our sessions. We will leverage MySQL to move session storage to a shareable database.

Moving Sessions from Files to the Database
10:06
+
Creating a Social Sharing Platform
7 Lectures 51:21

As developers, we should try to spend enough time on things that are unique to our product or business. We can use frameworks such as Silex to help free up time from solving common issues.

Preview 08:13

We want to find an easier way of logging in to our system. We can use Google's OAuth implementation to allow Google logins for credentials on our site.

Using OAuth to Login
08:13

We can log in with Google now, but Google may not give us all of the data we need. We need to allow attaching of data to the users provided by Google's OAuth data.

Completing the Account Registration and Login Flow
08:43

We need to start working on allowing URLs to be shared. Using a web crawler/scraper, we can pull rich data down into our database for URLs that we post.

Creating a Crawler Service
06:19

Now that we have a URL crawling service, we need to integrate it with the site.

Allowing URLs to be Shared
06:38

We are collecting URLs, but in doing so we have introduced a potential bottleneck to our web requests. We are going to re-implement our URL service using an external job queue.

Allowing for Crawling to Scale
06:48

Now that we are collecting URL data, we need a way to display it to our users. We will use long polling to ensure that our users have the best experience possible.

Creating a Real-time Global Feed
06:27
+
Letting Users Interact with Each Other
5 Lectures 32:01

We are able to easily add content to our site. Now we need to learn how to search for users. We will use Elasticsearch to augment our database and make it easier to find users in our system.

Preview 07:41

We can find users we know about with Elasticsearch. Now we need a way to discover new users. We will implement a simple algorithm to find users sharing the same URL as us.

Discovering New Content
05:02

Now that we can discover users, we need a way to follow them. We will introduce following and unfollowing in this section.

User Following and Unfollowing
04:24

Now that users can see each other's URLs, we should create a way for a user to comment on a URL.

Creating a Real-Time Commenting Stream for URLs
06:21

There are a lot of things happening on our site now and it would be great to have a feed of these events. We will use domain events to help create feed items to communicate important events to our users.

Creating a Feed for Users
08:33
About the Instructor
Packt Publishing
3.9 Average rating
7,282 Reviews
52,127 Students
616 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.