Download the PHP package playground-sessions/php-code-exercise without Composer

On this page you can find all versions of the php package playground-sessions/php-code-exercise. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-code-exercise

Playground Sessions Backend Code Exercise (Lumen)

Scenario

Take this hypothetical situation.

We are making an iOS and Android app for teachers. A teacher will select a student to see all lessons, and whether that student completed each lesson.

Each app will get its data from the JSON REST API endpoint:

Where {userId} is the user id of the student.

You inherit this codebase.

You remember how the data is structured:

You look over the codebase and realize that several problems exist in this endpoint.

  1. Business rules (eg. whether a user has completed a lesson) would be duplicated by each app.
  2. It is too slow, even with a reasonable amount of practice records.

Luckily, both front-end developers agree that the endpoint needs to change before it is used. You all agree to the following data structure for the response:

Instructions

Solve all problems with this codebase.

Code should be cleanly written in self-contained parts, each having one responsibility, according to the Single Responsibility Principle (SRP). For example, application logic (eg. extracting query parameters from a URL) should be separate from business logic (eg. determining whether a lesson is complete).

You have full reign over the codebase. You can add or remove any packages you like. Everything is fair game.

We are testing your ability to organize code cleanly, with SRP, not your knowledge of the Laravel/Lumen frameworks.

Try to commit often and with small changes, so we can see what you are doing.

If you have a particular strength (say documenting APIs), feel free show it off.

You might benefit from knowing that all 3 problems can be solved without use of a cache.

Deliverables

Email [email protected] with a link to your git repository.

Getting Started

Getting started is simple with PHP's built-in web server.

  1. Have PHP 8.0 installed.
  2. Follow the Development Environment Setup

Go!

We look forward to seeing your code!


All versions of php-code-exercise with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
laravel/lumen-framework Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package playground-sessions/php-code-exercise contains the following files

Loading the files please wait ....