<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Keep your JavaFX code clean</title>
	<atom:link href="http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/feed/" rel="self" type="application/rss+xml" />
	<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/</link>
	<description>Exposing the pixels behind beautiful user interfaces</description>
	<lastBuildDate>Thu, 10 Dec 2009 16:18:30 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-552</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Wed, 06 May 2009 10:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-552</guid>
		<description>Hi John,

I agree that we need an &quot;Interface Builder&quot;-like tool in Java, and I&#039;m OK with it storing the UI in an opaque file -- in fact I think I might prefer opaque storage.

However, I don&#039;t think that there is anything to be gained by converting XIB files to Java UIs. For example, in Interface Builder, you can mark components with certain properties to change the way they render; that is you can indicate that an OutlineView should render as a SourceList, or that a button should render as a Disclosure button. These things just won&#039;t translate, which I think makes trying to convert a XIB file to a Java UI a futile effort.

-Ken</description>
		<content:encoded><![CDATA[<p>Hi John,</p>
<p>I agree that we need an &#8220;Interface Builder&#8221;-like tool in Java, and I&#8217;m OK with it storing the UI in an opaque file &#8212; in fact I think I might prefer opaque storage.</p>
<p>However, I don&#8217;t think that there is anything to be gained by converting XIB files to Java UIs. For example, in Interface Builder, you can mark components with certain properties to change the way they render; that is you can indicate that an OutlineView should render as a SourceList, or that a button should render as a Disclosure button. These things just won&#8217;t translate, which I think makes trying to convert a XIB file to a Java UI a futile effort.</p>
<p>-Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-551</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 06 May 2009 05:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-551</guid>
		<description>For UI design Java needs a new app that is not a &quot;text editor&quot;.

Java needs Interface Builder (for JavaFX / Swing + MiG layout, whatever). Not more &quot;text editing&quot;.

Engineers, chip designers, artists use AutoCAD, Photoshop, Final Cut Pro, Pro Tools, ...whatever -- not &quot;text editors&quot;. Who gives a crap about the storage format for a UI? Certainly not Interface Builder users. This app is the gold standard in UI design, originally created in the 80s! Second place contenders are still far behind. For anyone interested it&#039;s currently an XML format, before that a binary .plist format (bad for version control). The point is nobody edits .xib files by hand in a &quot;text editor&quot;.

Judging by what Sun have done with the UI design tools in NetBeans it is safe to say that it is an impossibility for Sun to create anything close to Interface Builder within the next 100 years. This appears true for other efforts too. Shame.

Thus we need a new build tool that converts an Interface Builder .xib file to JavaFX....!

Where can such a godsend be found?

- John</description>
		<content:encoded><![CDATA[<p>For UI design Java needs a new app that is not a &#8220;text editor&#8221;.</p>
<p>Java needs Interface Builder (for JavaFX / Swing + MiG layout, whatever). Not more &#8220;text editing&#8221;.</p>
<p>Engineers, chip designers, artists use AutoCAD, Photoshop, Final Cut Pro, Pro Tools, &#8230;whatever &#8212; not &#8220;text editors&#8221;. Who gives a crap about the storage format for a UI? Certainly not Interface Builder users. This app is the gold standard in UI design, originally created in the 80s! Second place contenders are still far behind. For anyone interested it&#8217;s currently an XML format, before that a binary .plist format (bad for version control). The point is nobody edits .xib files by hand in a &#8220;text editor&#8221;.</p>
<p>Judging by what Sun have done with the UI design tools in NetBeans it is safe to say that it is an impossibility for Sun to create anything close to Interface Builder within the next 100 years. This appears true for other efforts too. Shame.</p>
<p>Thus we need a new build tool that converts an Interface Builder .xib file to JavaFX&#8230;.!</p>
<p>Where can such a godsend be found?</p>
<p>- John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-508</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Tue, 24 Mar 2009 18:03:57 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-508</guid>
		<description>Nice...I think you&#039;ve got a good balance there. 

I&#039;m not sure how to articulate the rules to follow when writing JavaFX script, but I do know that it should be *readable*, where readable means that I can follow the code relatively effortlessly. I think you&#039;ve done that with your code snippet.

Your right about a larger file being the true test - I&#039;ve seen some pretty gnarly JavaFX script that was virtually impenetrable!

-Ken</description>
		<content:encoded><![CDATA[<p>Nice&#8230;I think you&#8217;ve got a good balance there. </p>
<p>I&#8217;m not sure how to articulate the rules to follow when writing JavaFX script, but I do know that it should be *readable*, where readable means that I can follow the code relatively effortlessly. I think you&#8217;ve done that with your code snippet.</p>
<p>Your right about a larger file being the true test &#8211; I&#8217;ve seen some pretty gnarly JavaFX script that was virtually impenetrable!</p>
<p>-Ken</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-507</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 24 Mar 2009 18:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-507</guid>
		<description>Hi Ken,

I agree, going more than a few levels deep gets really bad (though I might extend it to 5 levels before I start to get lost). I think the same general problem with deeply nested if/while/for statements applies here. I suspect breaking out deep parts of the tree into separate files is probably going to win out as deep trees also tend to have reusable chunks. We&#039;ll see I guess as we go along.</description>
		<content:encoded><![CDATA[<p>Hi Ken,</p>
<p>I agree, going more than a few levels deep gets really bad (though I might extend it to 5 levels before I start to get lost). I think the same general problem with deeply nested if/while/for statements applies here. I suspect breaking out deep parts of the tree into separate files is probably going to win out as deep trees also tend to have reusable chunks. We&#8217;ll see I guess as we go along.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-506</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 24 Mar 2009 17:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-506</guid>
		<description>I blogged my version of the code:

http://weblogs.java.net/blog/rbair/archive/2009/03/keep_your_fx_co.html

It runs between the two styles, but favors the first. Short example, so its easy to make the first form look good, so you need to produce a really horrible 3 page long example and then we can go another round and see what the code looks like :-)

Notice that I use the more compact KeyFrame literal syntax (which I can do since there is no action function declared on these keyframes) and that goes a long way towards cleaning it up, as does using translateY instead of transforms and since the Line&#039;s are simple they can go on one line.</description>
		<content:encoded><![CDATA[<p>I blogged my version of the code:</p>
<p><a href="http://weblogs.java.net/blog/rbair/archive/2009/03/keep_your_fx_co.html" rel="nofollow">http://weblogs.java.net/blog/rbair/archive/2009/03/keep_your_fx_co.html</a></p>
<p>It runs between the two styles, but favors the first. Short example, so its easy to make the first form look good, so you need to produce a really horrible 3 page long example and then we can go another round and see what the code looks like :-)</p>
<p>Notice that I use the more compact KeyFrame literal syntax (which I can do since there is no action function declared on these keyframes) and that goes a long way towards cleaning it up, as does using translateY instead of transforms and since the Line&#8217;s are simple they can go on one line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-505</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Tue, 24 Mar 2009 17:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-505</guid>
		<description>Hi Richard,

Your right in that pulling out everything into defs isn&#039;t the right answer, but I think there is a balance (one I have yet to find!). I&#039;m sure best practices will emerge out of good solutions as we go along. I think we&#039;ll discover, though, that nesting things much more than 3 levels deep will be untenable.

-Ken
P.S. I&#039;m looking forward to the &lt;a href=&quot;http://blogs.sun.com/tor/date/20090311&quot; rel=&quot;nofollow&quot;&gt;designer tool that Tor alluded to&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Hi Richard,</p>
<p>Your right in that pulling out everything into defs isn&#8217;t the right answer, but I think there is a balance (one I have yet to find!). I&#8217;m sure best practices will emerge out of good solutions as we go along. I think we&#8217;ll discover, though, that nesting things much more than 3 levels deep will be untenable.</p>
<p>-Ken<br />
P.S. I&#8217;m looking forward to the <a href="http://blogs.sun.com/tor/date/20090311" rel="nofollow">designer tool that Tor alluded to</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-502</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 24 Mar 2009 17:44:30 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-502</guid>
		<description>I don&#039;t like the first form because so much indentation is hard to read. I don&#039;t like the second form because you cannot correlate code structure to visual structure without jumping around in the code.

I think you&#039;re right, we haven&#039;t figured out what good style in JavaFX is yet. I think breaking everything down into def&#039;s is ugly too. I think defining both KeyFrames separately is very ugly.

And setting the width/height on the Stage instead of the Scene is a bad practice. Bad on us! We shouldn&#039;t be showing examples of setting width/height on Stage instead of Scene.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t like the first form because so much indentation is hard to read. I don&#8217;t like the second form because you cannot correlate code structure to visual structure without jumping around in the code.</p>
<p>I think you&#8217;re right, we haven&#8217;t figured out what good style in JavaFX is yet. I think breaking everything down into def&#8217;s is ugly too. I think defining both KeyFrames separately is very ugly.</p>
<p>And setting the width/height on the Stage instead of the Scene is a bad practice. Bad on us! We shouldn&#8217;t be showing examples of setting width/height on Stage instead of Scene.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JavaFX Links (4) &#171; Java and more &#8230;</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-476</link>
		<dc:creator>JavaFX Links (4) &#171; Java and more &#8230;</dc:creator>
		<pubDate>Tue, 17 Mar 2009 19:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-476</guid>
		<description>[...] you ever wonder, why JavaFX code is so ugly, with a lot of paranthesis etc.? Keep your code clean is the logical [...]</description>
		<content:encoded><![CDATA[<p>[...] you ever wonder, why JavaFX code is so ugly, with a lot of paranthesis etc.? Keep your code clean is the logical [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-451</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Sat, 07 Mar 2009 14:05:23 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-451</guid>
		<description>@Ken

I tend to agree. The thing is: I still deem a declarative approach to be a good thing, but only down to a certain level - burying all variables inside a labyrinth of anonymous inner classes does not seem like a good idea to me in ANY language, not just Java and JavaFX.

@Brian

I do not think you are blinded by Java ;) ... before starting my Ph.D. and consequently started using Java only, I have been developing PHP/HTML/JS applications for some five years and still I do not like the nested structures. 
Your transformed version of the initial JFX script already shows that clearer structure is possible. I just fear, we will not see it that often in JFX applications in the next few years.

Best,
S.</description>
		<content:encoded><![CDATA[<p>@Ken</p>
<p>I tend to agree. The thing is: I still deem a declarative approach to be a good thing, but only down to a certain level &#8211; burying all variables inside a labyrinth of anonymous inner classes does not seem like a good idea to me in ANY language, not just Java and JavaFX.</p>
<p>@Brian</p>
<p>I do not think you are blinded by Java ;) &#8230; before starting my Ph.D. and consequently started using Java only, I have been developing PHP/HTML/JS applications for some five years and still I do not like the nested structures.<br />
Your transformed version of the initial JFX script already shows that clearer structure is possible. I just fear, we will not see it that often in JFX applications in the next few years.</p>
<p>Best,<br />
S.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maya Incaand</title>
		<link>http://explodingpixels.wordpress.com/2009/03/05/keep-your-javafx-code-clean/#comment-449</link>
		<dc:creator>Maya Incaand</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://explodingpixels.wordpress.com/?p=687#comment-449</guid>
		<description>Hi Ken, Brian 

I put a png of the code here: http://drop.io/t3tqdys
(hope it works).

The Scene content is a pair of lines on a background image.

The Timeline moves the lines over a 3 second interval between -20 and 200.

Both these things can just be &quot;read&quot; once you are used to the syntax.

There are just two vars, a y-coordinate and the image Url.

I agree there should be a balance in this, I just don&#039;t agree with you about where it should be. 

I also think this will evolve with subsequent releases of JavaFX, right now everybody is just getting to grips with it.</description>
		<content:encoded><![CDATA[<p>Hi Ken, Brian </p>
<p>I put a png of the code here: <a href="http://drop.io/t3tqdys" rel="nofollow">http://drop.io/t3tqdys</a><br />
(hope it works).</p>
<p>The Scene content is a pair of lines on a background image.</p>
<p>The Timeline moves the lines over a 3 second interval between -20 and 200.</p>
<p>Both these things can just be &#8220;read&#8221; once you are used to the syntax.</p>
<p>There are just two vars, a y-coordinate and the image Url.</p>
<p>I agree there should be a balance in this, I just don&#8217;t agree with you about where it should be. </p>
<p>I also think this will evolve with subsequent releases of JavaFX, right now everybody is just getting to grips with it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
