Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Translate HAML on client side
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jan Koprowski  
View profile  
 More options Jun 27, 1:24 am
From: Jan Koprowski <jan.koprow...@gmail.com>
Date: Fri, 26 Jun 2009 22:24:57 -0700 (PDT)
Local: Sat, Jun 27 2009 1:24 am
Subject: Translate HAML on client side
Hi !

  From last few days i consider some extra scenario for using HAML.
How If HAML wasn't be translate on framework (server) side but a
little bit later on client side. Exactly in browser. This idea is was
submited on "Make the Web Faster" initiative Google Group.
  How this could work ? For instance like web extension with high
performance HAML translator wrote in JavaScript - which we can use in
almost all web browsers as GreasMonkey script or in Google Chrome
natively. Maybe there is the better way to make and use there extra
efficient C implemented translator.
  From C implementation is a short way to make HAML translation
entirely putting it to webservers for example as Apache 2 module,
nginx module.

What do You think ? Is this a good goals for make this cool HAML stuff
more popular and web faster ?

Greetings from Poland !
--
Jan Koprowski


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nathan Weizenbaum  
View profile  
 More options Jun 27, 1:38 am
From: Nathan Weizenbaum <nex...@gmail.com>
Date: Fri, 26 Jun 2009 22:38:14 -0700
Local: Sat, Jun 27 2009 1:38 am
Subject: Re: [haml] Translate HAML on client side

It's almost definitely going to be faster to do it on the server. Not only
are many servers going to have more computing power to devote to the task
than your average browser (and remember, in-browser Javascript runs slowly,
although it's getting faster), but Haml is much, much slower when it needs
to be parsed. On the server, Haml templates are cached; they only need to be
parsed and evaled once, and from then on it's no more expensive than calling
a Ruby function. Client-side, though, every browser would need to parse the
Haml every time it loads a page.

Not to mention that a significant portion of what makes Haml nice is its
templating facilities - it allows you to embed Ruby code in a nice way. That
wouldn't work at all, and you'd probably need an additional templating
language just to insert server values into the templates.

On Fri, Jun 26, 2009 at 10:24 PM, Jan Koprowski <jan.koprow...@gmail.com>wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jan Koprowski  
View profile  
 More options Jun 27, 2:01 am
From: Jan Koprowski <jan.koprow...@gmail.com>
Date: Fri, 26 Jun 2009 23:01:52 -0700 (PDT)
Local: Sat, Jun 27 2009 2:01 am
Subject: Re: Translate HAML on client side

On 27 Cze, 07:38, Nathan Weizenbaum <nex...@gmail.com> wrote:

> It's almost definitely going to be faster to do it on the server. Not only
> are many servers going to have more computing power to devote to the task
> than your average browser (and remember, in-browser Javascript runs slowly,
> although it's getting faster), but Haml is much, much slower when it needs
> to be parsed. On the server, Haml templates are cached; they only need to be
> parsed and evaled once, and from then on it's no more expensive than calling
> a Ruby function. Client-side, though, every browser would need to parse the
> Haml every time it loads a page.

In the face of HTML 5 cache ability this probably wasn't a problem.
Entirely HAML is better for whole Internet because HAML notice is the
most brief notice i have ever seen. On the other hand client side HAML
implementation could support caching interior.

> Not to mention that a significant portion of what makes Haml nice is its
> templating facilities - it allows you to embed Ruby code in a nice way. That
> wouldn't work at all, and you'd probably need an additional templating
> language just to insert server values into the templates.

As I say: i look HAML notation as brief and legible at the same time.
From this point of view HAML could drastically decrease data transfer
between browser and web server. I don't know statically how much HAML
is smaller then full XHTML site source but i think this is enough to
think about sending HAML to web browser instead (X)HTML or anything
else.

This is cool and innovative technology :] and deserve for publicity.

Greetings from Poland !
--
Jan Koprowski


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mislav Marohnić  
View profile  
 More options Jun 27, 10:15 am
From: Mislav Marohnić <mislav.maroh...@gmail.com>
Date: Sat, 27 Jun 2009 16:15:20 +0200
Local: Sat, Jun 27 2009 10:15 am
Subject: Re: [haml] Re: Translate HAML on client side

On Sat, Jun 27, 2009 at 08:01, Jan Koprowski <jan.koprow...@gmail.com>wrote:

> As I say: i look HAML notation as brief and legible at the same time.
> From this point of view HAML could drastically decrease data transfer
> between browser and web server. I don't know statically how much HAML
> is smaller then full XHTML site source but i think this is enough to
> think about sending HAML to web browser instead (X)HTML or anything
> else.

I respect your enthusiasm, but I have to agree with Nathan. Once you
take Haml out Ruby, it decreases a lot in value. Haml is
designed to *generate* HTML4-5 or XHTML, not to replace all of that by being
handled client-side by user agents. I also don't think a JavaScript
implementation can be as efficient as
compiled Haml templates on the server combined with caching (both server
and good ol' HTTP).

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google