How we seamlessly moved from PHP to Django over 22 months(devblog.policystat.com) |
How we seamlessly moved from PHP to Django over 22 months(devblog.policystat.com) |
1) Why would you go through the process of switching the language. There are perfectly suitable frameworks in PHP, e.g. Symfony, that have the exact same approaches than Django and ROR. MVC, ORM and configuration over Convention over Configuration. Once you have a team that is good at a Language, you'll loose a lot in switching... and this leads me to the second question:
2) How can it take 22 month to rewrite this kind of application? A bit of CRUD and workflow should not take so much time.
WDYT?
I don't at all mean to say CakePHP or Sympfony would have been bad choices, but our technical team was such that switching languages wasn't a hurdle. I think the number of startups that have chosen Django or RoR as their platform of choice since mid 2007 in part validates our decision, but that doesn't mean other choices would have been bad.
2) It took 22 months to eliminate the last bit of PHP, but that was by no means the focus of development. During that time we made very large changes to the application based on things we learned from our customers. The reality is that no matter what technology we would have chosen, basically every single line of code would have been rewritten over the next two years. There was a little bit of us embracing technical debt in spreading the full port over 22 months: http://www.startuplessonslearned.com/2009/07/embrace-technic...
Thanks for the questions -wes
Well, if you want to know the truth of it:
If that language just so happens to be PHP, then they might have a whole bunch of reasons. A lot of people just don't like PHP; don't consider it to be a very fun or interesting language to program in, and in particular, don't consider it long-term viable for large, multi-faceted projects.
By reputation, PHP is a bit like JavaScript. JavaScript was this language nobody liked. It wasn't even considered a real language by most programmers. Some of it's design errors made it a language with low barrier to entry. Hence a lot of mediocre programmers made it unpopular with code that does not deserved to be called code.
This changed with people like Crockford and his 'JavaScript the good parts'...
It's pretty much the same with PHP. It gets the job done very easily... And once you know what you do, you can rely on it for large projects too. Especially with the changes that were introduced in the latest release: Namespaces, Closures, ...
In short though, we wanted to realize the obvious benefits of web frameworks over our poorly-constructed prototype raw PHP application (DRY, code re-use, reusable applications, MVC organization, testing tools etc.). We're now seeing basically all of those. Our code is clean and well-constructed because we were able to lean on the wisdom of the Django community. We use fully 24 different reusable Django applications, along with a couple dozen python libraries. Whenever we face a challenge, more often than not we can find a great blog post from the community that addresses a very similar issue and sometimes we can contribute back a little bit. When we hire new people, we can point them to Django's great documentation if they're new to Django, or they can jump straight in to our project and feel at home because it looks like basically every other Django project.
We're very very happy with Django and what it's given us over our own raw PHP. Other frameworks, like RoR would have given most if not all and more of these benefits, but the important thing in my opinion is that if you're doing a web application, you find a web framework that meets your needs. Honestly, when it came down to evaluating frameworks, it was RoR versus Django because that's where the community was. For me, it was Django because I like python's "one obvious way" versus ruby's many ways, which is a purely aesthetic judgement that plenty of people much more qualified than me make in the other direction. Once I realized that both of them would do a great job solving the problems our business was facing, I just made a decision and started writing code :)
Also, for about 2/3 of those 22 months, the development, operations and support team were the same guy, so that does have some impact :P