[racket] Dynamic Templates?

From: Erik Pearson (erik at adaptations.com)
Date: Thu Jun 6 12:01:34 EDT 2013

It bugs me too, at times. But it does solve some problems. My cell
hates big giant web pages that take three minutes to load when all I'm
looking for is a phone number or "why is my Comcast down?". (The
answer is you have to wade through big giant web pages in order to
sign up for text alerts.) My cell phone would love extremely simple
small pages less than 1K in size with no graphics and just text and
lists of links. Then again most web designers are not targeting their
sites at a Nokia E71 user over 3G! Yes, I think that is a terrible
oversight. A smart core web page with js feature detection and
performance measurement could adjust to your device and provide a
tailored experience. Maybe a little server side sniffing to catch
certain devices for which even this will either fail or be too slow.

On Thu, Jun 6, 2013 at 8:22 AM, Sean McBeth <sean.mcbeth at gmail.com> wrote:
> My cellphone and I, we hates the client-side HTML rendering, gollumgollum.
> On Thu, Jun 6, 2013 at 11:01 AM, Jay McCarthy <jay.mccarthy at gmail.com>
> wrote:
>> I'm curious why you think Mustache is better than Scribble (and the
>> full power of Racket) in your templates?
>> On Thu, Jun 6, 2013 at 8:53 AM, Joe Gibbs Politz <joe at cs.brown.edu> wrote:
>> > On Wed, Jun 5, 2013 at 9:37 PM, Erik Pearson <erik at adaptations.com>
>> > wrote:
>> >> @joe I have a relatively simple implementation of "mustache" templates
>> >> that I use for web server templating.
>> >>
>> >> Something similar to your example would be
>> >>
>> >> (render "Welcome {{username}}" #hasheq((username . "erik")))
>> >>
>> >> where the data is a jsexpr (as in the json module).
>> >>
>> >> If you are interested, I can send it. You could rip it apart and use
>> >> it. I do plan on (kinda, sorta, eventually) releasing it into the
>> >> planet and/or github, but it still needs more work, has not been
>> >> tested (other than being used and any bugs fixed.)
>> >
>> > Please do share!  I'd like to give it a whirl; when I sent this
>> > message I was somewhat hoping to hear about a package for Mustache in
>> > Racket :-p
>> > ____________________
>> >   Racket Users list:
>> >   http://lists.racket-lang.org/users
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>> "The glory of God is Intelligence" - D&C 93
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Erik Pearson
;; web form and function

Posted on the users mailing list.