Posts Tagged ‘php’

PHP To Django – Lessons From Our Migration

Wednesday, March 11th, 2009

I have been a PHP programmer for a long time, it was the first web scripting language I learnt, and I have built some very cool apps, and it has served me well over the years.

However running a team who code in PHP has a lot of drawbacks:

  • No de facto framework
  • No coding standards
  • Relatively slow benchmarks

Frameworks Rock

I personally love frameworks, who wants to code boring CRUD (create, update, delete) statements, build yet another admin, or yet another news management feature. Like all good programmers I am inherently lazy and hate to code the same thing over and over again.

PHP lacks a really good unifying framework, there is no de facto framework; Ruby has Rails, Python has Django, PHP has … CakePHP, Symfony, Zend Framework and Code Ignitor.

I have used all of the mainstream PHP frameworks:

  • CakePHP – I like the syntax, but the docs are poor and performance is a real problem
  • Symfony – I could not get my head around the workflow and it is very slow
  • Zend Framework – does not seem like a framework to me, more a collection of libraries
  • Code Ignitor – is the best of a bad bunch, and personally my favourite for PHP

These frameworks all compete with each other, instead of all working together to help build one PHP framework to rule them all.

Learning Curve

People love PHP because it is easy to pick up and get going with, you can write your first PHP script very quickly, and have something working in an afternoon. This works for good and evil, as there are so many people out there who code PHP who actually do not understand what they are doing. There is nothing inherently wrong with this, but this tends to mean that PHP has less coding standards.

On the other hand, getting Python to work is not as easy for a new developer and deploying a python site is even worse. Also as Python is a OO language it seems scarier to most new developers. I love Python as it just fits with my philosophy and I love the way that it FORCES you to write beautiful code.

Why Django

As I mentioned that as a PHP shop we have already looked at all the mainstream PHP frameworks and none of them in my opinion are good enough.

I had a look at Ruby on Rails, but the publicity and hype around it, coupled with the reported scaling issues made my wary.

My friend and fellow CTO Ben Philips over at Playfire, suggested that I check out Django. I had a read of the documentation and I was seriously impressed with the feature set. It was not the easiest learning curve there are a lot of pages to read on the site to get you up to speed.

I also started listening to the excellent podcast, this week in django, and I fell in love with the philosophy and elegance of Django.

Installing Django

Installing Django on my Macbook Pro was not an easy task, it took me a whole evening to get up and running; I had to tweak the MySQL python library and I needed to install XCode developer tools to get the Django built in webserver to work. This was not a good start for me!

Our First App

I did persevere through the installation and I was glad I did, the Django API is very elegant and for simple tasks very easy to pick up. I did have some issues managing images, but the Python Imaging Library helped me there. Also I had to get my head around the middleware stack, and the templating language. After a day or so I was ready to build my first app.

I wanted to really try something in a real working environment, so I decided to build the Oracle Acquisition App in Django. In less than two days the app was built including LDAP requests to the corporate directory, and SSO authentication into the Oracle unified sign on.

What I Liked

I loved the loose coupling of URLs, the encapsulation in models, lazy SQL queries, well defined code layout, adherence to DRY principles, admin out of the box and the powerful template language.

What I Disliked

Importing functions into the models and views was tiresome, the sometimes cryptic error message, no SQL query logging and lack of hooks for the admin (which had since been rectified).

The Future

Overall I love Django and I cannot imagine going back to PHP, the next step is for me to sell Django into the Company. It will take some effort of the part of the developers who cannot code in Python, but most good programmers can pick Python up very quickly.

There will need to be a migration process, but I will be slowly migrating all of our systems and future projects over to Django and will be recuiting a specialist Django developer soon. If you are a superb Django developer who is looking for a job in London (and you know a bit of PHP), then have a read of this post.

We’re Hiring – Trying a Different Approach To Finding Excellent People

Tuesday, March 10th, 2009

In the past we have used job boards and recruitment consultants to find the best people to work here at Busara. Sometimes this approach works and sometimes it does not, but one thing is for certain, this approach is going to be a long and very painfully slow process.

So this time I am going to try something different, I am going to advertise here on my blog for the ideal person to join the team. I am also going to add the job listing on some of the more niche sites like Djangogigs.com.

About the role – PHP & Django

We are looking for a superb PHP and Django developer with a passion for all things digital. Your role will be to manage the day to day running of projects and report directly to the CTO. The role will be a mixture of programming (60%) and project management (40%). The role is client facing at times, and will involve direct client contact to help them achieve their vision. It also involves a high degree of autonomy, and the ability to work with and code with an existing development team.

Here is a link to the person and job description. If you are interested please email me at cv at madebybusara dot com (no agencies please, we do not use them).

You can see our work and philosophy on our website: www.madebybusara.com.

Interview process

The interview process is very informal and friendly, and we are looking for the right person as much as the right skill set:

  1. Send in your CV and portfolio of work
  2. We will find the ones we think are best and create a short list
  3. We will invite you in to our office for an informal chat, nothing heavy, we just want to get to know you and see if you fit in with our culture
  4. If we think you are the one for us, we will invite you back to meet the team and they might ask you a few questions
  5. If the team think you are the chosen one we will give you a call with a job offer the same day

About Busara

Busara is a global design and technology agency based in Clapham, south London, and Perth Australia. We have a vibrant, creative, hectic office full of energy and buzz. We work some of the biggest consumer and technology brands in the world, and are always pushing our solutions and ourselves. We are very collaborate with both designers and developers working very closely with lots of joint work and brainstorming. We have plans to open another international office within two years.

Here are some pictures of the office:

Busara Office Busara Team

Here is a video of our Christmas party last year, which was so much fun!

PHP Certification – Is It Worth It?

Saturday, February 28th, 2009

At the start of every year I like to set myself a few targets to achieve, I usually pick three professional goals and three personal goals.

This year one of my goals was to really push myself to achieve some certifications, I am doing this for a number of reasons:

  1. I love learning and challenging myself
  2. It looks good on the CV – which is good personal branding
  3. It is good validation for the company to say that we have certified programmers

I have been really into Python recently so before I leave my PHP days behind I wanted to look into PHP certification.

So I went to the Zend site and did the practice questions that they have and I answered 3 correctly out of 9! I was horrified that I did so badly! However once I thought about it, how often to I actually use the native PHP functions? Most of the time I am using a framework or wrapper functions and have no idea how many arguments array_splice() requires.

So I bought theĀ Php Architect’s Zend PHP 5 Certification Study Guide and had a read over the weekend to once again familairse myself with the syntax and breadth of functions available. I then booked myself in at the test centre at Pearson Vue and took the test. You have 90 minutes to answer 90 questions, some of the syntax questions were quite challenging, but the questions that tested application knowledge were pretty easy. After only 45 minutes I completed the test and my pass mark flashed on the screen, success!

So was it worth it? I really wanted to say that is wasn’t but I really enjoyed the process and along the way I learnt some cool things about PHP that I don’t use on a regular basis such as reflection, and exceptions (which I use all the time in Python).

If you are new to programming I think that the PHP certification is a very valuable learning curve and covers a wide range of topics that will help you become a better programmer. If you are a seasoned programmer, I don’t think the content will be of that much value to you.

For what it is worth, I am happy I took it, and even happier that I passed!