views:

2956

answers:

6

I'm new to development, and I'm getting into it as a hobby. (currently a student).

I'm wondering what you guys and girls advise.

There's greater support for PHP, I realize. But Ruby looks like it offers a great deal more flexibility...and it's prettier.

This is a question from a noob, so if this is a bad question, please excuse me!

+3  A: 

It is really a matter of preference. Ruby on rails is a more popular framework but php is a more popular language. I have been using codeignighter on a project I am working on now because i have to use php but I would use rails if I could. Codeigniter is generally a lighterweight framework that has less 'magic' and rails has much more code and will do more things for you.

Craig
+14  A: 

If you're just getting into it as a hobby, I would suggest learning the languages first, as opposed to focusing on any particular framework. Once you familiarize yourself with the language of choice, or both languages, then it's a matter of preference, and which is better fit for a particular project.

Codeigniter and RoR (Ruby on Rails) are both frameworks. First learn PHP (the language used in Codeigniter), or Ruby (the language used in the RoR framework).

Both of which would put you on the right track.

Some PHP reference material

Some Ruby reference material

Some SO reference material related to the topic

Sev
+2  A: 

Any choice of tools is best predicated by an assessment of what you actually need in a tool.

RoR is very popular among the edge crowd these days, and it's a good framework. The standard Ruby caveats apply about threading, scalability and so forth. Personally, I tend to look at RoR as a great place to test proof of concept.

PHP gets a terrible rap from a lot of people for a lot of silly reasons (and some valid ones, too, but mostly silly ones) but it's actually been evolving nicely over the past few years. It'd be my guess that CodeIgniter is slipping in popularity, losing ground to Zend Framework particularly. Then again, Rasmus Lerdorf himself doesn't care much for frameworks.

I'd say learn what you want to learn for the sake of learning, but if you have an actual end-goal in mind, examine what that goal would need and assess both languages to see how well they fit.

Getting started, PHP will be easier to kickstart for most people (due to the setup of RoR vs. LAMP/WAMP), but that's again an opinion.

Zenham
A: 

Ruby on rails is all about conventions, but is so incredibly fast in making prototypes when you know the conventions and a little ruby. Knowing a little ruby (the language) will be enough, the rest of the language you'll learn fast using ruby on rails.

I haven't got a lot of experience with codeigniter, but I saw a tutorial and was impressed so I'll be getting into that pretty soon myself :-)

PS: I second what was said before. Learn the native language first (even if it's just a little bit) before commencing with the framework. It will give you a better understanding of the framework itself.

Bryan
+1  A: 

Ruby on Rails vs CodeIgniter is a no-brainer.

Ruby/Rails give you things you couldn't ever dreamed of in the PHP/CodeIgniter world.

Back then I started with PHP cause a lot of people said (when I had no knowledge about programming) PHP is popular, use it. So if you are a newbie and have to choose your first language, choose Ruby, just trust me on this one. You'll understand later (or learn PHP first just to get the FUCK, I CHOSE WRONG effect when learning ruby).

Some highlights of Ruby and Rails:

  • Better syntax, more near the human way of thinking
  • Great vision. It knows what it wants and where it is heading
  • Rails is a very mature framework with a lot of tools. It's comparing an airplane (Rails) with a bicycle (CodeIgniter)
  • Far more users in Irc and Stackoverflow whom can help you out
  • Far more books
  • Far more online services supporting it
  • And again, Ruby's vision is like Apple's. Near the user.

I've used both of them. Ruby/Rails let you do more in less time.

But first, learn ruby. (Lynda tutorial, the pragmatic programmers guide, metaprogramming Ruby) then Rails (Rails guides, maybe some books).

Im having a feeling that I will get downvotes =)

never_had_a_name
A: 

While CodeIgniter is easy and you can hit the ground running, I'd take the time to learn Ruby.

To really get a handle on Rails, you'll need to understand some of the more advanced programming concepts in Ruby. You'll want to read Paolo Perrotta's book on Metaprogramming and then things will finally all make sense.

Fortunately, there is a super simple web framework for Ruby called Sinatra that might be much easier to start with.

Bottom line: If you just want to get something up and running quickly for a single project, use CodeIgniter. If you want to do this for a while, take the time to learn RoR. I'm an experienced programmer and it took me a couple months to start feeling comfortable using RoR's endless tool set, so be ready for it.

Dex