[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Nees Rhtml Book

Saravanankumar Saru

3/19/2007 12:20:00 PM

Hi,
Please, Any body have, rhtml tutorials/urls to study.

Or

Where I can get it?

Thanks

--
Posted via http://www.ruby-....

11 Answers

Ilan Berci

3/19/2007 2:01:00 PM

0

Saravanankumar Saravanan wrote:
> Hi,
> Please, Any body have, rhtml tutorials/urls to study.
>
> Or
>
> Where I can get it?
>
> Thanks

Saravanankumar,

There is no magic for rhtml as it's simply ruby embedded within html.
Just pick up a good book on html and css to which there are thousands
and you will be all set..

hope this helps

ilan

--
Posted via http://www.ruby-....

Brian Candler

3/19/2007 7:49:00 PM

0

On Mon, Mar 19, 2007 at 09:19:50PM +0900, Saravanankumar Saravanan wrote:
> Please, Any body have, rhtml tutorials/urls to study.

I am wondering, based on this and the previous post, whether you are
actually using Ruby on Rails?

If so, you may be better placed asking questions on the Rails mailing list
(you are currently on the Ruby language mailing list).

In any case, invest in a good book or two. I have found "Programming Ruby:
The Pragmatic Programmer's Guide" and "Agile Web Development with Rails" to
be invaluable. The latter has lots of rhtml and ajax examples.

Whilst these may be hard to find in India, the good news is that they are
available to buy online in PDF form - and much cheaper than the paper
versions.
http://www.pragmaticprogr...

Also, an older version of Programming Ruby is available for free on-line:
http://www.rubycentral...

HTH,

Brian.

Corey Konrad

3/20/2007 12:38:00 AM

0

Saravanankumar Saravanan wrote:
> Hi,
> Please, Any body have, rhtml tutorials/urls to study.
>
> Or
>
> Where I can get it?
>
> Thanks


yeah rhtml is just html the r part of it is just there to tell rails
that the name of the rhtml file is the name of an action.

I am just learning all this stuff to, i just started like 1 week ago
learning both ruby and ruby on rails, the book i am using is called
"Beginning Ruby on Rails" by Holzner Ph.d, its published by WROX, its
pretty good so far.

--
Posted via http://www.ruby-....

Saravanankumar Saru

3/20/2007 3:44:00 AM

0

Ilan Berci wrote:
> Saravanankumar Saravanan wrote:
>> Hi,
>> Please, Any body have, rhtml tutorials/urls to study.
>>
>> Or
>>
>> Where I can get it?
>>
>> Thanks
>
> Saravanankumar,
>
> There is no magic for rhtml as it's simply ruby embedded within html.
> Just pick up a good book on html and css to which there are thousands
> and you will be all set..
>
> hope this helps
>
> ilan

Yeah.
I understood, about "ruby embedded html".

Thank U for ur reply.

--
Posted via http://www.ruby-....

John Joyce

3/20/2007 3:58:00 AM

0

I will give you one last hint before you realize you need to just
learn the basic stuff or use a CMS:
as stated,
rhtml is just html with Puby code in it.
users never see the ruby it's parsed by the server
If you use Perl, Python, or PHP you can have phtml
the secret is, you can actually name the file with any extension
(almost) or no extension.
the web browser (user-agent) doesn't care (isn't supposed to, anyway)
the main information for the user-agent is in the header of the file.

so the only tutorial on rhtml is learning Ruby (or Rails) enough to
use eRuby in one of its forms.
ERb, eRuby, eRubis

On Mar 20, 2007, at 9:37 AM, Corey Konrad wrote:

> Saravanankumar Saravanan wrote:
>> Hi,
>> Please, Any body have, rhtml tutorials/urls to study.
>>
>> Or
>>
>> Where I can get it?
>>
>> Thanks
>
>
> yeah rhtml is just html the r part of it is just there to tell rails
> that the name of the rhtml file is the name of an action.
>
> I am just learning all this stuff to, i just started like 1 week ago
> learning both ruby and ruby on rails, the book i am using is called
> "Beginning Ruby on Rails" by Holzner Ph.d, its published by WROX, its
> pretty good so far.
>
> --
> Posted via http://www.ruby-....
>


Deepak kumar Shivhare

3/20/2007 5:47:00 AM

0

Saravanankumar Saravanan wrote:
> Ilan Berci wrote:
>> Saravanankumar Saravanan wrote:
>>> Hi,
>>> Please, Any body have, rhtml tutorials/urls to study.
>>>
>>> Or
>>>
>>> Where I can get it?
>>>
>>> Thanks
>>
>> Saravanankumar,
>>
>> There is no magic for rhtml as it's simply ruby embedded within html.
>> Just pick up a good book on html and css to which there are thousands
>> and you will be all set..
>>
>> hope this helps
>>
>> ilan
>
> Yeah.
> I understood, about "ruby embedded html".
>
> Thank U for ur reply.

Hello,
Definately there is no magic in RHTML.
If you want to help in RHTML the check it out the following links. May
it will help you.

1. http://webddj.sys-con.com/read/...
2. http://www.railsho...
3. http://www.vtc.com/products/rubyo...

Thanks :)
Deepak

--
Posted via http://www.ruby-....

Rick DeNatale

3/20/2007 4:38:00 PM

0

On 3/19/07, Corey Konrad <0011@hush.com> wrote:

> yeah rhtml is just html the r part of it is just there to tell rails
> that the name of the rhtml file is the name of an action.

