| 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.
|