Giter VIP home page Giter VIP logo

layers-ports-and-adapters-workshop's Introduction

Sandbox project for the "Advanced Web Application Architecture" training

You'll find all the available training programs here: https://matthiasnoback.nl/training/

Installation

On most machines the easiest way to install this project is with Docker. If you have trouble running Docker, or just want to use the PHP runtime that's installed on your machine already, take a look at option 2 below.

Option 1: Docker

Requirements

  • Docker Engine
  • Docker Compose
  • Git
  • Bash

Getting started

  • Clone this repository (git clone [email protected]:matthiasnoback/layers-ports-and-adapters-workshop.git) and cd into it.
  • Run bin/install.
  • Open http://localhost:8080 in a browser. You should see the homepage of the meetup application.

If port 8080 is no longer available on your local machine, modify docker-compose.yml to publish to another port:

ports:
    # To try port 8081:
    - "8081:8080"

Running development tools

  • Run bin/composer.sh to use Composer (e.g. bin/composer.sh require symfony/var-dumper).
  • Run bin/run_tests.sh to run the tests.
  • Run bin/deptrac.sh to analyze dependencies.
  • Run bin/meetup.sh to use the CLI tool for scheduling meetups.

Cleaning up after the workshop

  • Run bin/cleanup to remove all containers for this project, their images, and their volumes.
  • Remove the project directory.
  • If you don't use Docker normally, you can shut it down or uninstall it too.

Option 2: With PHP and Composer

Requirements

  • PHP (>=7.4)
  • Composer
  • Git
  • Bash

Getting started

  • Clone this repository (git clone [email protected]:matthiasnoback/layers-ports-and-adapters-workshop.git) and cd into it.
  • Run composer install --prefer-dist.
  • Start the webserver by running php -S 0.0.0.0:8080 -t public/, and keep this process running.
  • Open http://localhost:8080/ in a browser. You should see the homepage of the meetup application.
  • Optionally install deptrac.

Running development tools

  • Run ./run_tests.sh to run all the tests (make sure that you also still have the webserver running).
  • Run ./meetup to work with the command-line version of this application.

Cleaning up after the workshop

  • Just remove the project directory.

layers-ports-and-adapters-workshop's People

Contributors

backendtea avatar berndlosert avatar cmodijk avatar dependabot[bot] avatar dereuromark avatar fitn avatar jjanvier avatar matthiasnoback avatar mpdude avatar sergii-deity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

layers-ports-and-adapters-workshop's Issues

Split assignment 19 into smaller steps

We can't make the container just yet, because e.g. RsvpForMeetupController still uses the dependencies stand-alone (the logic needs to be wrapped in an application service there, maybe do it before the workshop even starts?).

Drop assigment 5 and 10

5: user-facing validation is generally not reusable, so let's not make it reusable ;)
10: who annotates ports anyway?

Split assignment 13

First: implement getById() using fromDatabaseRecord. This means the public constructor should be changed into a public static schedule method (do this in the earlier assignment already).

Also: drop the unit tests for Meetup since they get in the way when doing all this refactoring...

Deptrac: generate image

docker-compose run --rm devtools deptrac analyze --formatter-graphviz-dump-image=/opt/var/dependency-graph.png

Suggestion: Resources outside of src

Having resource files inside autoloaded src/ is actually an anti pattern
See also https://github.com/php-pds/skeleton
They should be under top level /resources etc.

It also makes it easier to work with the autoloaded path, as it now only contains valid autoloadable PHP files it is also faster to autoload.

For the course of the workshops it also makes it a bit more easy to work with the classes in src/.
I was bothered by that folder being there :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.