Comment by bphogan
15 years ago
I'm interested to know why you ended that last statement with "unfortunately."
I'm a web developer who currently uses Ruby for my projects, and I've been looking at Clojure. I've looked at Ring, Compojure, and other things, and it all feels like "Hey, Clojure can also do web! Isn't that cool?
I don't think it's unfortunate at all that people use Rails for making web sites. It's what it's for. Want to make a multithreaded concurrent backend queue? Probably not a good fit for Ruby, but sounds to me like a great thing for Clojure.
But I'm interested in your "unfortunately" statement because wonder what I'm missing. What would using Clojure give me, as a web developer?
I meant that unfortunately Clojure will not be gaining very much popularity in web development.
I agree that Rails is a much better web framework than Compojure/Ring. If you are doing web development, it makes sense to use Rails.
You can use Compojure or Enlive for straight web development if you want. But, at this point it is inferior to rails.
So I guess what I meant is, I would like Clojure to be more popular. But, it doesn't look like it will be getting any major attention in web development any time soon.
I'm a biased source, but whilst I agree that Rails is the better option for most professional web development at the moment, the gap has narrowed rapidly over the last year or two.
In my opinion, the current things that Rails framework itself does better than Clojure are:
1. Model Validations
2. Database Migrations
3. Project skeleton/generator scripts
4. Table relationship sugar (belongs_to etc.)
I don't think that's a huge list, and it's actively being worked on. I suspect that we'll have a framework equivalent to Rails sometime early 2012.
Of course, this doesn't address the Rails ecosystem, which will probably be larger and more mature than Clojure's for some time to come. However, not everyone needs the full range of plugins available for Rails, so depending on the project, there may not be any difference between using Clojure and using Rails.
At which point it comes down to whether you prefer Ruby or Clojure as a language.
I wish this had answered my question more though - what is it that I'm missing. I mean, we have been building web frameworks for every new language that comes along. So what is it about web apps that we haven't solved? What does Clojure bring to the table? How will it help me make better web sites for my clients than Rails currently does?
When I switched from PHP to Rails, I did so cos it was easy to see the benefits - in 2004 there were no serious web frameworks, there were no easy ORMS that cut out the trivial crap I had to build from a week down to a day. I could quickly get the simple stuff out of the way so I could write code for the bigger problems.
So now here I am six years later, and I'm really really intrigued by Clojure, but I'm not seeing where it fits. I don't need a different way to build web apps... I need a better way. Otherwise I'm not that interested in taking a step backwards productivity-wise.
So, I'm looking to learn, cos I do think it's a fun language, and I've learned a lot more about programming while learning it. Maybe that's its role.
2 replies →
Use the right tool for the job. Rails and PHP are pretty good options for web development, and JavaScript is a very good option for small client-side scripts.
On the other hand, if the job is to create artificial intelligence, then it is Lisp that is the right tool for the job.