Monday, January 23, 2012

Decisions, decisions...

Oy. Do I create work for myself or what?

I'm in the middle of figuring out a Significant Project; it's something for myself, but it needs a web host. And I've yet to decide the language; it was originally going to be in PHP, but then I thought "Why not Ruby?" I like Ruby; it's object-oriented (<- technical term for "it deals in things", as opposed to PHP, which deals in whatever happens to be at hand and then some...), it's got a vibrant community, some cool add ons (gems, as they're called) and it's easy. PHP is a tad faster; it has object oriented stuff, especially in the latest version (5.3) and has lots and lots of information about it out there. Which is a really good thing, a good thing, a bad thing and a really bad thing. Not necessarily in that order. Here's the problem: there's so much "stuff" out there, you find yourself wondering which is accurate. After a few hours you sort of get a feel for whom to trust, and while that's no different to the Ruby world, for some reason the PHP world seems to have more than its fair share of people who say "it has to look like a kludge! [because it's always been done that way!] and [because you don't need that fancy new feature!]" They are, quite frankly, high-tech Luddites. Of course you need that fancy new feature! That's why it was dragged, kicking and screaming, into existence.

Of the things I like about PHP are its namespacing (technical term for imaginary boxes you put code that does stuff in), it's extensive documentation, how easy it is to get started and how ubiquitous it is out there in "venal web host land". (It is venal...) On of the things I don't like about it are it's roots; they show through all the time. PHP was originally designed as a basic scripting language; it was stuck that way for years - if you wanted a quick website, you mixed HTML and PHP together and got what you wanted. As it developed, it was enhanced with this feature or that feature; the whole process was a tad arcane and definitely messy, to be honest. Its syntax (its grammar) is all over the place as a result. It's worse than English, to be honest! But it is easy to get started. Finishing is harder.

Ruby, on the other hand, is pretty much the vision of one man (Yukihiro "Matz" Matsumoto). He developed it around about the same time as PHP was started - the mid-90's. (Indeed, I remember reading books, at the old McGraw-Hill bookstore at 6th and 50th, and playing around with both languages back then. [Regrettably?] I didn't spend enough time with either to "learn" the language.) He took what he saw as the best of other languages and combined them. The result is very elegant, quite easy and fairly powerful. If I had to come up with an analogy, I'd say it's a bit like an old British sports car, or an oldish motorcycle, versus one from a few years ago. The analogy: it helps to know what's going on under the hood (Ruby), but it's essential with the old British sports car or the oldish motorciccle (PHP). I know what's going on under the hood; I'm not so sure I should care as much as I have to with PHP!

Delving deeper into the pluses, PHP has some incredible frameworks out there. Comprehensive, easy and quick. (Which still doesn't explain Drupal, but then again, I'm not sure anything can...) Ruby has... Ruby on Rails. It's as if Ruby on Rails was developed and everyone said "oh, okay!" and forgot that competition is a Good Thing Indeed. Not that RoR isn't good - it is. I'm just not sure why it's pretty much the only option out there. There is a list of Ruby frameworks on Wikipedia; there's 8 of them altogether. Contrasted with PHP, which has about 23 zillion of the things, it's a rather limited showing. (Makes picking one a bit easier, however.)

Anyway, I decided to see what people thought of the hosting options. There's a lot of spam out there... I've heard Ruby can be difficult to get working; so I decided to start there. Typing "PHP hosting" into Google is a bit like trying to read Twitter's entire output for a minute. Ruby was simply easier. This post about Linode, by a blogger I've come across before, Sacha Chua, was interesting. As was this one from Dennis Clayton.

So... I now have a decision to make. Do I stick with PHP and the framework I've chosen, along with its attendant issues (which caused me to re-evaluate my options in the first place), or do I toss it all out (something I have no problem doing) and switch to Ruby? The hosting question is the most important; I don't want to go with GoDaddy - I'm still cross they supported SOPA - but I don't want to end up paying a trillion dollars a month for web hosting. And I certainly don't want to spend a lot of time writing this particular code - I've got other projects lined up that need some TLC and Attention.

Decisions, decisions... (Thoughts, as always, are welcome.) :-)

Update: I know you're dying to know... What's that? You're not? You don't even know what you're supposed to be dying to know? Oh. Just so you know: I'm sticking to PHP. The reason? I've started, and Ruby doesn't have the dynamic qualities of PHP.    :-D

Carolyn Ann

6 comments:

  1. I recommend Voodot Hosting. It's a small operation, and not necessarily sleek. OTOH, in the course of getting my modest project hosted, I've helped them work some of the bugs out of their outgoing mail, and they've pointed out how some of my code is generating lines in the error logs. They've also installed libraries on their system at my request. At any rate, I applaud your decision to steer clear of GoDaddy.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Hi, Lori! I keep reading bad reviews of their offerings; and then the whole SOPA thing was the final straw. I'll take a look at Voodot. Thanks for tip! :-)

    ReplyDelete
  4. I don't know whether this info is of any use.

    ReplyDelete
  5. I saw that when I was doing my "research" (perusing the web, typing seemingly random characters into Google and basically doing anything but work...) I didn't read it and should have!

    The biggest thing that's persuading me to PHP at the moment is Hip-Hop, Facebook's PHP to C++ compiler. That, along with some other changes to the system I'm developing/writing, should make it all quite compelling. :-D

    ReplyDelete
  6. Oh, where are my manners?!? (Under the couch, it seems.)

    Thanks, Lori!

    ReplyDelete