Questions And Answers on Application Design – Ruby on Rails

So, since I had many questions I gathered them around and looked for the answers that we will debate in class this week. Here they are:

 

  • What is application database backend?

back-end database is a database that is accessed by users indirectly through an external application rather than by application programming stored within the database itself or by low level manipulation of the data.

A back-end database stores data but does not include end-user application elements such as stored queries, forms, macros or reports.

  • What is Ruby on Rails?

http://rubyonrails.org/

Ruby on Rails, often shortened to Rails, is an open source full-stack web application framework for the Ruby programming language. Ruby on Rails runs on the general-purposeprogramming language Ruby, which predates it by more than a decade. Rails is a full-stack framework, meaning that it gives the web developer the ability to gather information from the web server, talk to or query the database, and render templates out of the box. As a result, Rails features a routing system that is independent of the web server.

Ruby on Rails emphasizes the use of well-known software engineering patterns and principles, such as Active record patternConvention over ConfigurationDon’t Repeat Yourself andModel-View-Controller.

Like many web frameworks, Ruby on Rails uses the Model-View-Controller (MVC) architecture pattern to organize application programming.

In a default configuration, a model in a Ruby on Rails framework maps to a table in a database. By convention, a model named User will map to the database table users, and the model will have a filename user.rb within app/models. While developers can choose to use whatever model name and database table name they wish, this is not a common practice and it’s usually discouraged because Rails philosophy is to use convention over configuration.

controller is the component of Rails that responds to external requests from the web server to the application, and responds to the external request by determining which view file to render. The controller may also have to query the model directly for information and pass these on to the view. A controller may provide one or more actions. In Ruby on Rails, an action is typically a basic unit that describes a single rule on how to respond to a specific external web-browser request. Also note that, if a controller/action is not mapped to the Rails router, the controller/action will not be directly accessible by external web requests. Rails encourages developers to use RESTful routes, which include actions such as: create, new, edit, update, destroy, show, and index, as these are routed automatically by convention in the routes file if specified.[clarification needed]

view in the default configuration of Rails is an erb file. It is typically converted to output html at run-time, although, in theory, any format can be used as a view.

Ruby on Rails includes tools that make common development tasks easier “out of the box”, such as scaffolding that can automatically construct some of the models and views needed for a basic website.[21] Also included areWEBrick, a simple Ruby web server that is distributed with Ruby, and Rake, a build system, distributed as a gem. Together with Ruby on Rails, these tools provide a basic development environment.

Ruby on Rails relies on a web server to run. Mongrel was generally preferred over WEBrick at the time of writing,[citation needed] but it can also be run by LighttpdApacheCherokeeHiawathanginx (either as a module – Passengerfor example – or via CGIFastCGI or mod_ruby), and many others. From 2008 onwards, the Passenger web server replaced Mongrel as the most-used web server for Ruby on Rails.[22]

Ruby on Rails is also noteworthy for its extensive use of the JavaScript libraries Prototype and Script.aculo.us for Ajax.[23] Ruby on Rails initially utilized lightweight SOAP for web services; this was later replaced by RESTful web services. Ruby on Rails 3.0 uses a technique called Unobtrusive JavaScript to separate the functionality (or logic) from the structure of the web page. jQuery is fully supported as a replacement for Prototype and, in Rails 3.1, is the default JavaScript library, reflecting an industry-wide move towards using jQuery. Additionally, CoffeeScript was introduced in Rails 3.1 as the default Javascript language.

Since version 2.0, Ruby on Rails offers both HTML and XML as standard output formats. The latter is the facility for RESTful web services.

Rails 3.1 introduced Sass as standard CSS templating.

By default, the server uses Embedded Ruby in the HTML views, with files having an html.erb extension. Rails supports swapping-in alternative templating languages, such as HAML and Mustache.

Ruby on Rails 3.0 has been designed to work with Ruby 1.8.7, Ruby 1.9.2, and JRuby 1.5.2+; earlier versions are not supported.[24]

Rails 3.2 series is the last series to support Ruby 1.8.7.

Framework structure

Ruby on Rails is separated into various packages, namely ActiveRecord (an object-relational mapping system for database access), ActiveResource (provides web services), ActionPack, ActiveSupport and ActionMailer. Prior to version 2.0, Ruby on Rails also included the Action Web Service package that is now replaced by Active Resource. Apart from standard packages, developers can make plugins to extend existing packages. Rails 3.2 deprecates the old plugins Rails 2-3-stable style in which plugins are to be placed under vendor/plugins, in favor of packaged gems.[25]

[edit]Deployment

Ruby on Rails is often installed using RubyGems, a package manager[26] which is included with current versions of Ruby. Many free Unix-like systems also support installation of Ruby on Rails and its dependencies through their native package management system.

Ruby on Rails is typically deployed with a database server such as MySQL or PostgreSQL, and a web server such as Apache running the Phusion Passenger module.

There are many Ruby on Rails web hosting services such as HerokuEngine Yard and TextDrive.

 

  • Why am I favoring towards Rails?

In the forums I have learnt that applications such as twitter and badgeville were created using Rails. And that Facebook is actually upset that they they have chosen to write on php and changing everything while trying to correct their mistake, they created their own language.

  • How do I plan to connect Rails?

From what I gathered I will built up a website that will be the application screens to connect Rails with html5. This website will be in the resolution fit for my application. I will then write the page motor with Javascript to have real time interaction, touch gestures. For page designs I will be using css3 stylesheet. Then in Xcode I will capture the whole screen and connect it with the website. Which will make it an web application in the disguise of a native iOS app.

Leave a Reply