Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is ruby on rails?

I am a front end developer (HTML,CSS,JS & jQuery) I know a bit of PHP. I am trying to grasp what Ruby/Ruby on Rails is.

On http://rubyonrails.org/ it says "Ruby on Rails is an open-source web framework that's optimized for programmer happiness"

In actual, non-dreamy terms, what is special about Ruby/Ruby on Rails, and how can a person like myself benefit from learning to use it?

My simple question is: whose sister is it? PHP, mySQL, ASP, coldFusion, jsp, apache?

What does it do?

like image 877
adardesign Avatar asked Dec 24 '09 22:12

adardesign


2 Answers

The Language

Ruby is a recent programming language that shares most of its heritage with Perl and Smalltalk. You can see what Ruby looks like (and try it yourself) at tryruby.org.

Just like you can use PHP to write web pages, you can do the same thing with Ruby.

The Framework

Ruby on Rails is a set of software devices that help you to more easily write a website in Ruby. The primary things they try to facilitate ("make easy") are:

  1. Storing related data (e.g. blog posts and the comments on them) to a database.
  2. Accepting web requests and respond to them programmatically (e.g. check a user's password)
  3. Composing HTML using your data, with layouts and templates to make it easier.

"Rails," as it's called for short, is built with extreme prejudice towards certain application models, particularly MVC. What this means is that unlike PHP, where any .php source file is fair game for any bit of code, most code in a Rails application is written in a particular, conventional place. When people compare Rails to PHP, they often point this out.

There's a lot I didn't cover, but these are Rails' most basic features. To see what it looks like, I'd suggest watching the infamous, "Creating a Weblog..." screencast.

like image 51
Andres Jaan Tack Avatar answered Oct 23 '22 16:10

Andres Jaan Tack


If you're looking for something to compare it to for someone coming from PHP, think of it like CakePHP for ruby. It's a bunch of pre-developed low-level classes and systems that can then be extended out to use in many different systems. It also bundles in a lot of other helpful tools and a plugin architecture. It uses ruby and an HTML templating language based on ruby (erb) rather than PHP.

like image 21
Seburdis Avatar answered Oct 23 '22 15:10

Seburdis