2017 © Pedro Peláez
 

project frisbee

Modern Exception Driven Development framework

image

enrise/frisbee

Modern Exception Driven Development framework

  • Sunday, April 3, 2016
  • by enrise
  • Repository
  • 11 Watchers
  • 63 Stars
  • 28 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Frisbee, (*1)

Frisbee by Enrise

Exception Coverage Exception Driven Development Travis branch Packagist Packagist Packagist, (*2)

Demo

, (*3)

Disclaimer

This is just a 1st of April joke, I hope you liked it! :), (*4)

About

With Frisbee you can start enjoying the next level of programming: exception driven development., (*5)

Exception driven development takes everything what's good about programming, intensifies it by 300%, and puts it a easy to remember workflow., (*6)

Once you get used to it, you wonder why you ever used Laravel., (*7)

Core concepts

Frisbee achieves the goodness by employing these two core concepts: Frisbees and Boomerangs. Each is based upon the concept of exceptions, and by throwing these, we achieved optimal speed an stability., (*8)

By accepting exceptions as a thing of beauty instead of an annoying byproduct of coding, we optimize your workflow and attitude towards life., (*9)

Please note that only recent versions of PHP (being 7 and up) support the right attitude towards exceptions, so Frisbee is optimized only for PHP7., (*10)

Installation

To start a new project based on Frisbee, simply use composer to create a project:, (*11)

$ composer create-project enrise/frisbee

and start a local webserver like so:, (*12)

$ php -S localhost:8080 dev/router.php

Now checkout http://localhost:8080 and see a skeleton Frisbee app in action!, (*13)

Throwing your first application

As explained above, Frisbee is built upon the core concepts of Frisbees and Boomerangs., (*14)

In the next section of this README, we will step through each of the basic concepts., (*15)

Frisbees

Frisbees are used to throw the part of your application you want to use next. An example of this can be seen from the very start of the application, in public/index.php:, (*16)

<?php
throw new \Frisbee\Application('myApp');

See the code in the application to discover how to fling towards the different parts of your application from here., (*17)

Boomerangs

Boomerangs are like Frisbees, with the added functionality that they return on the place they were thrown from. This makes is unbelievably easy to e.g. load resources like a database handler, or in the example below, the Twig templating engine., (*18)

if (!isset($this->resources['template'])) {
    throw new TemplateFetcher('template', $this);
}

After throwing the boomerang, $this->resources['templates'] is set and you can go on with your business from here., (*19)

Bugs, questions, and improvements

If you found a bug or have a question, please open an issue on the GitHub Issue tracker. Improvements can be sent by a Pull Request against the develop branch and are greatly appreciated!, (*20)

The Versions