Ruby vs RoR (Not the usual question)

I fully understand that RoR is a framework of Ruby. However upon doing studying of RoR, I notice that they are extremely similar. Tutorials of RoR show that they are basically teaching the exact stuff I learned on Ruby tutorial via codecademy. What does RoR offer that Ruby doesn’t? RoR is a framework, so does that just offer extra classes, extra methods, and extra tools specifically for the web? I’m just trying to understand if my base coding will still look like regular old Ruby, but just dressed up a bit with new RoR specific methods or classes. Google all has the same answer when I ask it to compare RoR vs Ruby - only that it’s a framework. Same answer everywhere.

From a technical standpoint that it the correct answer. :stuck_out_tongue:

From a practical standpoint it’s similar to CSS and the many CSS frameworks out there. You can write plain ole’ CSS or you can use a framework (like Pure or whatever) and take advantage of some pre-built utilities. It’s still CSS but you don’t have to write the code to create a grid.

Ruby and RoR are similar to this. I guess we could define RoR as a carefully curated library of Ruby classes and methods that are utilized to build web apps.

When you are using RoR you’ll be writing a bunch of Ruby code that makes use of plain Ruby AND all class/methods that have been written for Rails.

Hopefully I explained this coherently.

So basically if I wanted to use a CSS framework…if I wanted something to be specifically styled…I can either write out all the code myself for it in CSS, or I can use a pre-built CSS class which has all the utilities to do what I want? But it’s still technically CSS?

RoR has classes/methods made OUT of ruby, but just easiliy packaged into a framework that saves me time and also makes it so I don’t have to write the classes/methods myself…?

Exactly. I used the analogy because I thought I read somewhere that you were already writing CSS but, I could be mistaken.

Correct.

Yes I’m a web developer for a DoD agency. I specialize in HTML/CSS. Your analogy was perfect.

Thanks for the confirmation. I understand now.

Sounds like a cool gig!

:thumbsup: :thumbsup: Glad to help!

It’s not that bad. Has some pretty neat perks with it. I do love my job. Truly I do. Appreciate all the help you’ve given me over my Ruby threads.

Considering how similar RoR is to Ruby, would you recommend I forego any specific RoR training? Codecademy is basically re-teaching me Ruby on their RoR application tutorial…I assume that after the Ruby basics I’ll learn specifics about RoR…basic methods and classes that need to be always used…but do you think I should use my time to read books about the matter (the ones the community has deemed good?) Currently I don’t feel like this codecademy RoR tutorial will give me much.

My personal opinion is that you should learn as much about plain Ruby as possible before worrying about Rails. However, at some point you WILL want something to describe how Rails works and how to use the framework. Honestly, if you have a good handle on Ruby and gain a basic understanding of the framework, you’ll be able to create anything you want with Rails.

A lot of people like Agile Web Development with Rails for a solid overview of Rails. - https://pragprog.com/book/rails4/agile-web-development-with-rails-4

It’s good to see some life on the Ruby forum!

I’ve spent hte last couple weeks purely learning Ruby in my free time… I have a pretty good understanding. I’d have to use the documentation to look up the classes and methods that RoR has for my web application…but I’m pretty comfortable I could do whatever I want in Ruby. If I need a particular method, I’d just google it and most likely it already exists so I’ll run off that. I know modules, classes, procs, methods,…I’m pretty comfortable. I’m goign to read my books and see where my knowledge is from there.

Nobody ever starts from a blank slate for web applications these days, they build on the shared/tested code of others.

Rails and Sinatra are frameworks built on rack for handling the web server interface, they handle routing and give you good levels of abstraction to make development easier, less buggy and more fun. If you’re thinking it’s possible to create something better than Rails in a year with one person you’re mistaken.

The guides explain all of the different components that ship with Rails.

Rack, ActiveRecord, Models, Views, Controllers, Routing, Asset pipeline, Testing, Mailing etc… Those are components that aren’t part of plain Ruby.

Nope, not thinking that at all…

That’s cool. I, too, work for the DoD.
I am envious because I do not work on Web Development (which is ironic since my official job title has “Web Developer” in it).

My work is with Automated Testing; which occasionally permits me to apply my Ruby expertise.

1 Like

Well we use a CMS and a CSS framework, but I purely only work in the HTML view in the CMS so I get the most out of this.

The CMS has a dreamweaver-like design view, but I don’t use it. I get a decent amount of HTML/CSS in. Actually my first assignment (since during the interview they found Sitepoint and my posts)…was to debug all of our wireframes (since we are rolling out a new design soon)…that was extremely fun, considering I love debugging CSS threads here. It’s like I was getting paid to debug Sitepoint threads (in a sense)

That must be rough to not be able to code much Ruby. That would torture me if I couldn’t do HTML/CSS.

Ruby is a general purpose language, RoR bring most power of web on top of it.

Yes I’ve realized this over the past 100 or so days I’ve been attempting to learn RoR since this thread was last in use.

1 Like