<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>BlackBox : Tag tapestry4</title>
    <link>http://www.warneronstine.com/blog/articles/tag/tapestry4</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Where technology and art disappear</description>
    <item>
      <title>Optimizing Tapestry 4 for development</title>
      <description>&lt;p&gt;Periodically I will do small consulting gigs and recently had a client who wanted to know if there was a way that they could improve their development experience with Tapestry 4. Their specific problem lied in the fact that when they initially pulled up any Tapestry page it was incredibly slow to render that first time. They were not using the property &lt;a href="http://tapestry.apache.org/tapestry4.1/usersguide/configuration.html"&gt;&lt;code&gt;org.apache.tapestry.disable-caching&lt;/code&gt;&lt;/a&gt; so that definitely wasn&amp;#8217;t the issue.&lt;/p&gt;

&lt;p&gt;The solutions that I came up with after doing some research and looking at their code were these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Jetty for development&lt;/li&gt;
&lt;li&gt;Convert as much of their pages (and components) to be &amp;#8220;spec-less&amp;#8221; as possible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Two primary reasons to use Jetty are that it allows you to more easily reload HTML changes and in general is a much more lightweight container than Tomcat, therefore getting an overall faster startup time and increasing development time. One of their own developers was already using Jetty and was seeing speed increases.&lt;/p&gt;

&lt;p&gt;The primary reason to convert your HTML pages to be &amp;#8221;&lt;a href="http://wiki.apache.org/tapestry/SpeclessPagesInWEB-INF"&gt;spec-less&lt;/a&gt;&amp;#8221; (in other words no *.page file to bother with) is that reduces the overhead that Tapestry 4 puts into place to parse the XML file and figure out how all the components are wired together. Instead it puts this in either the HTML template, which it is already parsing, or in the Java class as an Annotation.&lt;/p&gt;

&lt;p&gt;This also has the side benefit of prepping your code for converting up to Tapestry 5 as it uses no *.page files whatsoever.&lt;/p&gt;</description>
      <pubDate>Fri, 02 May 2008 09:45:47 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:5aee5eeb-10a0-4bf2-8220-6ee0b570da87</guid>
      <author>Warner Onstine</author>
      <link>http://www.warneronstine.com/blog/articles/2008/05/02/optimizing-tapestry-4-for-development</link>
      <category>programming</category>
      <category>tapestry</category>
      <category>tapestry4</category>
      <trackback:ping>http://www.warneronstine.com/blog/articles/trackback/319</trackback:ping>
    </item>
  </channel>
</rss>
