Ruby/What can I use RoR for

From Meshplex

Jump to: navigation, search
Image:Ruby_on_rails_tutorials.jpg
Ruby for complete beginners
Ruby Introduction
What can I use RoR for?
Reasons for choosing RoR over other popular programming languages such as php or asp.net .What makes Ruby so much more special
Where can I find RoR? In what “forms” does it come?
How to install RoR.Solutions for both the novice and professional programmers on Windows,Mac OS X and Linux.Prerequisites.
Ruby programming tutorials for beginners:
Ruby Basics
Ruby Variables, Datatypes, Operators
Ruby Symbols
Ruby Statements
Ruby Converting data to another type: type conversion or typecasting
Ruby Arrays, Hashes, Ranges
Ruby Functions and built in functions
Ruby Control structures
Ruby Regular expressions and blocks
Ruby Loops
Ruby Recursion
Ruby Data Structures
Ruby Methods, Classes, Modules, Namespaces
Ruby Exceptions
Ruby Object Oriented Programming
Ruby Multithreading
Ruby File Handling.Input and Output
Ruby Basic GUI
Ruby and databases.Ruby on Rails and MySQL
Ruby Basic CGI.Using fastCGI
Ruby Basic Networking and web programming
Ruby Basic Graphics
Ajax and Rails.Web 2.0 and what it means
Ruby Testing, Debugging, Automation of tasks
Ruby Apache,Capistrano, Mongrel,lighttpd – reviews and tips
Finding a Ruby on Rails ready web hosting company
BONUS: mini tutorial for a simple RoR application

[edit] What can I use RoR for?

So far, you've learned that Ruby was meant to keep a perfect balance between power and it's simplicity. This is enforced by two Ruby on Rails concepts: "Convention over Configuration" and "Don't Repeat Yourself"

"Convention over Configuration" means that a programmer only needs to write code for unconventional parts of the application they're building. To give an example: let's say you're building a shop, so obviously you need a way to store your customers' details. Between other things, you'll also probably have a Customer class created in the model or something similar, to keep things modular and easy to work with. You'll probably be very pleasantly surprised to see that a table customers is created automatically in the database.

Adding the plural "-s" is just one of the many other interesting (and quite entertaining) things Ruby on Rails does.

But what do you need if you want to have the table named something else? Like "my_shop_customers"? Although possible, this sort of action is discouraged as it requires extra unnecessary work and time.

One of the many reasons to use Ruby on Rails is to save a lot of time when trying to code database-backed web applications. RoR can automate a lot of the development process for you and effectively shrink the project's temporal requirements.

Applications that before take months to code with PHP or Asp.NET can be built in a matter of weeks with Ruby on Rails.

Now let's talk about "Don't Repeat Yourself". As suggested by the name of the principle, Ruby on Rails makes repeating yourself unnecessary with the help of the ActiveRecord and the method of scaffolding.

ActiveRecord is a RoR specific implementation of the active record pattern which, according to is a design pattern frequently found in enterprise applications. Please read the corresponding Wikipedia article if you want to know more about this subject.

With scaffolding, a compiler automatically generates basic pieces of code necessary for the "logistics" of a website -- for creating, reading, modifying or deleting data in the database. So one is left with a sort of template upon which one can build the rest of the website with more specific code.

If you wish to read more about scaffolding in RoR, go directly to the source. Another very important thing I probably should've mentioned earlier is the fact the the Ruby on Rails framework uses the Model-View-Controller design pattern wchich helps the programmer to separate the actual data(model) from the interface(view) of the application.

The reason why this is extremely useful is that it provides modularity and ensures efficiency of the application, making it much easier to modify when needed and eliminating redundancy of code.

Try imagining this:

"Joe" thinks he's a pretty great programmer, yet he has never heard of MVC and never thought of using an MVC-compliant development framework when creating websites for his clients. He was recently commissioned to work on a complex internet store for the largest perfume distributor in his city. The client asked for a very good looking website and told him they won't accept -- under any circumstances -- something less than perfect.

They're also willing to pay a fortune for receiving such a great product in the end, so Joe starts working right away using the same coding techniques he learned years before(Joe, unfortunately, has difficulties keeping up with the latest technological developments ).

Eventually he develops and presents a prototype to the client. "Oh no!" they cry, "although it functions properly, it looks nothing like we envisioned. We want you to rebuild the frontend of the application."

Since Joe mixed up all his code, he now has to re-write quite a lot of his application all over again. Poor Joe, if only he knew about Ruby on Rails!

The key point being that RoR's MVC architectural pattern allows you to modify the data-handling processes without affecting the interface and vice-versa.

Ruby on Rails isn't the only MVC framework for Ruby, Nitro and Iowa also exist but they are not nearly as widespread as RoR.

Now that we've discussed a few of RoR's main points of attraction, let's talk about the actual subject we're supposed to discuss in this section: what you can do with Ruby and Ruby on Rails.

I believe the best way to do that is to first give you a few examples of websites built on the RoR framework.

1) Basecamp

Probably the most famous RoR website to date, built by the company the creator of RoR works for - 37Signals.Basecamp helps to dramatically improve communication inside a team working on a certain project.Everything is done on the website, no need to download anything on your computer.You can create to-do lists,share files,track time spent on working on a job or a client for example or schedule milestones and communicate on the message boards. The website claims that over 1,000,000 people signed up worldwide so far.

2) Campfire

Created by the same 37Signal company.It’s a web-based group chat tool.You can set up in a matter of seconds a password-protected chat room and invite a client or co-worker to chat with you.

3) 43Things

Make a list of your goals and share it for everyone to see.Meet people that want the same things as you do.Most popular on everyone’s to-do list currently seems to “be happy” 

3) Checkli.st

For shopping and travel checklist management.

4) Coastr

A social guide to beer :) as they claim.Allows you to share with others your passion for beer.

5) DjDossiers

Hosting solutions for DJs.

6) DiscoverMachine

Create and share your maps.You can even import your GPS data.

7) 7bills

You can track an euro bill to see where it’s travelled in the world by entering the serial number.Very interesting!You can also see other recent searches conducted on the site.

8) MySmallVentures

A RoR blog

9) MyRecipe

A place to share your recipes.

10)Design:related

A community for designers or people passionate about design.


And last but not least you can check a much larger list of RoR sites here - http://happycodr.com/ As you can easily see from this small list I created for you, RoR can be used for a variety of things and dare I say, the only limitations are your imagination and skill set.

Next
Personal tools