RESTful APIs in the Real World Course 2

2:18:26

What you'll be learning

This tutorial uses a deprecated micro-framework called Silex. The fundamentals of REST are still đŸ’¯valid, but the code we use can't be used in a real application.
// composer.json
{
    "require": {
        "silex/silex": "~1.0", // v1.3.2
        "symfony/twig-bridge": "~2.1", // v2.7.3
        "symfony/security": "~2.4", // v2.7.3
        "doctrine/dbal": "^2.5.4", // v2.5.4
        "monolog/monolog": "~1.7.0", // 1.7.0
        "symfony/validator": "~2.4", // v2.7.3
        "symfony/expression-language": "~2.4", // v2.7.3
        "jms/serializer": "~0.16", // 0.16.0
        "willdurand/hateoas": "~2.3" // v2.3.0
    },
    "require-dev": {
        "behat/mink": "~1.5", // v1.5.0
        "behat/mink-goutte-driver": "~1.0.9", // v1.0.9
        "behat/mink-selenium2-driver": "~1.1.1", // v1.1.1
        "behat/behat": "~2.5", // v2.5.5
        "behat/mink-extension": "~1.2.0", // v1.2.0
        "phpunit/phpunit": "~5.7.0", // 5.7.27
        "guzzle/guzzle": "~3.7" // v3.9.3
    }
}

Making RESTful APIs is hard, really hard. There are a lot of concepts to know - resources, representations, HTTP methods, status codes, etc.

Course 1 got us really comfortable with all the terminology. So in episode 2, we're attacking the hard stuff:

  • Using a serializer
  • Token Authentication System (Silex's security system)
  • Hypermedia versus media
  • The HAL hypermedia type
  • The HATEOAS PHP library
  • The HAL Browser
  • Embedding resources (versus adding links)
  • Tricks with Behat for testing API's
  • Pagination and filtering
  • A lot of other pieces in between!

This stuff is not easy. But if you make it through, you'll be armed to attack whatever API need you have. And for documenting your API, see Course 3 (not released yet)


Your Guides

Ryan Weaver Leanna Pelham

Buy Access

Questions? Conversation?