Hello it seems an interesting idea. I wrote something similar (a basic client side search-and-replace engine) for my company. and, for a funny coincidence, it has been used in our "maps" platform lol. could make sense a server side version? (like a flex-bison tool..) or would it be just another template engine?
On Tue, Jul 1, 2008 at 9:42 PM, David Mark Byttow <[EMAIL PROTECTED]> wrote: > Hi, > > My colleague, Lev Epshteyn, and I have been following the spec discussions > on the OpenSocial Templates proposal ( > http://groups.google.com/group/opensocial-and-gadgets-spec/web/opensocial-templates). > We think it's great how this is coming together and we have discussed some > ideas for implementing the spec on the client-side. In fact, we have also > made some good headway in coding up a prototype around one of them. We'd > like to get broader input from shindig-dev and discuss next steps. > > At the core of our design is an open source technology called JSTemplate ( > http://code.google.com/p/google-jstemplate/). This technology has been used > for a few years in various parts of Google Maps, and is pretty mature. It > has been released by Google under the Apache 2.0 license recently. To sum it > up, JSTemplate uses special attributes on the DOM nodes to process > instructions. For example: > > The following HTML: > <a jsvalues="href:url" jscontent="anchor"></a> > > Supplied the following JSON data: > { url: "http://foo.com", anchor: "bar" } > > Becomes: > <a href="http://foo.com">Bar</a> > > One primary, but easily overlooked advantage of JSTemplate is that it has > been heavily optimized for performing well in different browser environments > and operates purely on the browser's DOM. Its disadvantage is that the > library syntax is much less accessible than the spec developed for > OpenSocial. > > Our idea has been to create a "compiler" which will transform templates > written in OpenSocial format into DOM trees that can be used by JSTemplate. > This way, once a template is "compiled", it can be rendered any number of > times by the mature rendering core of JSTemplate. > > A simple example of such compilation would transform: > <a href="${url}">${anchor}</a> > Into the DOM snippet shown above when supplied with the same JSON data. > > Our initial prototype has shown this to be a fairly straightforward process, > and we look forward to getting your thoughts and proposing some patches to > shindig. > > Any thoughts? > > Thanks. > David Byttow >

