<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Flapjax Templates</title>
	<atom:link href="http://www.weaselhat.com/2006/10/25/flapjax-templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/</link>
	<description></description>
	<lastBuildDate>Tue, 25 Oct 2011 15:23:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: rektide</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-33</link>
		<dc:creator>rektide</dc:creator>
		<pubDate>Thu, 11 Jan 2007 19:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-33</guid>
		<description>the inability to inline JS with HTML has always been a royal PITA.  i recently started a client side javascript templating engine that relies on a js pre-proessor to parse out any inlined html into the JS script itself.  you&#039;ve got a similar thing going on here.  i was pretty amazed how easy it was to write.  my boo preprocessor is just shy of 250 lines, albiet theres a lot of error checking i dont do (mostly related to handling of arguments and file manipulation, the processing itself is fairly minimal/safe).</description>
		<content:encoded><![CDATA[<p>the inability to inline JS with HTML has always been a royal PITA.  i recently started a client side javascript templating engine that relies on a js pre-proessor to parse out any inlined html into the JS script itself.  you&#8217;ve got a similar thing going on here.  i was pretty amazed how easy it was to write.  my boo preprocessor is just shy of 250 lines, albiet theres a lot of error checking i dont do (mostly related to handling of arguments and file manipulation, the processing itself is fairly minimal/safe).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-19</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Tue, 31 Oct 2006 17:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-19</guid>
		<description>Well the &lt;tt&gt;fisheye&lt;/tt&gt; lens has concrete domain &lt;tt&gt;{ header: &lt;b&gt;html&lt;/b&gt;, buttons: &lt;b&gt;[ html ]&lt;/b&gt; }&lt;/tt&gt; and an abstract range of fisheye &lt;tt&gt;div&lt;/tt&gt; structures.  Note that all fisheye does is alter structure: the concrete model gets converted into a DOM subtree.

In my system, you should be able to build up &lt;tt&gt;fisheye&lt;/tt&gt; as a bidirectional program itself.  (This is pretty easy, since &lt;tt&gt;DIV(&lt;b&gt;attributes&lt;/b&gt;, &lt;b&gt;[ html ]&lt;/b&gt;)&lt;/tt&gt; and all of the other element constructors can easily be lenses!)  In that case, it would be compositionally derivable that &lt;tt&gt;fisheye&lt;/tt&gt; introduces no new data to the model.

So I don&#039;t fully understand your problem, or what you mean by &quot;[the] data the fisheye provides ... should be made explicit, rather than being pulled out of a returned DOM node.&quot;  What do &#039;data&#039;, &#039;explicit&#039;, and &#039;returned&#039; mean?  I have the feeling that explaining my lens driver -- the system which decides when to &lt;tt&gt;get&lt;/tt&gt; and &lt;tt&gt;putback&lt;/tt&gt; -- would clarify things.</description>
		<content:encoded><![CDATA[<p>Well the <tt>fisheye</tt> lens has concrete domain <tt>{ header: <b>html</b>, buttons: <b>[ html ]</b> }</tt> and an abstract range of fisheye <tt>div</tt> structures.  Note that all fisheye does is alter structure: the concrete model gets converted into a DOM subtree.</p>
<p>In my system, you should be able to build up <tt>fisheye</tt> as a bidirectional program itself.  (This is pretty easy, since <tt>DIV(<b>attributes</b>, <b>[ html ]</b>)</tt> and all of the other element constructors can easily be lenses!)  In that case, it would be compositionally derivable that <tt>fisheye</tt> introduces no new data to the model.</p>
<p>So I don&#8217;t fully understand your problem, or what you mean by &#8220;[the] data the fisheye provides &#8230; should be made explicit, rather than being pulled out of a returned DOM node.&#8221;  What do &#8216;data&#8217;, &#8216;explicit&#8217;, and &#8216;returned&#8217; mean?  I have the feeling that explaining my lens driver &#8212; the system which decides when to <tt>get</tt> and <tt>putback</tt> &#8212; would clarify things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-18</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Tue, 31 Oct 2006 12:42:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-18</guid>
		<description></description>
		<content:encoded><![CDATA[<p>&gt;&gt;Modules with templated code? Sounds like a function to me.</p>
<p>Yep.</p>
<p>&gt;&gt; Of course, if there’s no data to read out, it’s a boring lens, but so it goes.</p>
<p>How would it be clear what data the fisheye provides? I think it should be made explicit, rather than being pulled out of a returned dom node,<br />
which is why I said module (not sure about state implications), though a return of a record would work superficially:</p>
<p>(module ‘fisheye’ (header : htmlb, buttons : list htmlb) (iconSize : number)<br />
div(header, input({id: iconSize} /* lense magik */), map ( x -&gt; div(x), buttons)))</p>
<p>…</p>
<p>x = fisheye(div(), (div(), div())) /* record:  x.domNode, x.iconSize */</p>
<p>&gt;&gt; What does Crash have to do with Preston of the unending opinions?</p>
<p>Reminded me of one of the opinions he exposed to me, some reason I thought you were there to witness it.</p>
<p>You need a preview button :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-15</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Mon, 30 Oct 2006 19:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-15</guid>
		<description>Modules with templated code?  Sounds like a function to me.  You would say something like &lt;tt&gt;fisheye(headerB, listOfButtonsB)&lt;/tt&gt;, which would be a lens.  Of course, if there&#039;s no data to read out, it&#039;s a boring lens, but so it goes.

What does Crash have to do with Preston of the unending opinions?</description>
		<content:encoded><![CDATA[<p>Modules with templated code?  Sounds like a function to me.  You would say something like <tt>fisheye(headerB, listOfButtonsB)</tt>, which would be a lens.  Of course, if there&#8217;s no data to read out, it&#8217;s a boring lens, but so it goes.</p>
<p>What does Crash have to do with Preston of the unending opinions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-14</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Mon, 30 Oct 2006 09:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-14</guid>
		<description>Ah we talking about different things. I&#039;m talking about something closer to modules, but whose contents are just templated code:

(module &#039;fisheye&#039; (header : htmlb, buttons : list htmlb)
  {! header !}
  {! button !})
  
...


  
or some similarly eye-gauging syntax. &#039;buttons&#039; in the above case would naturally be a Behaviour, but what happens when we are describing a list with dragable items? Hello lenses.

It&#039;s simple, obvious, and grunt work - but stops one of the biggest complaints against templating: the loss of modular reasoning.

Just be careful not to Crash (http://www.imdb.com/title/tt0115964/) - my lingering memory of Preston.</description>
		<content:encoded><![CDATA[<p>Ah we talking about different things. I&#8217;m talking about something closer to modules, but whose contents are just templated code:</p>
<p>(module &#8216;fisheye&#8217; (header : htmlb, buttons : list htmlb)<br />
  {! header !}<br />
  {! button !})</p>
<p>&#8230;</p>
<p>or some similarly eye-gauging syntax. &#8216;buttons&#8217; in the above case would naturally be a Behaviour, but what happens when we are describing a list with dragable items? Hello lenses.</p>
<p>It&#8217;s simple, obvious, and grunt work &#8211; but stops one of the biggest complaints against templating: the loss of modular reasoning.</p>
<p>Just be careful not to Crash (<a href="http://www.imdb.com/title/tt0115964/" rel="nofollow">http://www.imdb.com/title/tt0115964/</a>) &#8211; my lingering memory of Preston.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-13</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Sun, 29 Oct 2006 16:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-13</guid>
		<description>I should have been more clear: by template, I meant the {! !} include syntax we have.  I would only use them as a marker for where a lens&#039; output should appear.

In your sense of &quot;template as widget&quot;, I&#039;m not sure how lenses and templates are different at all.  Lenses, in my proposed system, would be model-to-view isomorphisms.  Any intervening &quot;template&quot; which expanded a view element to a more complicated view element could be nothing other than a lens -- how else would be extract the data?  So to say they&#039;re orthogonal doesn&#039;t even compute for me.

I am excited to see how the lens work will interact with animation.  I&#039;m not sure what attributes/elements an animation will need to affect; I think so long as id attributes are left alone, the lens system will be happy.

The race is on indeed!  And it is of epic, &lt;i&gt;Deathrace 2000&lt;/i&gt; proportions.  Call me Thomasina Paine.</description>
		<content:encoded><![CDATA[<p>I should have been more clear: by template, I meant the {! !} include syntax we have.  I would only use them as a marker for where a lens&#8217; output should appear.</p>
<p>In your sense of &#8220;template as widget&#8221;, I&#8217;m not sure how lenses and templates are different at all.  Lenses, in my proposed system, would be model-to-view isomorphisms.  Any intervening &#8220;template&#8221; which expanded a view element to a more complicated view element could be nothing other than a lens &#8212; how else would be extract the data?  So to say they&#8217;re orthogonal doesn&#8217;t even compute for me.</p>
<p>I am excited to see how the lens work will interact with animation.  I&#8217;m not sure what attributes/elements an animation will need to affect; I think so long as id attributes are left alone, the lens system will be happy.</p>
<p>The race is on indeed!  And it is of epic, <i>Deathrace 2000</i> proportions.  Call me Thomasina Paine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-12</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Sat, 28 Oct 2006 14:57:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-12</guid>
		<description></description>
		<content:encoded><![CDATA[<p>&gt;&gt; Programmers design an interface of exported variables and designers can then say, “put the dynamic value FOO here”.</p>
<p>Yes, if by exported variables you mean variables to be shared between a template instantiation and whatever code instantiated/embedded it.   This interface is what I mean by allowing abstraction over templates: a widget template should be explicitely parameterized. The theory of lenses is orthogonal to templates, but I think  most data passed into a template would be best described with lenses.  I haven&#8217;t had a chance to read Pierce&#8217;s ~60 page report yet but the idea seems intuitive &#8211;   I may be way off base.</p>
<p>&gt;&gt; As for abstraction, I think that should all take place in the code, not in the<br />
template itself. </p>
<p>I do not know what you mean &#8211; I view the template as most of the code, with helper functions for describing the data relationships (the lenses) and animations (frp). I am interested in describing the smallest templates (for example, a display list)  and then combining their instantiations into bigger templates, such as two lists sharing their data and styled  extended with some externally defined animations. </p>
<p>It will be interesting to see when lenses would be more appriate than frp, more specifically  in the gap between what I have been calling data relationships and animations.</p>
<p>The race is on: me with adding basic FOL style operators to frp for defining animations (a looser letrec) and you for lenses :) It will be kick ass if even just one of us delivers :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Greenberg</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-11</link>
		<dc:creator>Michael Greenberg</dc:creator>
		<pubDate>Fri, 27 Oct 2006 04:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-11</guid>
		<description>I&#039;m not sure what you mean by &quot;where the data comes from&quot;.  Like I said over lunch, I advocate using only variable names in templates.  Programmers design an interface of exported variables and designers can then say, &quot;put the dynamic value FOO here&quot;.

As for abstraction, I think that should all take place in the code, not in the template itself.  In fact, my thesis is that a succinct bidirectional specification (&#039;program&#039;) of the presentation structure (along with functional reactive programing) is sufficient to connect the model to the view, i.e. act as a controller.  In this case, templates aren&#039;t necessary at all.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what you mean by &#8220;where the data comes from&#8221;.  Like I said over lunch, I advocate using only variable names in templates.  Programmers design an interface of exported variables and designers can then say, &#8220;put the dynamic value FOO here&#8221;.</p>
<p>As for abstraction, I think that should all take place in the code, not in the template itself.  In fact, my thesis is that a succinct bidirectional specification (&#8216;program&#8217;) of the presentation structure (along with functional reactive programing) is sufficient to connect the model to the view, i.e. act as a controller.  In this case, templates aren&#8217;t necessary at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leo</title>
		<link>http://www.weaselhat.com/2006/10/25/flapjax-templates/comment-page-1/#comment-10</link>
		<dc:creator>leo</dc:creator>
		<pubDate>Thu, 26 Oct 2006 15:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.weaselhat.com/2006/10/25/flapjax-templates/#comment-10</guid>
		<description>My beef with templating - here and in most other systems - is difficulty in specifying where the data comes from. 

One should be able to cut a chunk of template out and abstract it. 

As we&#039;re in a position to provide this sort of approach, I think we should do it and let naysayers shove it and depend on the current approach of convoluted advice systems with callbacks.</description>
		<content:encoded><![CDATA[<p>My beef with templating &#8211; here and in most other systems &#8211; is difficulty in specifying where the data comes from. </p>
<p>One should be able to cut a chunk of template out and abstract it. </p>
<p>As we&#8217;re in a position to provide this sort of approach, I think we should do it and let naysayers shove it and depend on the current approach of convoluted advice systems with callbacks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

