Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 3093 invoked from network); 4 Dec 2009 14:52:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 14:52:36 -0000 Received: (qmail 36964 invoked by uid 500); 4 Dec 2009 14:52:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 36893 invoked by uid 500); 4 Dec 2009 14:52:34 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 36882 invoked by uid 99); 4 Dec 2009 14:52:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 14:52:34 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nrstott@gmail.com designates 209.85.218.218 as permitted sender) Received: from [209.85.218.218] (HELO mail-bw0-f218.google.com) (209.85.218.218) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 14:52:31 +0000 Received: by bwz10 with SMTP id 10so2010605bwz.35 for ; Fri, 04 Dec 2009 06:52:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=IS0GWYGfYMv0JI+q0Z7yJL7W0Ybm5yi09uMRrTbUhNA=; b=iuS+Piq1vm2H/uxG9nRmlgVVuAE45ljLo6n+3n9eAlVTr6LuKr2BXvmMk5wgQ7YY9B 9rokrRacmGb1PU58kDbJzA3Vw2ZFn4EoHc2XAr9B0LRdgPj1rdN+7j0wi6Wstl0p7fFJ AhfnC2DEALM/x70LAOk2ejbvVPvQ6WtN7xjiw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=axKMondsvBjsr3HobrsaKkU0cDc8ErHzN75NaS6HVH/SI7xgmhKsrxDMZOCJdn6Aqe FuIHQjQlnyyEfZQQzHok5/iXcenLaAdMAdMf9epHv+82t1dS+EZCH3khdGDaBMdQVv4X OAjfp94r86SYlKj8dxF0WrKbX5EjKJnVqu3Wo= MIME-Version: 1.0 Received: by 10.204.16.206 with SMTP id p14mr935507bka.72.1259938330283; Fri, 04 Dec 2009 06:52:10 -0800 (PST) In-Reply-To: <7F739197-9056-43DD-AE3F-828412F7F4CC@webjourney.org> References: <4B1829E5.3080406@rogerbinns.com> <4B18C2F1.6080509@rogerbinns.com> <4B18C8AD.8000401@rogerbinns.com> <7F739197-9056-43DD-AE3F-828412F7F4CC@webjourney.org> Date: Fri, 4 Dec 2009 08:52:10 -0600 Message-ID: Subject: Re: Javascript templating for shows/lists From: Nathan Stott To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000325554fae9d91c50479e840ed --000325554fae9d91c50479e840ed Content-Type: text/plain; charset=ISO-8859-1 I second what Benoit said. EJS works great. I use it a lot. It does way more than Resig's simple templating. On Fri, Dec 4, 2009 at 8:38 AM, Yohei Sasaki wrote: > Hi, > > I'm from Rails to Couch. I use embeddedjs, too, because it is similar to > ERB. > > >Also no idea if it does html escaping of values - examining > >code leads me to believe it does not. > > I think so, and I started to develop the library like ActionView. > http://github.com/yssk22/crayon > > This library enables you to write as followings: > > <%= h(var) %> > <%= text_field(doc, "path-to-field") %> > > Thanks. > > -- > Yohei Sasaki > http://www.yssk22.info/ > > On 2009/12/04, at 17:30, Roger Binns wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Benoit Chesneau wrote: > >> embeddedjs works well here... which crash did you have ? > > > > It is probably versioning or something. The error text is: > > > > JavaScript function raised error: TypeError: regex.exec is not a > function > > > > I'm using CouchDB 0.10.0 on Ubuntu 9.10. Embeddedjs doesn't look too > > promising anyway. It is just Javascript embedded in text, but John > Resig's > > code can do that too (and with way less code). I do like the error > > reporting (line number and details) although that seems unlikely to work > > server side. Also no idea if it does html escaping of values - examining > > code leads me to believe it does not. > > > > Roger > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.9 (GNU/Linux) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > > > iEYEARECAAYFAksYyK0ACgkQmOOfHg372QQ82gCgr/9Gol0FLyDDGRcHyJW9qvjV > > zcUAn3kvWoBf9nc+E0TJLmyJUP95LcCo > > =/lQ6 > > -----END PGP SIGNATURE----- > > --000325554fae9d91c50479e840ed--