
Flourish already has many great features that make it a win when creating minimal RESTful web APIs. However, life could be even easier. The epiphany micro framework has a great API for creating RESTful web apps that seems to fit well within flourish's un-framework paradigm, but suffers from some rough edges. It'd be lovely to see flourish borrow what works, while building on it's already stellar foundation.
Example epiphany code for a minimal REST interface looks like this:
Epi::init('route');
getRoute()->get('/', 'home');
getRoute()->get('/contact', 'contactUs');
getRoute()->run();
function home() {
echo 'You are at the home page';
}
function contactUs() {
echo 'Send us an email at <a href="mailto:foo@bar.com">foo@bar.com</a>';
}