Web programming and Hosting

January 10, 2008

A little background here: I have worked for a long (maybe too long) time with PHP and for a year now I am doing all my web development with Python with Pungi, my microwebframework. Since my early days at Terràvista I’ve always used shared hosting. It fitted my needs for PHP and MySQL support.

I am still on shared hosting (ideias3 is hosted at dreamhost) and I keep planing to use since it’s way cheaper. I am enjoying Dreamhost, I have all the stuff I want there, (virtually) unlimited storage that I don’t imagine using even 50% of it. It also comes with some goodies such as Jabber and SVN support. Of course I would like a dedicated server, where I could run my own stuff (jabber bots, experimental stuff) and even a git server (yeah, I am planing to move some of my code to git). But I don’t want to afford that, and for running PHP apps, dreamhost is doing fine. I have a bunch of e107s and Wordpresses there. None of them are vital information. If you are looking for a stable hosting forget dreamhost. Has too many downtimes in their machines and runs a bit slow sometimes.

When I built Pungi, I made it in order to work through CGI since it would run (almost) everywhere. Those are my needs! I later implemented a Fast-cgi MVC way of running it (inspired a bit by web.py, Django and Nuno’s dispatcher) but I went through hell to get it working. Buzzwords is the only project that runs it. I’m back with CGI, I know it’s slow but I don’t feel it. Since I only use it for simple applications (that’s the target of pungi) it runs fine without any trouble.

I’ve set up Django in my Leopard and it was pretty easy and I know it’s possible to run django applications on Dreamhost but they don’t offially support it. Even web.py is too troublesome to install. So I’m sticking to old CGI with pungi for my websites. I know it’s sad, but it’s what runs smoothly in my shared hosting.

We also have a bunch of Rails applications running in Dreamhost, Sérgio’s blog, TwitterNotes and some projects still in dev stage. Once in a while the application stops and we need to manually reset the fast-cgi process. I say “we”, but it’s all Sérgio’s work, since he is the Ruby on Rails guy here. Well, there is a post on DreamHost official blog in which the lack of shared hosting support in Rails is a real problem. I agree: Rails will never be the next PHP if they can’t support it. John Gruber explains that the power of Rails is in being easy to code and not to deploy(as in set up environment and all). You can’t have both.

There are a few PHP MVC frameworks (Symphony, CakePHP and CodeIgniter) that do more than the 20% features of Rails that 80% of programmers use and works almost everywhere. Alhouth I hate PHP for its nasty syntax and language nature and evolution, the modphp for apache is the key for a quietly FTP-upload-only deployment. That and hKit are making me wondering if I should get back to do some PHP5 stuff again.

Tagged with: en, programming, web2.0, hosting
This post has 5 comments. Feel free to read them and leave your own.
If you do decide to jump back into the PHP world, definitely make CakePHP your first stopping point. I can't possibly describe just how fantastic it is. I did want to use Rails, but I ran into the same problems you have with it - but worse, since my host doesn't support it at all, not even a little. Ditto Django. In my mind, CakePHP is the best of the PHP MVC frameworks.
Changing programming language because of the hosting is not a very smart thing.
Shared hosting sucks, why not a slice in Slicehost, or another VPS solution?
For 20$/month you can choose what programming language you want. With the euro so high this hosting is cheap.

Read this: http://www.loudthinking.com/posts/21-the-deal-with-shared-hosts
I've read that, and also the answer from Dreamhost:

http://blog.dreamhost.com/2008/01/10/rails-is-as-rails-does/

I'm on the Dreamhost side here. I am not making money here (sometimes I am, but certainly not with RoR. All the paid projects hosted here are PHP-based. e107 to be more accurate) so I'm not paying $240 a year just to have a website running RoR. Although I agree it's tempting, and a sweet solution for a lot of developers (who will learn a bit of server administration with that).

I am going to renew now my Dreamhost account for $120 a year. I can afford that for my personal projects. I rather use some language that I'm not particularly fan of (PHP) and making it work in half the time I would take to deploy a Django/RoR application. And yes, since all my projects are small, this is priority to me. Which reminds me again that RoR and Django are not suitable for microprojects like mine. Thats the reason I've came up with Pungi.
Dis you read the comments too?

"Some hosts are willing to run Mongrel, but I guess Dreamhost isn’t."

ka-tching!

As James points out, Mongrel is the standard way to serve rails apps, so, if DH wants to provide Rails hosting:

DHRailsHosting.include?("Mongrel") #=> true
Luís, that was pointed out in the first post by DH. They aren't changing to Mongrel because it's the default way to serve rails.

The standard "opensource" (to exclude windows and IIS hosting) is apache (that may have the fast_cgi module). I believe in this case that one of the technologies (Rails) should adapt to the world of hosting (Everyone has apache as their main servers). I may not feel comfortable running my Django app in Mongrel and I want my PHP hosting running with mod_php.

As a costumer, I am with Dreamhost, not only because I'm their client, but also for other small hosts (that use Cpanel and Plesk) that I might be client in the future. Or else keep Rails applications for those who can/want to afford it.

Comment:

Author:
Email:
Website:
Comment:

About

I used to write in this blog, but I've found a better format to express myself. From now on, you may read my writings on ideas, programming and politics on my new wiki.

hCard

Name: Alcides Fonseca
Email:
MSN:
Gtalk:
Nov 24, 1988 40.197958, -8.408312

Tagcloud

Archives

Other links