Giter Site home page Giter Site logo

berlingerclubworldcub's Introduction

Club World Cub

This project has been created by Stijn Kluiters as requested by Berlinger as an codekata to check out my coding skills untill now.

Setup and installation

I've used Windows 10 to create this project. Use this link to install the same way as i did: https://codewithbish.com/how-to-run-laravel-8-using-docker-in-windows-for-beginners/ But skip step 2;

After the installation you should see that the .env has been created for you. If not, then follow the default laravel installation guide. https://laravel.com/docs/9.x/installation

  1. Run php artisan migrate in the docker environment to setup the database tables.
  2. Run php artisan db:seed to enter the berlinger teams.
  3. Hitting F5 generates a new score on the page.

Known issues:

  • Running php artisan migrate or php artisan db:seed (database connections) in WSL requires the argument DB_HOST=127.0.0.1 BUT Actually running and using the application requires: DB_HOST=mysql (this probably is fixable by entering the docker container instead of manually connecting through ~WSL!)

Not implemented (yet):

Due to shortage of time I did not implement the following features:

  • The winners of the leagues play the final match
  • Not every team get's picked yet to play matches against eachother. Only the first 5 from the database records.
    • Solveable by allowing to run multiple leagues on the page.
  • Not everything is unittested yet. I have made a couple ( a general idea ) to see how i would solve the rest too.

A little different implementation:

  • "The matched played are already known, see next page" |

I liked it more when every team is also selected randomly team also was selected randomly, so not only the goals are random, but also the teams are! (And no! In a real situation I would not change the functionality by myself ;) )

Usage of the code:

  • The Valueobjects are used to make it more easy to unittest because in my opinion a model has too many responsibilities. Containing attributes and database connection which doesn't allow for easy Mockery.
  • I have tried to make a layer of functional and technical classes. The services as functional interfaces, and the rest for technical purposes.
  • I love dependency injection due to the fact that it is easily mockable

berlingerclubworldcub's People

Contributors

stijn-kluiters-ibx avatar

Watchers

James Cloos avatar chargedlight1 avatar

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.