Open Source

Screencast - phpProxyBuilder - proxy design pattern and AOP for PHP

I am very happy to share my first-ever screencast.

Screencast is about my open source project called phpProxyBuilder. It is a PHP library aimed at code reuse and promotion of proxy design pattern in PHP. It is heavily inspired by AOP and helps to implement cross-cutting concerns once and reuse the same code forever. It also promotes some of my favourite design principles like decoupling, testability, single responsibility and code reuse.

I wanted to create some screencasts for a while but I found it difficult to get the right tools. Fortunately screencasting and video editing are much easier on linux now and i hope to share more screencasts about PHP, open source and software design in the future :)

Symfony2 meets Drupal8 + Varnish and ESI

I don't know if everyone will agree and notice the significance of this event but for me this is a MAJOR milestone in PHP community evolution. Drupal 8 will integrate with Symfony2. THIS IS GREAT NEWS!

I always liked Drupal. It is amazing! Community is huge and provides thousands of modules to solve almost any web-related needs you may have. To make it really embarrassing for the enterprise-level CMS solutions, Drupal often beats them in terms of features and quality. I have seen enterprise-level CMSes and they were just a legacy JUNK! There is no question about it, Drupal is awesome! Symfony2 is the sweetest PHP framework there is. Great architecture, patterns, cleanness, consistency, interfaces, testability, dependency container - basically all you need.

Zend Framework 2 Number Range class mini proposal

I have been working on a little piece of code on the weekend lately and i thought it would be useful to have a numeric range similar to Groovy's range. Maybe there is such code already but quick google search did not give me anything useful so i hacked it together myself.

Later on I thought maybe it would be worth sharing it so here it is.

Wiki does matter, why should you write documentation

I know it is obvious but i guess people still ignore the fact that documentation and knowledge sharing is important. Through my career as developer (so far 8 years) i have not joined a single project nor company that would have a proper up to date documentation. As a result it takes half year to catch up, instead of 3 months, for every new person joining the team and it causes constant headaches. I believe that could be improved if there was proper high / mid level documentation.

I know, I know, all the 'lazy developers' will jump and scream "but you should not waste time on documentation! code should document itself!". Well great, should IP addresses, web services, database schemas also document themselves? Being lazy is not a virtue, even that it seems to be cool.

Compiling and building PHP 5.3 on Ubuntu linux

Building PHP requires quite a bit of effort. There is a lot of dependencies before PHP 5.3.3 can be compiled plus every Linux distribution packages libraries in some different way. The result is that you have to install several Ubuntu packages before you can even compile PHP 5.3. Then you will need some more to make it run : )

This post shows how to make a development php, it is not supposed to be used for production as i am overriding default paths and you probably don't want to be doing that.

To make your and mine lives easier i put together a script how to get PHP 5.3 running on a fresh Ubuntu linux installation.

How to change wordpress frontend language, update translations or translate themes

Wordpress is a very nice blogging solution but does not really allow to create and publish multilingual blogs out of the box. The good news is that it allows you to set the language for frontend so that users see localized messages.

Writing wordpress posts in your chosen language is one thing but then you make sure buttons, error messages and other labels are translated. This is where gettext and translation files step in.

PHP Circuit Breaker - initial zend framework proposal

Circuit breaker is a component that supports high relaiability of web sites. It helps discovering, at runtime, which of the external dependencies are failing. Having that knowledge application can avaid wasting time on trying to call them untill they are back online.


Current PHP application may depend on several databases, soap/rest web services, external cache providers or data grids, mail, ftp etc.

It is important for the application to keep on functioning even if some of these dependencies fail. To do that application has to be able to track when services become unavailable and when they become active again.

If a database or web service is down we want our application to detect it as soon as possible and react accordingly. Maybe application has a secondary slave database that can be read from? Maybe there is a way to load cached data? If all fails maybe its best just to hide some function or display message that service will be fully functional soon. What we want to avoid is making every user wait 30s for the database connection (which has to fail any way).

UPDATE: project was moved to github a while back as an independant PHP library php circuit breaker

Setting mssql query timeouts in PHP for each call separately - mssql extension patch

I have spent some time trying to figure out the way to set query timeout in mssql and its not easy. Below you can see the process i am using now, unfortunately it does not work with the current PHP mssql extension (to make it work you will need to apply my patch or get latest sources).

Why do you need the query timeouts?

In high availability sites you can not allow any pages to timeout. If there is a problem with the DB (index broken or server overloaded) You still want your customers to see the page on time. It may have banners missing or some footer broken but its still better than waiting 30s and getting a blank page. After 2-3 seconds most users will click refresh button (putting the last nail in your coffin).

New decade, Google tools are the coolest

I have just upgraded to the new 3.6 Picasa from google and i have to say its just amazing! It is just hands down the coolest photo editor ever!

I know it does lack a few features but seriously! Not only it has great filters, retouch cropping and automated editorial features! it now comes with face recognition and it is just amazing ! i have scanned all my photos (takes a while) and its just amazing how well does it recognize faces. Cherry on the top is the fact how easy is it to use it.

Just in case you are not using it, try Google Earth with its photos and places, street view, markers, xml export and search .... AMAZING !

Another Google tool i absolutely love is Google Analytics ... i still can not believe its free! the best traffic analysis tool i have seen.

Mixed feelings about PHP vs THE BIG GUYS

Lately i was readin some more about current Java based frameworks and development platforms. We even had some presentations from TOP players (Ill call them the Bestests) in Java world. To be honest i was very unimpressed. I started to look more critical on the Java community.

Syndicate content

About the author

Artur Ejsmont

Hi, my name is Artur Ejsmont,
welcome to my blog. I am a passionate software engineer living in Sydney and working for Yahoo!

Web Scalability for Startup Engineers

If you are into technology, you can order my book Web Scalability for Startup Engineers on Amazon. I would love to hear what are your thoughts so please feel free to drop me a line or leave a comment.

Follow my RSS