Friday, November 7, 2008

That's not change we can believe in

Yesterday president-elect Obama's campaign unveiled their transitional website, change.gov. So, as someone who's interested in these things I immediately began to look at what language, framework, or software package they were using. The first thing I saw was that they were using Apache, however beyond that there were no distinctive headers. None of the pages had tell-tale extensions like .php or .aspx. However, one thing that struck me was that most pages were at a url in the form of /page/*/, which is the same format of the Obama campaign website, which I knew was powered by Blue State Digital's CMS. On the Obama campaign's site however, there were a few pages with those tell-tale .php extension, so I've come to the conclusion that the new site also uses PHP. And to that I say, that's not change we can believe in.

PHP has been something of a powerhouse in web development for the last few years, noted for it's ease of deployment and quick startup times, it's drawn in legions of new users. However, PHP has several notable flaws. Firstly, it doesn't encourage best practices, ranging from things like code organization(PHP currently has no concept of namespaces), to database security(the included mysql database adapter doesn't feature parameterized queries), and beyond. However, this isn't just another post to bash on PHP(as much as I'd like to do one), there are already plenty of those out there. This post is instead to offer some of the benefits of switching, to Python, or Ruby, or whatever else.

  • You develop faster. Using a framework like Django, or Rails, or TurboGears let's you do things very quickly.
  • You get the benefits of the community, with Django you get all the reusable applications, Rails has plugins, TurboGears has middleware. Things like these quite simply don't exist in the PHP world.
  • You get a philosophy. As far as I can tell, PHP has no philosophy, however both Python and Ruby do, and so do their respective frameworks. Working within a consistant philsophy makes development remarkably more sane.

If you currently are a user of PHP, I beg of you, take a chance, try out Ruby or Python, or whatever else. Give Django, or TurboGears, or Rails a shot. Even if you don't end up liking it, or switching, it's worth giving it a shot.

5 comments:

  1. I call bunk. There's nothing wrong with PHP when used propertly. In the context of this post, there's no reason to push Rails, Django or TurboGears. If they know PHP, CakePHP or CodeIgniter would do just as well.

    ReplyDelete
  2. Alex, I agree. In the least the software that runs the site should be open source. Change would be a piece of software that is built by the people, for the people. If there are no links to how the site was built in the about section and you have to guess then it's not change. I know BO has spoken of using IT and making it part of his vision. Well I hope he realizes that the future of IT is open and free.

    Regarding PHP and it's popular usage in the past, it's pretty obvious that PHP does not have many of the design goals that Python has. I also noticed in using the my.barackobama.com campaign site that when I started to dig into the site more, like using some features of the "neighbor to neighbor" calling program, the site architectural design/URL structure began to fall apart. It started to feel like parts of the site were squeezed in as is and lack of integration. I don't know if we will see open source emerge as I would like it, but one strange that happened on Nov 4, almost immediately after BO was elected I heard the words open source from the tv. I took a double take and sure enough on msnbc someone had started chatting about open source and the democratization of the internet and software.

    I don't know if open source will take real shape in the next term or not, but I hope it does soon. I'd like to see our health care system run on open source and BO has talked about streamlining these paper bureaucracies.

    On the change.gov site I noticed a form where you can submit your vision. It might be worth it. http://www.change.gov/page/s/yourvision of course the url makes you think a bit. ;)

    ReplyDelete
  3. They're not trying to build awesome software. They're trying to convey a message. A pre-built CMS helps them convey a message. A web framework helps them build awesome software.

    ReplyDelete
  4. This is such a load of BS.

    As if Obama himself sat there choosing a web framework...
    What kind of deluded idiots are you?

    ReplyDelete
  5. If Obama was a programmer though.. I think he would program in python.

    ReplyDelete

Note: Only a member of this blog may post a comment.