Beware, mortals, for here be Patchwork

I'm thrilled to introduce Patchwork, a aimed at building websites I have been working on (and off) for the past two years, and that I just released in its 1.0.0 version.

Based on Silex, it integrates RedBean for model handling and has got some nifty things on the front-end side too, using gulp for asset management.

It is available via Composer and can be installed and started through the command line like this :

composer create-project neemzy/patchwork pizza
cd pizza

Find out more and contribute at GitHub, and spread the word !

Incidentally, Patchwork uses my .

Use RedBean ORM with Silex micro-framework

As a PHP developer, I love using RedBean as an ORM and Silex as a micro-framework. But I have to admit the fact the former comes as a static class isn't quite handy sometimes.

I was looking for a solution to make the two of these communicate with each other in a better way. Some effort has already been put into it, but the linked package doesn't help with the main issue I described above, so I decided to roll out my own.

Here comes a RedBean service provider for Silex, available and following the PSR-2 and PSR-4 standards. It's dead simple, and mainly serves one purpose : make RedBean available as an instance through Silex's service containing capabilities (which should help with mocking while writing unit tests). Using it thus allows you to write code like the following :

$book = $app['redbean']->dispense('book');
$book->title = 'PHP for dummies';

As usual, I strongly encourage interested people to contribute to the project via GitHub !

As a side note, if you ever wanted to use my Environ along with Silex, I wrote a as well.

Language switch

Just a quick note to underline the fact this website has been translated to English, in order to be understandable by a broader audience. Besides being the world's most widespread language, it is also a growing standard in web development in every country, including France, hence the need I have felt to do it.

Old articles in French will be kept that way as there is no point in translating them, and will remain for historical purposes.

Enjoy, and see you soon (I hope) for new articles !

Une extension Twig pour partager sur les réseaux sociaux

Et voici venir ShareExtension, une extension Twig destinée à faciliter l'utilisation de liens de partage vers les réseaux sociaux. Sont actuellement supportés Twitter, Facebook, Pinterest, Tumblr et Google+ (si, si).

Voici un rapide aperçu de son utilisation :

<a href="{{ twitter(my_url, 'Tweet this text') }}">Share on Twitter</a>
<a href="{{ facebook(my_url) }}">Share on Facebook</a>

Le projet suit la norme PSR-2, est installable via Composer et peut être forké à l'envi sur GitHub !

Un bot IRC propulsé par Node.js

Cet article a pour objet dbot, un tournant sur Node.js. La particularité de ce bot est qu'il permet l'inclusion de plug-ins proposant - pour l'heure - des fonctionnalités utiles aux développeurs web, faisant appel à différents services web et permettant d'interagir directement avec eux via des messages privés.

Le bot lui-même et ses plugins sont disponibles sur NPM et installables de la façon suivante :

$ git clone [email protected]:dddware/dbot.git
$ cd dbot
$ npm install dbot-list dbot-dfill dbot-dpaste dbot-h5p dbot-url
$ npm start # démarre le bot

Si ce projet vous intéresse, n'hésitez pas à y contribuer via GitHub !