6 Tips to Build Fast Web Applications (Php Dublin March 2016 Talk)
Following one of my previous posts about performance in web applications, yesterday night I had the chance to give a related talk at the Php Dublin user group. My talk was preceded by a great talk (and demo) by Ricardo Melo (@rjsmelo) called Docker and Php, a practical use case. If you are interested in the topic, be sure to check it out! It was a great night, I learned a lot and I had a lot of fun, so thank you to everyone involved. If you are interested in having a look at the slides, here they are: http…
6 Rules of thumb to build blazing fast web server applications
In this post I will try to highlight some of the most common principles that you have to take under consideration when you want to achieve a great level of performance while building a web application (specifically on the backend part). I believe the concepts discussed here can be applied to any language and framework even if, due to my specific experience, I will mention some examples, design patterns, conventions and tools that are mostly used in the PHP world. You can read this article in other languages…
Developing a web application with Lumen and MySql
Lumen is a new Php micro-framework developed by Taylor Otwell, the same author of the famous Laravel framework. I wanted to give it a try and I am here to share my experimentations. I am not an expert of Lumen (yet), but I think one of the best characteristics of this framework is that it makes really really easy to bootstrap a new project. So to prove this, we will now build a fully functional app backed by a MySql database in less than 30 minutes. Are you ready to start? A motivational quote everyday Our…
Symfony, edit the Response globally using the Kernel Response event
One of the things I like most of the Symfony framework is its Http Kernel component. Not only it does offer a very straightforward abstraction to handle requests and responses in an object-oriented way but it also allows you to interact with the whole response generation process through events. This approach is very convenient and flexible and in fact the Http Kernel component is the foundation of the Symfony framework but also of several other famous frameworks (Silex, Laravel) and CMSes (Drupal, BackBee…
Transparent pixel response with Symfony, how to track email opening
If you have ever heard about ”transparent pixel”, ”1x1 blank pixel”, ”tracking pixel” or simply ”tracking image” you probably know what we are going to talk about and can just skip to the implementation! Introduction Transparent pixel image is a technique often used to track some user behavior (often visits or views to a certain online content) in scenarios where you can’t use javascript. One of the most common scenarios is probably email opening tracking. Can you put Google Analytics into an email? Well…
Introducing ORM Cheatsheet
This week I received an interesting email from Martin Stradej, the developer of ORM Designer, a tool to design ORM relationships with a simple but powerful graphic user interface. Martin wrote the mail because he wanted to acknowledge me of his latest project: ORM Cheatsheet. ORM Cheatsheet, as the name suggests, is nothing more than a reference website for those who struggles with some of the most common Php ORM libraries (it currently supports Doctrine2 and Doctrine, but it seems that Propel and Cake PHP…
Write a console application using Symfony and Pimple
In this article I will show you how to set up a stand alone command line application by using the Symfony Console component and Pimple. Writing console commands for Symfony (full stack framework) is easy and enjoyable. It helps a lot when you need to handle particular collateral tasks that are needed, in a way or another, to make your website running (processing and crunching data, make async requests, create reports, etc.). Anyway I discovered that writing stand alone command line applications using only…
Integrating Twig.js and BazingaJsTranslationBundle
Recently I had the need to run a twig template that uses the trans filter on my frontend using twig.js, a pure JavaScript port of twig written by the good Johannes Schmitt. The JavaScript version does not handle all the functionalities offered by the original PHP version (even if it goes pretty close) and in particular it does not natively handle the trans filter. So, at first, I got a JavaScript runtime exception on my page when trying to use the template. Luckily enough the JavaScript version of twig is…
Symfony security: authentication made simple (well, maybe!)
The Symfony2 security component has the fame of being one of the most complex in the framework. I tend to believe that’s partially true, not because the component is really that complex, but because there are (really) a lot of concepts involved and it may be difficult to understand them all at once and have a clear vision as a whole. I am in the process of writing an OAuth bundle and I faced the need to deeply understand how the authentication process work in Symfony2 to being able to integrate the OAuth…
Writing a new Extractor for PHPoAuthUserData
In my previous post I introduced my latest library PHPoAuthUserData that allows to abstract the process of extracting user profile data from various OAuth providers (Facebook, Twitter, Linkedin, etc). The library still need a lot of work, especially to write the logic to extract data from all the services available in the parent OAuth library. At the moment the library supports only the most common OAuth providers. I would be glad to support all the following services: Amazon, BitBucket, BitLy, Box…
New PHP library: PHPoAuthUserData
I recently wrote a new PHP library to simplify the extraction of user data (name, email, id, etc…) from various OAuth providers such as Facebook, Twitter and Linkedin. Is well know that OAuth 1 and 2 are great standard protocols to authenticate users in our apps. Anyway we often need to go further the authentication process and extract various information about the authenticated users. Unfortunately this is something that is not standardized and obviously each OAuth provider manages user data in very…