I've never used Rails or Heroku, so I have a question - how many companies can depend on deploying to Heroku? Is it really flexible enough?
I have only used Python + Django. A few solutions are starting to crop up for Heroku-like easy deployment. But I have some special needs that I don't think will be covered well by these services (for example, I have to do Comet, which means setting up an extra server to do Comet, etc.)
My gut has always told me that Heroku is fine for deploying your application initially, but that most companies will quickly outgrow it and have to resort to manual deployment solutions.
By the way, in my case, I started off with deploying on DreamHost, which is almost brain-dead simple. Then I moved to WebFaction, which gave me more flexibility but I had to do some extra stuff for deployment. Then at some point, when I started making more serious apps, I moved to using VPSs and encountered exactly the nightmare the OP is talking about. I suddenly had to learn how to deploy from scratch, which involved learning to install and configure various programs, and get them working together. It was... not fun.
As long as you don't write to the file system, and you don't need non-web, non-worker, non-cron server processes, you're probably OK on Heroku. You also have to be willing to trust Amazon and Salesforce, which isn't too big a stretch in many industries.
Their WebSocket support is still in beta, and it's not clear whether it supports Comet on non-WebSocket browsers: http://addons.heroku.com/pusher
On the other hand, if you need to respond to ZeroMQ messages, or if you need to poll S3 every 5 seconds, Heroku's just not going to work for you. In that case, you can either toss everything onto a server running Phusion Passenger, or set up a real deployment infrastructure with Chef (or Puppet). This can take up to 2 days for a sufficiently messy project, assuming you want to fully automate everything, and I agree that's it's not fun.
(Edit: Chef provides pre-packaged deployment instructions for Apache, Unicorn, Rails, ha_proxy, a database, etc. This takes a couple of days to work through the tutorials and set everything up. The setup is a bit of a drag, but it's sweet once everything is working.)
It can take much longer for someone who has never built a server at all. Learning to install and configure Apache + mod_wsgi (in the proper modes) etc. is the hard part. Doing it the second time is much easier.
So I take it that you agree with me on the brokenness of web development, even if you consider that setting things up is not all that bad?
You mention the layers themselves as a headache, and I could certainly have added them to my rant - for many, they are a nightmare by themselves.
But let's just assume that we're all seasoned developers and that no language or sum of languages is too scary for us, as long as they interoperate correctly. We still have a nightmare, here, because these languages simply do not cooperate. Just getting them to work together takes considerable amounts of glue.
And please tell me if I missed something, but last time I checked, RoR + Heroku really didn't solve much of the glue nightmare.
I completely agree that web development is a mess. I just don't think that the first major problem described in your rant (choosing a programming language, web server, database, server-side framework, and client-side framework) is actually a major problem these days: Just pick any modern stack, and use the defaults.
And please tell me if I missed something, but last time I checked, RoR + Heroku really didn't solve much of the glue nightmare.
Rails provides excellent glue between the database and server-side code, at least if you like the sort of APIs provided by ActiveModel. (I do, some people don't.)
Rails provides less glue between the server-side code and the client-side code, at least out of the box. Basically, it pre-configures Prototype, and makes it easy to do basic AJAX stuff via view helpers and unobtrusive JavaScript. If you prefer jQuery, you can switch over in about 30 seconds using jquery-rails.
Rails does not provide a default client-side toolkit for highly interactive JavaScript applications, such as those typically built using Backbone.js or SproutCore.
Actually, the first problem mentioned was not choosing, it was _dependencies_ and then _documentation_.
Also, if you add additional libraries there is no dependency hell because RVM and Bundler are each a work of art.
That's the _dependency nightmare_ you're mentioning. I agree that RoR solves a non-negligible chunk of it. But I have never seen a "rails new foobar" configure my SELinux or introduce any sane security policy in the database, for instance. So, the nightmare is still here.
The _glue nightmare_ appears when you're trying to pass non-trivial data from the client to the server, or worse, from the server to the client. Or when you're trying to validate the heck out of input data to ensure that there is no CouchDB injection or SQL injection or anything such.
Also, the "I don't want no glue" line is a lie. Any such framework to coerce Web Development into a single language is all glue, all the time.
Further, he has a marketing problem. Most seasoned developers probably will not flock to a framework that prevents them from writing their own HTML/CSS/JS/SQL, so he'll have to grow his user base on people who haven't been programmers for long.
The second time through, I can probably do it in under 60 seconds.
rails new my_app
cd my_app
git init
git add .
git commit -m "My application"
heroku create
git push heroku master
Creating database tables adds a few more commands: rails generate model post title:string body:string
# Commit new files.
rake db:migrate
heroku maintenance:on
git push heroku
heroku rake db:migrate
heroku maintenance:off
I imagine that Microsoft, PHP and Django have something similar, or are working on it as we speak.As someone new to both Ruby and Rails, I found the process of installing both + gems and anything else I needed to take most of my first day coding, not to mention if I install on two machines.
I'm no programming guru, but it seems to me that even Rails could be simplified.
[0] https://rvm.beginrescueend.com/ [1] http://gembundler.com/ [2] http://rubyonrails.org/screencasts/rails3/bundler-action-mai...
I read this article[1] and it changed my life.
For example, Rails + Heroku gives you sensible defaults for your programming language (Ruby), you web server (Heroku), your database (PostgreSQL), your server side web framework (Rails), and your client side web framework (Prototype—perhaps not my favorite, but certainly a default). You can have this all set up from scratch in well under half an hour, your first time through.
If you don't like Rails, you can find similar pre-configured environments elsewhere.
The real web development headache is just how many of these layers you need to understand: SQL, a server-side language, HTML, CSS, JavaScript, and multiple libraries designed to make server-side and client-side coding sane.
According to other comments in this thread, the author has a commercial product designed to address the issues he raises. But if so, he does not seem to realize that he's working on a problem with many existing solutions.