Not really, the rhtml tells rails (or more precisely ActionView) that
the file needs to be processed by erb. It really doesn't tell it that
it's the name of an action, although if rails doesn't find an action
method in the controller, it will by default look for a file to render
in app/views/controller_name. This file can be an rhtml file or
something else (like a simple html file).

Rhtml is html with embedded ruby. It does get processed on the server
side by erb, or an equivalent program. What basically happens is that
it get's turned into ruby code which writes out the html portions
interspersed with the output from the embedded ruby code.

There's not much to it in normal usage. The key concepts are that
ruby code gets embedded within <% %> pairs, If the first <% is
followed by an = sign, then the value of the ruby expression following
is inserted into the output.

The client browser never sees the rhtml, only the (x)html which
results from running erb.


--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...

John Joyce

3/20/2007 5:08:00 PM

0

You could use eRuby with any .extension
In fact you could serve web pages with any or no dot extension.
The key is that the server knows what to do with it.
An example is Apache. You tell Apache what to do with files of
various extensions. You could tell it to parse all .html files with
Ruby, or all .php files with Perl.
Thus, many rails pages show URL/URI with no dot extension at all in
the web browser. It is important only if you use multiple language
interpreters or your web application framework requires it.

On Mar 21, 2007, at 1:38 AM, Rick DeNatale wrote:

> On 3/19/07, Corey Konrad <0011@hush.com> wrote:
>
>> yeah rhtml is just html the r part of it is just there to tell rails
>> that the name of the rhtml file is the name of an action.
>
> Not really, the rhtml tells rails (or more precisely ActionView) that
> the file needs to be processed by erb. It really doesn't tell it that
> it's the name of an action, although if rails doesn't find an action
> method in the controller, it will by default look for a file to render
> in app/views/controller_name. This file can be an rhtml file or
> something else (like a simple html file).
>
> Rhtml is html with embedded ruby. It does get processed on the server
> side by erb, or an equivalent program. What basically happens is that
> it get's turned into ruby code which writes out the html portions
> interspersed with the output from the embedded ruby code.
>
> There's not much to it in normal usage. The key concepts are that
> ruby code gets embedded within <% %> pairs, If the first <% is
> followed by an = sign, then the value of the ruby expression following
> is inserted into the output.
>
> The client browser never sees the rhtml, only the (x)html which
> results from running erb.
>
>
> --
> Rick DeNatale
>
> My blog on Ruby
> http://talklikeaduck.denh...
>


Jeremy McAnally

3/20/2007 5:45:00 PM

0

That's not entirely true; if you're using eRb with Rails, it requires
that templates end in rhtml or erb. Otherwise, you could coceivably
use it without an extension.

--Jeremy

On 3/20/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:
> You could use eRuby with any .extension
> In fact you could serve web pages with any or no dot extension.
> The key is that the server knows what to do with it.
> An example is Apache. You tell Apache what to do with files of
> various extensions. You could tell it to parse all .html files with
> Ruby, or all .php files with Perl.
> Thus, many rails pages show URL/URI with no dot extension at all in
> the web browser. It is important only if you use multiple language
> interpreters or your web application framework requires it.
>
> On Mar 21, 2007, at 1:38 AM, Rick DeNatale wrote:
>
> > On 3/19/07, Corey Konrad <0011@hush.com> wrote:
> >
> >> yeah rhtml is just html the r part of it is just there to tell rails
> >> that the name of the rhtml file is the name of an action.
> >
> > Not really, the rhtml tells rails (or more precisely ActionView) that
> > the file needs to be processed by erb. It really doesn't tell it that
> > it's the name of an action, although if rails doesn't find an action
> > method in the controller, it will by default look for a file to render
> > in app/views/controller_name. This file can be an rhtml file or
> > something else (like a simple html file).
> >
> > Rhtml is html with embedded ruby. It does get processed on the server
> > side by erb, or an equivalent program. What basically happens is that
> > it get's turned into ruby code which writes out the html portions
> > interspersed with the output from the embedded ruby code.
> >
> > There's not much to it in normal usage. The key concepts are that
> > ruby code gets embedded within <% %> pairs, If the first <% is
> > followed by an = sign, then the value of the ruby expression following
> > is inserted into the output.
> >
> > The client browser never sees the rhtml, only the (x)html which
> > results from running erb.
> >
> >
> > --
> > Rick DeNatale
> >
> > My blog on Ruby
> > http://talklikeaduck.denh...
> >
>
>
>


--
http://www.jeremymca...

My free Ruby e-book:
http://www.humblelittlerubybook...

My blogs:
http://www.mrneigh...
http://www.rubyinpra...

John Joyce

3/21/2007 1:43:00 AM

0


On Mar 21, 2007, at 2:44 AM, Jeremy McAnally wrote:

> That's not entirely true; if you're using eRb with Rails, it requires
> that templates end in rhtml or erb. Otherwise, you could coceivably
> use it without an extension.
>
> --Jeremy
>
> On 3/20/07, John Joyce <dangerwillrobinsondanger@gmail.com> wrote:
>> ...It is important only if you use multiple language
>> interpreters or your web application framework requires it.
>
Read the whole post again and notice the part above.
It is entirely true.
Rails is a web application framework that requires it. It doesn't
have to though. It doesn't even have to use ERb, it can use one of
the other eRuby implementations such as eRubis. But these things take
tinkering. Configuration.