WeLovePHP Talk: Methodologies and tools used by the Splendia development team

Today I gave a talk at WeLovePHP, which is a quarterly talk and workshop series organized by Softonic in Barcelona. They also do one about JavaScript. I can highly recommend them if you are interested in PHP, JavaScript or related topics. I talked about the processes and tools we are using at Splendia. There are no pictures in the slides … sorry.

July 13, 2013 · 1 min · Christof Damian
International PHP Conference 2011 Spring Edition impressions

International PHP Conference 2011 Spring Edition impressions

I planned to post this a lot earlier, but I wanted to do the presentation at Softonic first and I am also very lazy. My employer was so nice to send a colleague and me to the International PHP Conference 2011 Spring Edition in Berlin this year. It was a three day conference. There also was one day of workshops, which we skipped. We also skipped most of the keynotes, because most of them were in German and didn’t seem very useful. I concentrated on the topics that interest me most: agile, unit testing, continuous integration, continuous deployment and Symfony/Doctrine. So here goes a quick summary of the stuff I think was good. DevOps fuer PHP by Johann-Peter Hartmann slides A very good introduction on DevOps, mostly introducing lots of tools and how they are used at Mayflower GmbH. I found especially the bits about self service virtual machines and clouds for developers interesting. They are using a combination of puppet, vagrant, fog and eucalytus for this. He also emphasized how important the culture in a company is to make this possible. All of this enables faster development and deployment. I plan to have a separate post about this soonish. 3*PHPUnit by Sebastian Bergmann This could have easily fitted into one talk. And if you have seen any of his talks before you could have skipped most of this too. I liked the quote about removing the release cycle and making it much more fluent, reference to the etsy blog (which is brilliant) and latent code patterns. None of this is new stuff though. MySQL, PHP - The current State by Johannes Schlueter Oracle man. Improvements in MySQL 5.5 and 5.6. memcached interface, which is currently in labs. Some examples of the asynchronous mysqli interface, which sounds really interesting for some use cases. Also information about mysqlnd plugins, especially the mysqlnd_uh one which allows writing these in PHP. All of this is not so useful if you like your ORMs though. Large-Scale Data Processing with Hadoop and PHP by David Zülke slides Highly recommended if you can see this at any conference. Very good presentation, starting with the use cases of sites which are producing lots of data and need to use map reduce to mine it. It continued with a live demo on a laptop, first tuning it until the speed increased by using map reduce and later connecting two laptops to show how well it scales. Next Generation API Documentation by Arne Blankerts I didn’t expect much of this last talk, but it turned out to be pretty good. As PHPDocumentor seems to be pretty dead, there is a need for a new system. CI systems usually also generate the API documentation, so it is important that this is also fast. phpdox seems to solve this, but it is still in an alpha stage so we have to wait and see. Miscellaneous I also saw a lot of other talks, but most of them were either introductions to things like node.js, nginx, JavaScript QA, Doctrine NoSQL and Symfony CMF. None of these contained any new information for me. Sometimes I wonder I should stop reading blogs and twitter two months before a conference, just to make them morei nteresting. You can find more summaries and links to the slides if available here: http://joind.in/event/view/681

July 7, 2011 · 3 min · Christof Damian

sphinx search config scripts

I just finished converting the bikesoup search to use the sphinx search engine instead of a simple doctrine fulltext search with filters. One thing I found helpful are sphinx config scripts. Instead of hard-coding the configuration you can use any scripting language to produce the sphinx configuration. The just have to start with ‘#!’ and sphinx will execute them and use the output as the configuration. This is the simplified version of my main config file /etc/sphinx/sphinx.conf : ...

February 13, 2011 · 1 min · Christof Damian
Symfony RPM for Fedora and RHEL

Symfony RPM for Fedora and RHEL

I am a big fan of Fedora and the PHP Symfony framework. Quite early I decided that it would be nice to have Symfony packaged as a Fedora package. What I didn’t realize was how long it would take me. I submitted my Package Review Request on the 12.8.2009. One of the first comments pointed to me to an older request, which was abandoned because the packager run into some difficulties with the Fedora guidelines. But I am not a person who gives up easily, so I continued fixing the package until it got finally approved on the 19.1.2011. By now the packages for Fedora 14 and EPEL 6 are in the official repositories and you can install Symfony by installing the package php-symfony-symfony. Why did it so long? The problem are the different philosophies between Fedora and Symfony. While Fedora has a strict no bundled libraries policy, Symfony comes with a number of bundled libraries to make it easy to install. Symfony also recommends to use a separate copy for each install, which also explains the bundling of the libraries. I agree with both opinions, but I still wanted an RPM for Symfony. I think it can be useful for a few cases: if you want to create a quick project without having another copy of Symfony aroundif you have multiple websites on a machine which all run the same Symfony version and you want to save memory and manage Symfony by RPM if you want to build your own RPM, which includes your own Symfony application and you need some place to start. you start with the RPM version for a fast set-up and later convert it to a bundled symfony, which is rather easySo, what libraries does Symfony bundle? These are in the vendor directories: doctrine, phing, propel, propel-generator, lime, swiftmailer. And then there is also sfYAML. I decided to do without propel support, because I didn’t want to update the rather ancient propel RPM that already was available. I created new packages for doctrine and swiftmailer, while Remi already had sfYAML packaged for use with phpunit. So even if nobody likes having Symfony packaged, the doctrine and swiftmailer packages will be useful. At the end of the review another problem was pointed out to me. There are too many versions of Symfony floating around. You got the one you get through the symfony pear channel (which I am using), the one from the website and the sandbox. The last ones as tgz and zip files. There are no checksums for any of these, which makes it impossible to find out if I provide the correct version or if someone replaced them on the site. So, what can one learn from all of this? don’t bundle libraries. The Symfony guys are very careful to make their classes well encapsulated and independent (even more so in Symfony2), the same holds through for library dependencieseven if you don’t manage to achieve you initial goal, other good things will come out of it whatever happens, you learn new things. By now I package a number of packages for Fedora. do not give upWill I try to package Symfony2 ? Unlikely. Unless Symfony makes it easier to install the core and bundles separate and stops bundling libraries it will be another two year to package it. Though they seem to be on the right track with the Symfony components and the bundle system.

February 6, 2011 · 3 min · Christof Damian
git workflow for the bikesoup project

git workflow for the bikesoup project

I have been one of the many converts to git and try to use it whenever possible. So far this has been mostly for smaller project, open source projects, Fedora and a little bit at work. bikesoup is my first bigger project using git. I started with initial development on the master branch and created feature branches which got merged back into master. Before going live for the first time I created a live branch. This is pretty much what you would do in subversion too, maybe with the exception of any feature branches. Once the site went live I created a feature branch off master for each issue in bugzilla I am currently working on. When I am happy with the fix I merge it back into it. And when the feature goes live it the feature branch is also merged into live. The diagram below shows this process. ...

October 2, 2010 · 3 min · Christof Damian