rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* difference between normal rails application and rack application
@ 2011-08-18  4:34 Uma Mahesh Nyros
  2011-08-18  7:17 ` Konstantin Haase
  2011-08-18  7:34 ` aslak hellesoy
  0 siblings, 2 replies; 4+ messages in thread
From: Uma Mahesh Nyros @ 2011-08-18  4:34 UTC (permalink / raw)
  To: Rack Development

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 ?


Thank You,
Uma Mahesh.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: difference between normal rails application and rack application
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Konstantin Haase @ 2011-08-18  7:17 UTC (permalink / raw)
  To: rack-devel

There is no difference. As of Rails 2.3, Rails applications are Rack applications. Rack is the library Rails uses to communicate with the web server.
If you are considering wether to use Rack "instead" of Rails, you probably should just stay with Rails.

Konstantin

On Aug 18, 2011, at 06:34 , Uma Mahesh Nyros 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 ?
> 
> 
> Thank You,
> Uma Mahesh.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: difference between normal rails application and rack application
  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
  2011-08-18  9:09   ` Uma Mahesh Nyros
  1 sibling, 1 reply; 4+ messages in thread
From: aslak hellesoy @ 2011-08-18  7:34 UTC (permalink / raw)
  To: rack-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: difference between normal rails application and rack application
  2011-08-18  7:34 ` aslak hellesoy
@ 2011-08-18  9:09   ` Uma Mahesh Nyros
  0 siblings, 0 replies; 4+ messages in thread
From: Uma Mahesh Nyros @ 2011-08-18  9:09 UTC (permalink / raw)
  To: rack-devel

[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]

Thank You very much Aslak, Your explanation is very clear and I got the
clear idea of rack.. Thank you once again.



On Thu, Aug 18, 2011 at 1:04 PM, aslak hellesoy <aslak.hellesoy@gmail.com>wrote:

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

[-- Attachment #2: Type: text/html, Size: 2619 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-18  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-08-18  9:09   ` Uma Mahesh Nyros

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

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