Project Introduction

This video is available to view for members only.

Click here to Join!

Already a member?


In this first video we are going to cover the project scope, thinking about the endpoints we will likely need, and what kind of JSON data we are going to work with.

This is important as it not only defines the way our endpoints will operate, but could also allow you to start working on your front end before your back end has been created. You may even wish to hand over the front end work to another team member, or a freelancer, and get them building your front end as you work on the back end.

It's really important to think about how your API will be used, and how you would like to use your API.

At this point you are free to imagine your API operating however you like - changing your mind at this point is cheap. After this exercise you will have fleshed out some basics of how you would like to interact with your system. This may not be the final outcome, but it's your starting point and future reference.

We're going to test our API using Behat 3. So, once we have our server ready and raring to go, we will first get Symfony on there, and then Behat and PHPSpec. Once that's done, we can initialise our project for Behat and start writing our first feature outline. This will come in the next video.

Inside our Behat features we will use the expected JSON data to shape our scenarios, which in turn will shape the PHPSpec specifications.

This video is a little more high level than most. I have seen questions being asked on Reddit about how developers like to work. I wanted to show my workflow, thought processes, and so on.

I find this approach works for me, when working on my own projects. Working with a larger team, or clients makes things a lot trickier, as you are beholden to them. However, working this way on your own gets you into the process and provides structure, which can subsequently be applied to client projects.

Code For This Course

Get the code for this course.

Share This Episode

If you have found this video helpful, please consider sharing. I really appreciate it.

Episodes in this series

# Title Duration
1 Project Introduction 17:13
2 Setting Up Our Development Environment 05:08
3 Installing Symfony 3, Behat, and more 13:53
4 User Feature - Part 1 17:47
5 User Feature - Part 2 07:51
6 Talking English To Your Computer 11:05
7 Teaching Your Database To Forget 07:42
8 Creating User Data From Behat Background - Part 1 14:44
9 Creating User Data From Behat Background - Part 2 11:33
10 Creating A Custom RestApiContext 17:44
11 Our First Passing Behat User Scenario 12:01
12 Our Next Passing Step 13:10
13 Securing Our User Endpoint - Part 1 17:17
14 Securing Our User Endpoint - Part 2 24:27
15 Securing Our User Endpoint - Part 3 24:47
16 Log In To A Symfony API With JWTs (LexikJWTAuthenticationBundle) 11:02
17 Implementing PATCH for Users 18:17
18 Improving our API User Experience 13:59
19 GET a Collection of Accounts 12:15
20 POSTing in New Accounts 14:34
21 PUT and PATCH for Accounts 12:14
22 How To DELETE Existing Accounts 05:11
23 File Feature Overview 11:40
24 File - Using Existing Resources as Boilerplate 15:17
25 File POST 14:53
26 Fixing A Bug In POST Guided By Behat 12:50
27 Wrapping Up With File DELETE 07:47