Ruby-on-RAILS!

So what is with the Rails?

When I first started looking into DBC I kept hearing the phrase "Ruby on Rails". At first this did not have a lot of meaning to me. I knew what "Ruby" was because I began learning to read and write using this programming language, but I never really took the time to think further as to what "Ruby on Rails" might mean. When I saw this as a topic on our technical blog list I was very intruiged by it and felt like I must look into it in more detail!

Rails is an open-source web app framework all written in Ruby. Rails is a full-stack framework that uses similar software engineering concepts and utilizes many common patterns including convention over configuration(COC), don't repeat yourself(DRY) which we have learned quite a lot about in DBC so far, the active record pattern and model-view-controller(MVC). Rails uses the MVC pattern to organize application programming. Usually in a default MODEL in Ruby-on-Rails, the configuration will be a ruby file mapped to a table in a database. Using the COC philosophy we would link the ruby file to the database with the table with similar names ie: CLASS Cars with TABLE Cars. The VIEW in the default configuration of Rails is an erb file, which is compiled into HTML at run-time but can be viewed in many other templating systems as well. Now with Ruby on Rails Version 2.0 or newer both HTML and XML are offered as standard output formats. The CONTROLLER is the component of Rails that responds to external requests from the server to the app by deciding which files to render. The controllers can provide one or more actions, the actions in Rails usually refer to a basic unit that tells it how to respond to specific external requests from the web-browser. One of the keys to these actions/controllers being accessible is by mapping the routes correctly, if not mapped correctly they have no effect. The maps are set up in the routes configuration file.

Rails is know for being easily readable and full of tools that make common development tasks easier. Many "gems" and "tools" come pre-packaged with Ruby-on-Rails to provide a basic development environment. Rails uses extensive Javascript libraries including Jquery which is the default javascript library in Rails version 3.1 and higher. In this version CoffeeScript is also the new default Javascript language. Ruby-on-Rails is sepparated into various packages as well including the following:

Ruby-on-Rails often includes RubyGems, which is a package-manager for Ruby that gives a standard format for the distribution of Ruby libraries and programs, which are called "gems" in Ruby. The gems include package information along with the files to install for the program. A package management system like RVM can be used to update the current version of Ruby on a system as well as to get new gems for use within Ruby.

History of Rails

In July of 2004 David Heinemeier Hanssonreleased Rails as an open source framwork that he had extracted from Basecamp, which is a project management tool. However Hansson did not share commit rights to the project until February of 2005. The first major milestone for Rails was two years later in August of 2006 when industry leader Apple announced that it would include Ruby on Rails with Mac OSX "Leopard". Here is a short Version History of Rails:

Version Date
1.0 December 13, 2005
1.2 January 19, 2007
2.0 December 7, 2007
2.1 June 1, 2008
2.2 November 21, 2008
2.3 March 16, 2009
3.0 August 29, 2010
3.1 August 31, 2011
3.2 January 20, 2012
4.0 June 25, 2013
4.1 April 8, 2014

In December of 2008 Merb, which was another framework for web apps was released and Ruby decided to work with Merb to integrate the best of both worlds into Rails 3. Rails version 2.3 was released later in 2009 and had some major improvements to the Rails network that made it a top contender in frameworks. These improvments included new developments in templates, engines, Rack, and nested model forms. In 2010 Merb was merged with Rails to create an even stronger framework. Through the early version of Rails 3.0 many new features were added including JQuery, Coffeescript, SASS, faster development mode and routing engines. Earlier this year Rails 4.1 was released introducing Spring, Variants, Enums, Mailer previews, and secrets.yml. As I hope you can see Ruby and Rails are amazing languages and frameworks. Even though they are different concepts, they work seamlessly together to create one of the most powerful and fastest growing open source web app frameworks in the world. There is no telling where Ruby-On-Rails will take us, but I can only see it expanding in the future to become the best programming language and framework on the web.

Definitions