rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: aslak hellesoy <aslak.hellesoy@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: difference between normal rails application and rack application
Date: Thu, 18 Aug 2011 08:34:35 +0100	[thread overview]
Message-ID: <CAKDF_QRSeDqAHS8x5mwa=fjNCnKuvpY9mZwLXybO_qxF0U3ZFQ@mail.gmail.com> (raw)
In-Reply-To: <f15d3c79-9992-4a39-8242-cd2ed9827f2a@m6g2000prh.googlegroups.com>

On Thu, Aug 18, 2011 at 5:34 AM, Uma Mahesh Nyros
<nyros.umamahesh@gmail.com> wrote:
> Hi,
>
> I am new to rack. I have few baisc questions on it.
>
> Can I know the difference between normal rails application and rack
> application.? What are the uses of rack application? Why we need to
> use rack application ?

Rack is a small library that sits between your HTTP server (WEBrick,
Thin, Mongrel etc) and your higher level web framework (Rails).

[HTTP Server] <---> [Rack] <---> [Rails] <---> [Your app]

Rack translates HTTP requests to very simple and low level Ruby method
invocations. Likewise, it translates low level Ruby method invocations
back to a HTTP response.

It's possible to write a Ruby web application using Rack only, but
most people don't as it is too low level. (For the same reason that
most people prefer higher level programming languages over assembly or
C). Rack is designed to be a common HTTP server API for implementors
of Ruby web frameworks (such as Rails).

Rails is a web framework built on top of Rack, using Rack's Ruby API
to receive HTTP requests and send HTTP responses back. From a
developer perspective this allows you to write a web app using higher
level constructs (controllers, actions and views). From Rails'
perspective this means that Rails works with any HTTP server that has
a Rack interface.

Aslak

>
>
> Thank You,
> Uma Mahesh.
>
>

  parent reply	other threads:[~2011-08-18  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-18  4:34 difference between normal rails application and rack application Uma Mahesh Nyros
2011-08-18  7:17 ` Konstantin Haase
2011-08-18  7:34 ` aslak hellesoy [this message]
2011-08-18  9:09   ` Uma Mahesh Nyros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKDF_QRSeDqAHS8x5mwa=fjNCnKuvpY9mZwLXybO_qxF0U3ZFQ@mail.gmail.com' \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).