Improvement and Efficiency South East (IESE) is one of nine Regional Improvement and Efficiency Partnerships (RIEPs) and was established to work with the south east’s 74 local authorities and 9 fire authorities to facilitate and fund projects that will drive efficiencies and service improvements across the region.
In year one, IESE enabled councils in the south east to make £18.5million cashable savings and estimates over £40m cashable savings in year two. IESE is governed democratically by members across the south east and managed by a south east chief executives’ board.
We worked with them to create a new, more engaging and easy to use site that allows members of the public and local councilors to quickly access the latest tools and news available.
I’ve been a PHP developer for many years. From my earliest little scripts to our latest fully-fledged web 2.0 apps, PHP has been at the heart of it all. I can read, write, and debug PHP faster than Paris Hilton. If a client wants a new website with any kind of functionality beyond XHTML etc. then PHP it was. I could do everything I wanted, and anything I couldn’t do there’s a billion tutorials and classes on the internet.
Yet, recently its not been that great. Big apps are taking longer and longer to debug or roll out new features. Despite writing nice commented object-orientated code, I’m still re-inventing the wheel too frequently for my liking.
Now, these are two things I hate doing. Really do not enjoy. At all. Its summer, there’s a beer festival in Cambridge, and loads of great music. Working freelance, I’m paid for results, not for now long it takes me to work out why PHP didn’t do what the manual said it would.
I tried to get round this by standardising all my classes and generic server structure, and guess what? It started to look pretty much like a Rails app. Oh dear, time to think seriously. Before getting into the Ruby though, I did know of Ruby a year or two ago, but never made the switch (in truth, I took one look and left). Why?
I know PHP, I don’t know Ruby: clients need the project delivered now. This one is pretty relevant to any fundamental change. You have projects on the go, or are due soon, and you know PHP – it works. Even at the planning stage, I can usually get a very accurate estimate of the time a PHP project will take to develop. Ruby has many, many unknowns. Will it support all the things I’ve promised the client? How long will a project take? I can’t charge my clients for the extra time it takes me to learn a new language.
Losing control. PHP lets me control everything; right down to the errors it gives me when it doesn’t work. I know what every part of my app is doing, because I wrote it. Ruby seems to do a lot of stuff for me – how does it know what I’m wanting to do?
It seems too easy. This, I must admit, was my main reason for putting it off. Back when I first started learning PHP (and C, C++ for that matter), your first application was called ‘Hello World’; it did nothing but output the words ‘hello world’. Now with Ruby, your first app is a blog. I mean really, what’s all that about. A blog app should be hundreds of lines of code even for the basics, let alone validation, displaying and so on. Sorry, but anything that can give me a blog app out the box is like one of those Nigerian email scams…
Yet despite these hesitations, I took the leap and got stuck in. And you know what, it was magic.
There were the usual initiation woes – like the first time I switched to Mac, or the first time I played the Viola – were all the ability and creativity you had on your previous system suddenly get taken away, and you’re reduced to scrabbling around to get things working. But, these things are inevitable, so I kept going.
Good start-up tutorials
Ruby on Rails Guides (http://guides.rubyonrails.org/). Fantastic overview of the basics. A lot of it you’ll get through quickly (the MVC model, for example, is simply a nice logical extension of good coding practice in any language), but it does get you immersed.
Learning Ruby (http://www.math.umd.edu/~dcarrera/ruby/0.3/). Rails is of course more a framework than a language; Ruby is the actual language behind it all. This is probably the biggest learn: all the new syntax and control flows. The concepts behind Rails are probably pretty clear to an experienced developer, it’s the language that’s different.
To finish then, I’ve written a list of the top five tips for PHP developers switching to Ruby. These are the points I wish I new before I started (or maybe I don’t, I certainly learnt a lot doing them the wrong way first)…
Key points for PHP developers:
Rails wants you to do all the things your mother always told you. Get into the groove of a Rails App – it wants you to write DRY code, separate your models, controllers and views, write testing code, and so on. Go with it, don’t fight it.
Don’t micro manage.Rails, for better or worse, takes care of a lot of stuff behind the scenes. Its not the perfect solution for every project, but if you think its right for you, then let Rails do the heavy lifting for you.
Trust the syntax. I know it feels dirty and naked not ending each line with a nice ‘;’, but apparently the world doesn’t come to an end if you don’t. Write your code like natural language, then tidy it up a bit. It’ll probably work.