What can't rails do? When is it the right language?
I can hack together some php, but I'm no pro. I'd like to advance my skills and dive into a new learning project, but the question I can't answer is what language should I devote some time to? RoR has a lot of hype and Django sounds like a possible contender for the new hip framework. Or I could just continue to work with php. I've read a lot of debate over why one language is better and the most diplomatic answer is that all languages have there strengths and weaknesses and it just depends on what you are trying to do.
So here is my next question. What does that really mean to me? What is rails intended to do better than anything else? What is really difficult to do? What can't it do?
I understand the ideological explanation that it forces you to write good code, but that's not unique to rails anyways. I'm trying to figure out the real practical benefit ... the bottom line.
BTW .. sorry if I couldn't find the thread that already covered this because I'm sure it's out there.
13 comments
[ 3.1 ms ] story [ 35.7 ms ] threadComing from PHP, you'll probably see some benefits right away.
I've personally found it invaluable and I'd highly recommend the framework to anyone looking to learn a new tool for building web applications.
You should learn rails, but it will require learning ruby.
That said learn rails, start with a small project. Something that helped me learn how some of the rails magic works was to install plugins, then hack/mod them and read the source code. You'll pickup all sorts of neat tricks and tips.
Remember if you having trouble doing something or even wrapping your head around it, google around as chances are someone blogged about it or explains it.
To answer your question, the only thing that rails doesn't do well is multiple uploading thing, but you can always farm out uploading work to merb.
Rails is a very neat framework, which means it comes with all the pros and cons of a framework. The pros are that it can get you up and running very quickly, and it's really good at hiding the tedious details you would normally have to deal with. I think it's actually helped me write better PHP code, to be honest. The cons, of course, are that you have to learn it, like any framework it can sometimes get in the way, and it might be more than you need for certain projects. Rails is great for anything that resembles a CRUD app, and it forces you to stick to the MVC model; if you're doing something very different, it might not be the right tool.
One thing to consider is that PHP works on pretty much every *nix server out there out of the box, while Rails might take a bit of fiddling to set up and administer.
I understand there were some significant changes. Does that mean if I'm learning this from scratch that I should avoid the 1.x way of doing things?
http://www.amazon.com/dp/0321445619/
By and large, most of the 1.x stuff will still work, but it won't necessarily be the most efficient use of your time; lots of the 2.0 changes make things easier.
"However, edge Rails still comes in handy sometimes. For example, it allowed us to extensively cover Rails 2.0 features in this book prior to the actual, official 2.0 release"
When your starting from a clean slate although, it's a different story. Then you can use rails conventions & restrictions and everything runs a lot more smoother. But if you got previous systems to build on, it's a bit more extra work. Rails is an opinionated asshole (like steve jobs), and when your not willing to back down, you got a lot of extra work to go through.
Also sometimes rails is just too complicated or inflexible for the job and whipping up something quick & dirty in 500 lines of php would do you far far better.
I find Rails programming to be really fun. However, I'm approaching it from the opposite end - the J2EE side, where everything takes a long time to configure.
Django seems cool - if you were to learn that rather than Rails, I don't think it would hurt too much, if at all. I expect that once you learn one, you'd be able to pick the other up pretty quickly. Despite the impression internet posts may give, Python and Ruby are pretty similar languages, and both worthwhile and enjoyable, if you ask me.
One thing Rails has going for it is that it's pretty widely used (compared to Django, AFAIK), so there's a lot of documentation out there. Although, beware of some stuff that may be out of date with Rails 2. Definitely pick up The Rails Way if you do learn Rails. You may want to get the pickaxe book as well. Those two should have you pretty much set as far as books go.
The downside you may face is the shared hosting situation. I understand Dreamhost supports Mongrel (the web server commonly used to serve up Rails) now, but haven't used it. My experience is that VPS is the way to go, rather than start on a shared hose and move to VPS.
Despite some impression certain internet writings may give, plenty (most?) of us in the Rails community are friendly and more than glad to help someone get going with Rails. If you do decide to learn it, feel free to contact me if you need any help getting things running.