<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Wed, 15 Feb 2012 01:55:04 GMT--><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:cc="http://web.resource.org/cc/"><rss:channel rdf:about="http://www.rimple.com/tech/"><rss:title>Rimple on Tech</rss:title><rss:link>http://www.rimple.com/tech/</rss:link><rss:description></rss:description><dc:language>en-US</dc:language><dc:date>2012-02-15T01:55:04Z</dc:date><admin:generatorAgent rdf:resource="http://www.squarespace.com/">Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</admin:generatorAgent><rss:items><rdf:Seq><rdf:li rdf:resource="http://www.rimple.com/tech/2012/1/8/roo-selenium-webdriverfailsafe-and-junit-smores-anyone.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/10/18/roo-in-the-corner-new-features-in-trunk.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/10/18/living-on-the-edge-of-a-roo-working-on-the-trunk.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/10/13/webflow-on-grails-and-jquery-ui-with-grails-at-the-philly-on.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/9/27/keeping-and-showing-jetty-jsp-source.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/9/24/roo-in-action-almost-there.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/9/4/skipping-the-pgp-signing-process.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/9/4/im-shellfamous.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/8/23/debugging-add-ons-via-the-roo-shell.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/8/21/now-you-can-choose-activerecord-or-servicerepo-for-roo-12.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/7/24/maven-search-site-online.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/7/17/testing-entity-validations-with-a-mock-entity-roo-in-action.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/5/19/railsconf-2011-my-personal-recap.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/4/19/its-a-comin-philly-emerging-tech.html"/><rdf:li rdf:resource="http://www.rimple.com/tech/2011/3/15/build-a-better-roo-exception-page.html"/></rdf:Seq></rss:items></rss:channel><rss:item rdf:about="http://www.rimple.com/tech/2012/1/8/roo-selenium-webdriverfailsafe-and-junit-smores-anyone.html"><rss:title>Roo, Selenium WebDriver,Failsafe and JUnit - Smores, anyone?</rss:title><rss:link>http://www.rimple.com/tech/2012/1/8/roo-selenium-webdriverfailsafe-and-junit-smores-anyone.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2012-01-08T20:42:20Z</dc:date><dc:subject>Spring Roo SpringSource Roo Tips</dc:subject><content:encoded><![CDATA[<p><span class="caps">S'M</span>ores are about the perfect mix of sugar, sugar and chocolate. So, the programming equivalent would be getting your Selenium tests separated from your unit tests, and running in an <span class="caps">API </span>that just needs a web server, not a separate Selenium server, right?</p>

<p>(Ok, I'm stretching it).</p>

<h3>A WebDriver test</h3>

<p>First, here is an integration test, <code>ITCourseSelenium.java</code> that uses the Selenium WebDriver <span class="caps">API.</span> Look how simple the code is:</p>

<p><notextile><br />
<script src="https://gist.github.com/1579611.js?file=ITCourseSelenium.java"></script><br />
</notextile></p>

<p>Next up, we have the Maven configuration for the various plugins to install Selenium (forget the current Selenium Roo add-on for this, it only sets up <span class="caps">HTML </span>tests and doesn't include the Java <span class="caps">API, </span>plus doesn't install WebDriver and needs to run on a port, which is tricky):</p>

<h3>Selenium Configuration</h3>

<p>Add these elements to your pom.xml file to set up the configuration:</p>

<p><notextile><br />
 <script src="https://gist.github.com/1579641.js?file=pom.xml"></script><br />
</notextile></p>

<p>These fragments configure a jetty web server, which starts up before integration testing. They also configure the maven-failsafe-plugin, which is attached to the integration-test and verify Maven lifecycle phases.</p>

<h3>Running the tests</h3>

<p>To run your tests, just issue the <code>mvn verify</code> command. All tests starting or ending with IT will run after the web application starts, and will be recorded as test results in <code>target/failsafe-reports</code>.</p>

<p>Enjoy.</p>

<p>Ken</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/10/18/roo-in-the-corner-new-features-in-trunk.html"><rss:title>Roo (in the) Corner - new features in trunk...</rss:title><rss:link>http://www.rimple.com/tech/2011/10/18/roo-in-the-corner-new-features-in-trunk.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-10-18T10:20:00Z</dc:date><dc:subject>Announcements News SpringSource Roo chariot-news tips</dc:subject><content:encoded><![CDATA[<p>I've been spending my time readying Roo in Action for publication.  Turns out, the Roo team had other ideas - including lots of new things you may want to be aware of if you are looking to support Roo 1.2 once it is released.</p>
<p><em>Keep in mind these changes are in-flight.  If you don't need to work on trunk, DO NOT WORK ON TRUNK.  This is something other platform afficianados do - for example, the Rails development community commonly calls this working on the "edge".  So, let's get edgy.</em></p>
<p>There are some really, really cool things in here.  I've seen them move toward opening up for all modes of development - some want JSF, so there is a JSF add-on.  They use PrimeFaces, and a dialog motif for adding new elements.  I'm sure they will tweak this as it goes along, but it looks more like the GWT or Flex mode of editing I saw before.</p>
<p>Breaking Changes (so far) - you may need to edit your code - I know I have to for now, but this is a temporary pain for some consistency gain within Roo.</p>
<ul>
<br />
<li>@RooEntity -&gt; @RooJpaActiveRecord</li>
<br />
<li>@RooWebScaffold - now a .scaffold. package after .controller.</li>
<br />
<li>@RooConversionService - now a .converter. package after .controller.</li>
<br /> 
</ul>
<p><br />Additions</p>
<ul>
<br />
<li>New <code>@RooEquals</code> - and a shell command for equals - this has been here for a little while, but is something that can be of use when defining models or other objects that need to be compared.  You can exclude fields from the factoring of the comparison.</li>
<br />
<li>new entity flags (recent anyway) to set entity name, table, and other attributes on entities - this is great, and includes the ability to define transaction manager names for cases where you are working with multiple JDBC datasources - nice!  Also, it lets you specify the entity manager - so if you have two persistence units to separate transaction managers (reporting database -vs- transactions) you have that option.  Again, not a huge deal, but lets you stay within Roo to get things done, without digging into code for a configuration option.  You can even set the table name, entity name, etc...</li>
<br />
<li>New settings for the json command - <code>--deepSerialize</code> and <code>--rootName</code> - I am not sure if these have been here long, but they are good to know about.</li>
<br />
<li>New &mdash;packaging element in project - includes POM or JAR right now.  Also includes <code>--parent</code>.  This could be great, as I think they are going to implement multi-pom support in Roo 1.2.  We'll stay tuned on that, and perhaps write a quick blog entry on what we've found.</li>
<br />
<li>New support for database dot com - a new database provider - I don't know much about it.</li>
<br />
<li>New date field support for both dateTimeFormatPattern AND dateFormat - I am unsure that the scaffold would deal with dateTimeFormatPattern.</li>
<br />
<li>JSF scaffolding in place - uses PrimeFaces for the widgets - this is interesting, and has a different look and feel, native to PrimeFaces.  But, it does exactly the same work as the scaffold in MVC. So, if you're looking at complexities and benefits of each, go for it. The CI build server is <a href="http://static.springsource.org/downloads/nightly/snapshot-download.php?project=ROO">here</a>, and you just need to <a href="http://www.rimple.com/tech/2011/10/18/living-on-the-edge-of-a-roo-working-on-the-trunk.html">follow these rules</a> to get it to use trunk.</li>
<br /> 
</ul>
<p><br />It was so easy to switch between JSF and MVC for my testing, I used these two scripts:</p>
<h5>Roo with MVC</h5>
<p>&nbsp;</p>
<pre class="brush: text">project --topLevelPackage foo.bar.mvc --packaging JAR --projectName mvcrules
jpa setup --database HYPERSONIC_PERSISTENT --provider OPENJPA
entity jpa --class ~.model.Course --testAutomatically
field string --fieldName name
field date --fieldName runDate --type java.util.Date --dateFormat SHORT
web mvc setup<br />web mvc all --package ~.mvc
quit
</pre>
<h5>Roo with JSF</h5>
<pre class="brush: text">project --topLevelPackage foo.bar.jsf.sortarules --packaging JAR --projectName jsfsortarules
jpa setup --database HYPERSONIC_PERSISTENT --provider OPENJPA
entity jpa --class ~.model.Course --testAutomatically
field string --fieldName namefield date --fieldName runDate --type java.util.Date --dateFormat SHORT
web mvc setupweb mvc all --package ~.mvc
quit
</pre>
<p>I will attempt to update this article as I find new things...   No promises, as the primary artifact is the book.  But hopefully this is a warning shot across the bow that change is indeed a-coming.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/10/18/living-on-the-edge-of-a-roo-working-on-the-trunk.html"><rss:title>Living on the Edge of a Roo - working on the trunk</rss:title><rss:link>http://www.rimple.com/tech/2011/10/18/living-on-the-edge-of-a-roo-working-on-the-trunk.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-10-18T10:17:53Z</dc:date><dc:subject>SpringSource Roo</dc:subject><content:encoded><![CDATA[<p>Let's say you're an add-on developer or someone who wants to stay current with the refactorings of Roo 1.2.  Since it is in active development, you need to do two things to make your project work with the latest code.  Remember, this is bleeding edge, so don't be surprised if your Maven gets ahead of your snapshot builds...</p>

<p><strong>Install the CI build</strong></p>

<p>First, download the most recent build from the CI server at <a href="http://static.springsource.org/downloads/nightly/snapshot-download.php?project=ROO">http://static.springsource.org/downloads/nightly/snapshot-download.php?project=ROO</a> Install it as roo in your symlinks (unix/OS X) or add to the path for Windows.</p>

<p>On my OS X system, I call it rooss, and I keep M1 as roo.</p>

<p><strong>Set up your snapshot repo and Roo version</strong></p>

<p>Next, edit your <code>pom.xml</code> file and change the <code>roo.version</code> to <code>1.2.0.BUILD-SNAPSHOT</code> - the punctuation is very important to Maven here. You'll need to add the Roo snapshots repository to your repository list:</p>

<pre class="brush: xml;">
 &lt;repository&gt;
    &lt;id&gt;spring-roo-repository&lt;/id&gt;
    &lt;name&gt;Spring Roo Repository&lt;/name&gt;
    &lt;url&gt;http://spring-roo-repository.springsource.org/release&lt;/url&gt;
&lt;/repository&gt;
</pre>

<p>Then, you can do a mvn package and you should be on your way.</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/10/13/webflow-on-grails-and-jquery-ui-with-grails-at-the-philly-on.html"><rss:title>Webflow on Grails and jQuery UI with Grails at the Philly on Grails User Group Meeting</rss:title><rss:link>http://www.rimple.com/tech/2011/10/13/webflow-on-grails-and-jquery-ui-with-grails-at-the-philly-on.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-10-13T22:52:25Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p><em>Note - what follows is incoherent.  It was a long day.  I hope to edit this and make more sense in the article tomorrow.  For the intrepid, there's cool projects lurking in here...</em></p>

<p>Today Jason Gritman @gritman and Bob Rodini had a <a href="http://phillygroovy.org" target="_blank" class="offsite-link-inline">Philly Grails</a> meeting at Chariot Solutions.</p>

<h2>Spring Webflow under Grails</h2>

<p><span class="full-image-float-left ssNonEditable"><span><img src="http://www.rimple.com/storage/post-images/Bob Rodini.jpg?__SQUARESPACE_CACHEVERSION=1318563126365" alt=""/></span><span class="thumbnail-caption">Bob Rodini showing Grails and WebFlow</span></span>We started with Bob Rodini's presentation on using the Spring WebFlow framework, which in typical Grails fashion is provided using a Groovy-based DSL.  Bob is working on Grails in his work-a-day life, and walked us through the conventions, communication with the scopes, and other things.  </p>

<p>We discussed the Grails approach for WebFlow -vs- regular XML WebFlow as well.  A good summary of the benefits of this unique platform.</p>

<p>Bob is offering a <a href="http://www.sgps.psu.edu/groovy-and-grails/default.ashx" target="_blank" class="offsite-link-inline">Grails continuing education course</a> at Penn State Great Valley Campus - if you are near that area, register and you can benefit from evening training from him.
<br clear="all"/></p>

<h2>jQuery and Grails</h2>

<p><span class="full-image-float-right ssNonEditable"><span><img src="http://www.rimple.com/storage/post-images/Jason Gritman 1.jpg?__SQUARESPACE_CACHEVERSION=1318563276313" alt=""/></span><span class="thumbnail-caption">Jason (JSON?) Gritman answering UG questions</span></span>Jason Gritman's talk on jQuery and Grails was very useful.  He gave us a great tutorial on jQuery, jQuery UI and jQuery validator.  Cool things to remember:</p>

<ul>
<li>jQuery UI Theme Roller/Builder - Don't forget to <strong>Bookmark</strong> the URL when you are done theming - you can run that bookmark (a very long URL) to restore your settings and continue theming.</li>
<li>jQuery validator - you have control over where and when the validation fires.  It has internationalization.  etc...</li>
<li>Looking forward to jQuery UI's upcoming table component - sounds interesting to me!</li>
<li>Apparently custom validators can work - such as validating a credit card using Ajax - according to a discussion here at the talk.</li>
</ul>

<p>Then Jason showed the validator user interface - before with Grails, after with jQuery validator.  </p>

<p><br clear="all"/></p>

<h2>Grails 2.0 Static Resources</h2>

<p>Jason showed us how you
 can create a modules element in Grails 2.0 - create a resource set - closures:</p>

<pre class="brush: groovy;">
modules = {
  validation {
    dependsOn 'jquery'
    resource url: 'js/jquery.validate.js'
    resource url: 'foo/bar.js'
  }

  ..
}
</pre>

<p>That's SUUUPER cool.</p>

<h2>jQuery Validators</h2>

<p>I really like those - he showed us the concept of adding a validation:</p>

<pre class="brush:javascript;">

  $.validator.addMethod("name", function(params) { ...});
</pre>

<p>So you can write your own custom validators, and there are a number built in.  </p>

<h2>DataTables</h2>

<p>This is a jQuery plugin that has a ton of features in it, and Jason has used it on projects.  For Ajax consumers, it has a very specific JSON format and is, as he says, pretty complex.  However, it is extremely powerful.    </p>

<p>We got into a discussion of grid APIs, and obviously horses for courses...</p>

<p>The cool thing about the DataTables plugin is that it binds to jQuery UI theming, and you can just actively bind it to a statically built HTML table.  Very good stuff (don't be surprised if you see a nice, dynamic grid on Chariot's training pages soon).</p>

<h2>Calendaring</h2>

<p>Jason is my hero...  Such as good presentation even 1/2 way through.  He showed us the FullCalendar project - another AWESOME jQuery UI plugin.  Think of Google Calendar...  </p>

<p>You can use the Full Calendar project to show a full page calendar.  Loaded via JSON.  </p>

<pre class="brush: javascript;">
$.getJSON("uri", function(events) {
  $('#divname').fullCalendar({
  theme: true,
  events: events});
});
</pre>

<h2>dynatree</h2>

<p>Another nifty library.  You can load it via JSON or HTML.  Looks very sophisticated and event-driven.  Everything binds with JSON.  It looks very interesting.  It doesn't necessarily hook into jQuery UI, so it is a one-off component.  </p>

<h2>BBQ</h2>

<p>Stands for "Back button &amp; query library" - this is something similar to the way the Showoff project uses the #<slide#> parameter to show and switch slides.  The hashtag will turn into a query string, and you can interact like with your request query string.  You can push state for single items too.</p>

<p>BBQ isn't actively maintained, but Jason likes the concept.  My head hurt looking at it, but it seems like you can fire up $.deparam and $.param to extract or add a parameter.  Hashchange event is an HTML thing, and this project can emit it / react to it.</p>

<h2>Wrap-up</h2>

<p>Jason's code examples are at <a href="https://github.com/jgritman/grails-five-jquery-plugins-demo">Grails Five jQuery Plugins Demo</a> - and a blog entry is probably coming soon.  Great job, JSON!  I'll link to his blog article as soon as it is available.</p>

<p>Ken</p>
]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/9/27/keeping-and-showing-jetty-jsp-source.html"><rss:title>Keeping and showing Jetty JSP source</rss:title><rss:link>http://www.rimple.com/tech/2011/9/27/keeping-and-showing-jetty-jsp-source.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-09-27T10:29:12Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>FYI... &nbsp;Did you know that you can keep the generated source files for your JSPs when running Jetty from maven?</p>
<p>Just add this to your web.xml file:</p>
<pre class="brush: xml;">&lt;servlet id="jsp"&gt;
    &lt;servlet-name&gt;jsp&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.apache.jasper.servlet.JspServlet&lt;/servlet-class&gt;
   &lt;init-param&gt;
        &lt;param-name&gt;keepgenerated&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
   &lt;/init-param&gt;
 &lt;/servlet&gt;     
     </pre>
<p>Then your JSP generated source, along with the class file, is located in <code>target/tmp</code>.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/9/24/roo-in-action-almost-there.html"><rss:title>Roo in Action - Almost there…</rss:title><rss:link>http://www.rimple.com/tech/2011/9/24/roo-in-action-almost-there.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-09-24T18:40:48Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Well, it's been, what, almost two years since I first heard about Spring Roo. &nbsp;I was holed up in a hotel room, talking to Ben Alex for the Chariot TechCast, and thought "wow, what a neat concept." &nbsp;Eventually, I got to thinking about doing a book, and reached out to my collaborator in chief at Chariot, Gordon Dickens. &nbsp;We pitched a book idea to him and he thought it was great.</p>
<p>So, based on that approval, we went to Manning. &nbsp;We knew them from our Philadelphia Emerging Tech conference, and I'd recorded several sessions - the first Web Framework Shootout, which ended with some interesting choice (and humorous) comments by the Rails guy (humorously the only non-Manning author on the stage), and an author forum about writing a book and what it takes at ETE 2009. &nbsp;Both were hosted by Marjan Bace, Manning's chief.</p>
<p>So, too many months later, a few overthrown dictators, change in co-authors, droughts, floods, hurricanes, and other events later, I'm working this weekend on sewing up the principal writing on my end, and Srini Penchikala, who is writing a number of really good and important chapters as well, is doing the same.</p>
<p>I can't wait to move to the editing mode - I love seeing a manuscript shape up, and giving it to someone who won't be as precious about my words as I am. &nbsp;It's time to step back, take a breath, and let the professionals take a whirl.</p>
<p>The finishing touches I'm working on are around making the samples work (that's also a work in progress, and a LOT harder than you think it is as Roo is definitely a moving target). &nbsp;We're going to target Roo 1.2.0, as it is such a strong release, especially when you compare it to what we started using back in 2009. &nbsp;The project has come a long way, and lots of pieces have been re-written. &nbsp;Still, I think waiting until now to push it to publication was the right move - if we published a book on Roo 1.0.2, it would be nearly useless today.</p>
<p>Also, I'm going to revisit chapters 1 and 2, the essential hook chapters - because they were the earliest artifacts. &nbsp;It's like that letter you are asked to write when you're a kid, and then you read it a year or two later when they hand it back to you, and you think "wow, did I actually write 'like' between every five words?"</p>
<p>I'm busy adding a bit to the persistence chapters now - for example, a little on Spring Data, services, repositories, and Spring NoSQL support in the form of MongoDB. &nbsp; That finished, I'm moving on to working on updating the web chapters, and then the one on testing. &nbsp;Sometime early next week, it's going to be handed off to technical review.</p>
<p>Maybe this is a "making the sausage" blog post, but I feel I have to note the event somehow. &nbsp;Keep in mind that the book then goes to production, which could take some months, but if you're wanting it now, go get the <a class="offsite-link-inline" href="http://manning.com/rimple" target="_blank">MEAP</a>, as we'll be updating it as we make changes. &nbsp;The add-on chapters should be coming out any day.</p>
<p>All the best,</p>
<p>Ken</p>
<p>&nbsp;</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/9/4/skipping-the-pgp-signing-process.html"><rss:title>Skipping the PGP Signing Process</rss:title><rss:link>http://www.rimple.com/tech/2011/9/4/skipping-the-pgp-signing-process.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-09-04T15:12:01Z</dc:date><dc:subject>Roo in Action Spring Roo Tips</dc:subject><content:encoded><![CDATA[<p>If you need to install or deploy the maven artifact of your add-on to an internal repository server, and you don't need to deploy to a public OBR repository such as the RooBot server, you can choose to disable the PGP key signing process. Just comment out the maven-gpg-plugin entry in your project's pom.xml file, and you can then use the mvn install and mvn deploy commands internally:</p>
<pre class="brush: xml;">&lt;!-- comment out this block temporarily
&lt;plugin&gt;
  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  &lt;artifactId&gt;maven-gpg-plugin&lt;/artifactId&gt;
  &lt;version&gt;1.3&lt;/version&gt;
  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;sign-artifacts&lt;/id&gt;
      &lt;phase&gt;verify&lt;/phase&gt;
      &lt;goals&gt;
        &lt;goal&gt;sign&lt;/goal&gt;
      &lt;/goals&gt;
    &lt;/execution&gt;
  &lt;/executions&gt;
&lt;/plugin&gt;
--&gt;

</pre>
<p>We suggest following the signing process anyway, as it verifies that a deployed maven artifact came from a given, trustable source. However, for internal testing and for non-critical applications, especially internal ones, disabling this check can save your some configuration headaches.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/9/4/im-shellfamous.html"><rss:title>I'm ShellFamous</rss:title><rss:link>http://www.rimple.com/tech/2011/9/4/im-shellfamous.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-09-04T14:48:55Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Seen on the most recent nightly downloads - a link to the <a href="http://www.rimple.com/tech/2011/8/21/now-you-can-choose-activerecord-or-servicerepo-for-roo-12.html">services article</a> I wrote, sent by the @SpringRoo twitter account. &nbsp;Thanks guys! &nbsp;</p>
<p>&nbsp;</p>
<pre>    ____  ____  ____  
   / __ \/ __ \/ __ \ 
  / /_/ / / / / / / / 
 / _, _/ /_/ / /_/ /  
/_/ |_|\____/\____/    1.2.0.BUILD-SNAPSHOT [rev b1c7a40]


Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
<strong>@SpringRoo @SpringRoo 1.2 now with Service Layer support - http://ow.ly/6hGP6 thx @krimple </strong>
roo&gt; </pre>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/8/23/debugging-add-ons-via-the-roo-shell.html"><rss:title>Debugging add-ons via the Roo shell</rss:title><rss:link>http://www.rimple.com/tech/2011/8/23/debugging-add-ons-via-the-roo-shell.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-08-23T15:49:43Z</dc:date><dc:subject>Spring Roo SpringSource Roo tips</dc:subject><content:encoded><![CDATA[<p>Trying to debug your Roo add-ons (which are OSGi bundles)? &nbsp;Here's a simple way. &nbsp;Just add the old remote debugger flags to the front of the &lt;code&gt;java&lt;/code&gt; invocation of the Roo shell in your roo.sh script (comment out the working version). These are the last two lines of the script. <strong>Back up your script file before you do this. &nbsp;</strong>I use:</p>
<pre class="brush: text"># Hop, hop, hop...
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 ...
#java -Dis.apple.terminal=$APPLE_TERMINAL $ROO_OPTS -Droo.args="$*" ...
</pre>
<p>Then, connect to the debugger with your favorite IDE as a remote debugger.  I use IntelliJ with port 5005 localhost.  I have set this up so that it pauses while starting up, so that I can attach the debugger.  You can set <code>suspend=n</code> if you don't want it.</p>
<p>Nice thing is that you can use the osgi start command to load your add-on, set your breakpoint, then stop right in the command that you're executing.  Use it to play around with Roo source to find out how their add-ons work.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/8/21/now-you-can-choose-activerecord-or-servicerepo-for-roo-12.html"><rss:title>Now you can choose ActiveRecord or Service/Repo for Roo 1.2</rss:title><rss:link>http://www.rimple.com/tech/2011/8/21/now-you-can-choose-activerecord-or-servicerepo-for-roo-12.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-08-21T19:02:14Z</dc:date><dc:subject>Roo in Action SpringSource Roo Tips chariot-news</dc:subject><content:encoded><![CDATA[<p>Check it out! &nbsp;Now you can install services and repositories, and when you scaffold the project automatically generates calls to the service layer rather than to the Active Record pattern.</p>
<p>I think personally it's a huge win for Roo to be able to support both approaches, since having to switch tools based on a difference in one pattern approach to me feels wrongheaded. &nbsp;Here's a screenshot from IntelliJ:</p>
<p><br /><span class="full-image-block ssNonEditable"><span><img src="http://www.rimple.com/storage/post-images/persistencemodel.png.png?__SQUARESPACE_CACHEVERSION=1313953537702" alt="" /></span><span class="thumbnail-caption" style="width: 700px;">The new service model in action with IntelliJ</span></span>Here is a snippet of the code written in the CourseController_Roo_Controller.aj file proving the nice integration:</p>
<pre class="brush: java;">privileged aspect CourseController_Roo_Controller {
  
  @Autowired
  CourseService CourseController.courseService;
  
  @RequestMapping(method = RequestMethod.POST)
  public String CourseController.create(@Valid Course course, 
       BindingResult bindingResult, Model uiModel, 
       HttpServletRequest httpServletRequest) {
    if (bindingResult.hasErrors()) {
        uiModel.addAttribute("course", course);
        return "courses/create";
    }
    uiModel.asMap().clear();
    courseService.saveCourse(course);
    return "redirect:/courses/" + 
         encodeUrlPathSegment(
            course.getId().toString(), httpServletRequest);
  }
  
  @RequestMapping(params = "form", method = RequestMethod.GET)
  public String CourseController.createForm(Model uiModel) {
      uiModel.addAttribute("course", new Course());
      return "courses/create";
  }
  
  @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  public String CourseController.show(
      @PathVariable("id") Long id, Model uiModel) {
    uiModel.addAttribute("course", courseService.findCourse(id));
    uiModel.addAttribute("itemId", id);
    return "courses/show";
  } 
...
}
</pre>
<p>To try it out, head over to the <a class="offsite-link-inline" href="http://static.springsource.org/downloads/nightly/snapshot-download.php?project=ROO" target="_blank">nightly builds page</a> and download the latest nightly. &nbsp;(Do NOT unzip this over a working 1.1 or earlier 1.2 or you'll be crying a sweater of tears). &nbsp;Then, make your /usr/bin/roo or /usr/bin/roo12 symbolic link (my angle as during the writing of the book I've been testing things against roo 1.1, 1.2, etc). &nbsp;Create your project and you'll see the options.</p>
<p>You can build this if you put the snapshot repository into your list of repositories in your pom.xml file:</p>
<pre class="brush: xml;">&lt;repository&gt;
    &lt;id&gt;spring-roo-internal-repo&lt;/id&gt;
    &lt;name&gt;Spring Roo Internal Snapshot Repo&lt;/name&gt;
    &lt;url&gt;http://spring-roo-repository.springsource.org/snapshot&lt;/url&gt;
&lt;/repository&gt;
</pre>
<p>Best of luck, and enjoy playing with the upcoming Roo features.  I'm also going to check out some newer add-ons, such as JSF and the newly updated Flex (by Roo forum contributor working with the team on a patch) and GWT addons in future blog entries.  For now, though, it's back to my add-ons chapter, which is coming soon.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/7/24/maven-search-site-online.html"><rss:title>Maven Search Site Online</rss:title><rss:link>http://www.rimple.com/tech/2011/7/24/maven-search-site-online.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-07-24T04:44:02Z</dc:date><dc:subject>Tips chariot-news maven</dc:subject><content:encoded><![CDATA[<p>I was a bit surprised to find out about this, but in teaching a couple of Maven courses two weeks ago, I did my usual "and you can go to the Maven Central repository at repo1.maven.org/maven2" - but things changed on me...</p>
<p>For years (since the inception of Maven), when you browsed that repository URL, you'd get a file listing of the entire repository, which you could drill down into manually. &nbsp;Wanna see what's in commons-lang/commons-lang/2.6? &nbsp;Just click away. &nbsp;However, there was no search. &nbsp;In fact, there were two search URLs that I knew of (and more I'm sure) - such as mvnrepository.com and repository.sonatype.org (I think, that URL is offline now).</p>
<p>It looks like Nexus is powering the Maven central repo now, and also they've put a message up at that central URL:</p>
<blockquote>
<p style="padding-left: 30px;">Browsing for this directory has been disabled.</p>
<p style="padding-left: 30px;"><a href="http://search.maven.org/#browse">View</a>&nbsp;this directory's contents on&nbsp;<a href="http://search.maven.org/#browse">http://search.maven.org</a>&nbsp;instead.</p>
</blockquote>
<p>Huh. &nbsp;Ok, so I'll bite... &nbsp;If you go to the <a class="offsite-link-inline" href="http://search.maven.org" target="_blank">http://search.maven.org</a> site, you'll see a nice search engine. &nbsp;I typed in commons-lang, and lo and behold, there is a 3.0 version too. &nbsp;Click on the image below to see the whole screen capture, if you're curious.</p>
<p>&nbsp;</p>
<div class="thumbnail"><a href="https://skitch.com/krimple/fmxir/maven-central-search-engine" target="_blank"><img src="https://img.skitch.com/20110724-jn9nr6b9ar8e29ifgbc8n3q8uc.preview.jpg" alt="Maven Central Search Engine" /></a><br /><span>Uploaded with <a href="http://skitch.com">Skitch</a>!</span></div>
<p>I'm glad they did this.  The Nexus repository gives useful reports on dependencies, and provides the mounting code for a number of dependency managers, including Maven, Ivy, Buildr, and more.  A nice touch.  By the way, the new URL to remember is <a href="http://search.maven.org" target="_blank">http://search.maven.org</a>!</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/7/17/testing-entity-validations-with-a-mock-entity-roo-in-action.html"><rss:title>Testing Entity Validations with a Mock Entity - Roo in Action Corner</rss:title><rss:link>http://www.rimple.com/tech/2011/7/17/testing-entity-validations-with-a-mock-entity-roo-in-action.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-07-17T13:30:25Z</dc:date><dc:subject>Roo in Action Spring Roo</dc:subject><content:encoded><![CDATA[<p><em>The following post is ancillary material from the upcoming book Spring Roo in Action, by Ken Rimple and Srini Penchikala, with Gordon Dickens.  You can purchase the MEAP edition of the book, and participate in the author forum, at <a class="offsite-link-inline" href="http://www.manning.com/rimple">www.manning.com/rimple</a>.</em></p>
<p>In Spring Roo in Action, Chapter 3, I discuss how Roo automatically executes the Bean Validators when persisting a live entity. However, when running unit tests, we don't have a live entity at all, nor do we have a Spring container - so how can we exercise the validation without actually hitting our Roo application and the database? </p>
<p>The answer is that we have to bootstrap the validation framework within the test ourselves. We can use the CourseDataOnDemand class's getNewTransientEntityName method to generate a valid, transient JPA entity. Then, we can:</p>
<ol>
<li>Mock static entity methods, such as findById, to bring back pre-fabricated class instances of your entity</li>
<li>Initialize the validation engine, bootstrapping a JSR-303 bean validation framework engine, and perform validation on your entity</li>
<li>Set any appropriate properties to apply to a particular test condition</li>
<li>Initialize a test instance of the entity validator and assert the appropriate validation results are returned</li>
</ol>
<h3>The concept in action...</h3>
<p>Given a Student entity with the following definition:</p>
<pre class="brush: java;">

@RooEntity
@RooJavaBean
@RooToString
public class Student {
  
  @NotNull
  private String emergencyContactInfo;

  ...
}
</pre>
<p>The listing below shows a unit test method that ensures the NotNull validation fires against missing emergency contact information on the Student entity:</p>

<pre class="brush: java;">
@Test
public void testStudentMissingEmergencyContactValidation() {
  // setup our test data
  StudentDataOnDemand dod = new StudentDataOnDemand();

  // tell the mock to expect this call 
  Student.findStudent(1L); 
  // tell the mocking API to expect a return from the prior call in the form of
  // a new student from the test data generator, dod
  AnnotationDrivenStaticEntityMockingControl.expectReturn(
     dod.getNewTransientStudent(0)); 

  // put our mock in playback mode
  AnnotationDrivenStaticEntityMockingControl.playback(); 

  // Setup the validator API in our unit test
  LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean();
  validator.afterPropertiesSet(); 

  // execute the call from the mock, set the emergency contact field
  // to an invalid value 
  Student student = Student.findStudent(1L);
  student.setEmergencyContactInfo(null);
  
  // execute validation, check for violations
  Set&lt;ConstraintViolation&lt;Student&gt;&gt; violations = 
    validator.validate(student, Default.class);

  // do we have one?
  Assert.assertEquals(1, violations.size());

  // now, check the constraint violations to check for our specific error
  ConstraintViolation&lt;Student&gt; violation = violations.iterator().next();
  
  // contains the right message?
  Assert.assertEquals("{javax.validation.constraints.NotNull.message}", 
    violation.getMessageTemplate());
   
  // from the right field?
  Assert.assertEquals("emergencyContactInfo", 
    violation.getPropertyPath().toString());
}</pre>
<h3>Analysis</h3>
<p>The test starts with a declaration of a StudentOnDemand object, which we'll use to generate our test data. We'll get into the more advanced uses of the DataOnDemand Framework later in the chapter. For now, keep in mind that we can use this class to create an instance of an Entity, with randomly assigned, valid data. We then require that the test calls the Student.findStudent method, passing it a key of 1L. Next, we'll tell the entity mocking framework that the call should return a new transient Student instance. At this point, we've defined our static mocking behavior, so we'll put the mocking framework into playback mode.</p>
<p>Next, we issue the actual Student.findById(1L) call, this time storing the result as the member variable student. This call will trip the mock, which will return a new transient instance. We then set the emergencyContactInfo field to null, so that it becomes invalid, as it is annotated with a @NotNull annotation. Now we are ready to set up our bean validation framework.
</p>
<p>We create a LocalValidatorFactoryBean instance, which will boot the Bean Validation Framework in the afterPropertiesSet() method, which is defined for any Spring Bean implementing InitializingBean. We must call this method ourselves, because Spring is not involved in our unit test. Now we're ready to run our validation and assert the proper behavior has occurred.</p>
<p>We call our validator's validate method, passing it the student instance and the standard Default validation group, which will trigger validation. We'll then check that we only have one validation failure, and that the message template for the error is the same as the one for the @NotNull validation. We also check to ensure that the field that caused the validation was our emergencyContactInfo field.</p>
<p>In our answer callback, we can launch the Bean Validation Framework, and execute the validate method against our entity. In this way, we can exercise our bean instance any way we want, and instead of persisting the entity, can perform the validation phase and exit gracefully.</p>
<h3>Caveats...</h3>
<p>There are a few things slightly wrong here.  First of all, the Data on Demand classes actually use Spring to inject relationships to each other, which I've logged a bug against as <a href="https://jira.springsource.org/browse/ROO-2497">ROO-2497</a>.  You can override the setup of the data on demand class and manually create the DoD of the referring one, which is fine.  They have slated to work on this bug for Roo 1.2, so it should be fixed sometime in the next few months.</p>
<p>Also, realize that this is NOT easy to do, compared to writing an integration test.  However, this test runs markedly faster.  If you have some sophisticated logic that you've attached to a <pre>@AssertTrue</pre> annotation, this is the way to test it in isolation.</p>
<h3>About this post</h3>
<em>Did you find this post useful?  Ken and Gordon both teach courses in Spring, Hibernate, Integration, Maven, Rails and more for <a href="http://chariotsolutions.com">Chariot Solutions</a>.  Visit our <a class="offsite-link-inline" href="http://chariotsolutions.com/education">Education Services</a> page for details on upcoming courses, including August's <a class="offsite-link-inline" href="http://chariotsolutions.com/training_events/hibernate-with-spring-2011-08-10">Hibernate with Spring</a>.</em>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/5/19/railsconf-2011-my-personal-recap.html"><rss:title>RailsConf 2011 - My Personal Recap</rss:title><rss:link>http://www.rimple.com/tech/2011/5/19/railsconf-2011-my-personal-recap.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-05-19T16:12:55Z</dc:date><dc:subject>Rails chariot-news conferences conferences railsconf-2011</dc:subject><content:encoded><![CDATA[<p>RailsConf2011 is my first Rails conference. &nbsp;Held in Baltimore, MD, in the Baltimore Convention Center, there were five tracks, including one unconference (bohconf) that ran concurrent to the main conference. &nbsp;As we are preparing to offer our first Intro to Rails course with Engine Yard in the summer, I wanted to start getting involved in the Rails community a bit more and see where it is heading.</p>
<p>Attendance was very strong - and so were the pleas from companies that are hiring. &nbsp;The job message board spanned three full corkboards, and was full of writing from various companies pleading for Ruby and Rails talent. &nbsp;Just about everyone was saying "we're hiring," even to the point of wearing it on their shirts.</p>
<p>Clearly, the Rails community is growing and currently has lots of need for additional talent as the market increases faster than the number of experts in the field. A good problem for rails experts, I'd say.</p>
<h3>Tutorials</h3>
<h4><span style="font-weight: normal;">I attended two half-day tutorials on Monday. &nbsp;Those tutorial sessions were very instructive.</span></h4>
<h4>Building WebApps with HTML 5</h4>
<p>The&nbsp;<a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/18321" target="_blank">HTML 5</a>&nbsp;tutorial by Mike Subelsky of OtherInbox left me with a ton of resources, a good set of labs and solutions, and lots to research. &nbsp;</p>
<p>I learned about the <a class="offsite-link-inline" href="http://html5boilerplate.com/" target="_blank">HTML 5 Boilerplate Project</a>, where you can download a template of a fully HTML 5 compliant document with tons of comments. &nbsp;I also learned all about drawing, text and image rendering, extra forms hints such as types of fields (phone #), default focus, and more. &nbsp;The local storage API is quite easy to use, and he talked about the issue of the socket API and Firefox. &nbsp;So all in all, a great talk and very valuable to me.</p>
<p>The second one was a Rails Best Practices talk from Gregg Pollack of Envy Labs. &nbsp;Gregg stopped by and said hello, as he is a friend of ETE and Chariot and really helped us out in 2009 (there's even a Viddler video somewhere on the 2009 ETE conference that he did).</p>
<h4>Rails Best Practices - Gregg Pollack of CodeSchool</h4>
<p>Gregg Pollack has a good website, if you're into self-paced training, called CodeSchool. &nbsp;They have a number of classes online, including one called Rails Best Practices. &nbsp;This was the i<a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/18656" target="_blank">n-person version</a> of that course, and he kept it entertaining. &nbsp;I really like his Web IDE and the "challenges" he puts you through. &nbsp;Great concepts, and an approach for us education people to think about, especially with delivering online training. &nbsp;He also has this penchant for doing mashups of old 8-bit video games, complete with his voice for all sound effects.</p>
<h3>DHH Keynote</h3>
<p>DHH gave a keynote on the first day (Tuesday) of the conference where he announced the RC release of Rails 3.1 this week. &nbsp;In 3.1 will be several significant changes, including the default scaffolding now using Sass and CoffeeScript by default instead of CSS and Javascript. &nbsp;</p>
<p>Also, they're including a refactored application resources approach to deliver Javascript libraries as modules, and bring more organization to that area. &nbsp;Rails can then aggregate those into something like a /resources URL, very similar in concept to what Spring MVC does today. &nbsp;All-in-all a needed feature and something that will make it easier to start organizing the way your applications script.</p>
<p>He also mentioned that jQuery will be the default Javascript library going forward, rather than prototype. &nbsp;</p>
<h3>Fat Models Aren't Enough</h3>
<p>Jeff Casimir from Jumpstart Lab gave a talk on further refactoring of Rails applications called <a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/18514" target="_blank">Fat Models aren't Enough</a>, stating on the record that he feels that some controllers do too much even today. &nbsp;For example, he suggested using a Presenter (think of it as a controller helper that is responsible for representing the view data to the view object). &nbsp;The refactor is to pull the unrelated objects into the presenter, intialize the presenter which then loads the view objects, and only expose the presenter to the view. &nbsp;</p>
<p>He then told us to take that further - maybe instead of delegating things like reports to the models themselves, polluting them with code really that is a representation artifact, write the code in the presenter to handle that data processing. &nbsp;You can even call helpers in the presenter, since they are also part of the view and you are just helping to represent the data to the view. &nbsp;I hope I'm presenting the presenter the right way here, but anyway it was great food for thought.</p>
<p>He then got into a good discussion of the Single Responsibility Principal and how many objects do more than one thing - if your model handles processing of its children to do things for them, or some type of other thingness (think of printing, ordering, etc) maybe you need to extract that and make it another model. &nbsp;He was big on having methods be less than 8 lines of code. Also, he really hated scopes and prefers the new Ruby class method approach (so do I).</p>
<h3>Active Support</h3>
<p>Bryan Liles of Smarticus gave a <a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/19431" target="_blank">talk on Active Support</a>, which went into the history of Ruby's Facets library, and how the Active Support library was created to give features from that library that were useful to rails programmers, without having to load the relatively large Facets library.</p>
<p>There are a lot of things in Active Support, such as module and class accessors, constantizing and pluralization, a benchmarking API, configurables, callbacks, instrumentation (sending and processing events), even gzip and various types of randoms. &nbsp;His comment to all of us was READ THE SOURCE! &nbsp;I agree. &nbsp;Now if I can just get Chapter 9 of Roo in Action sorted out I'll have a little time to do that...</p>
<h3>Confident Code</h3>
<p>Another talk, this one by Avdi Grimm of ShipRise discussed how to write <a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/18418" target="_blank">Confident Code</a>. &nbsp;He urged everybody to read Code Complete (yet another book on my Kindle now, I can't believe I've never read it). &nbsp;Discussed that every method should have four parts - gather input, perform work, deliver results, and handle failure. &nbsp;That's pretty straight-forward in concept to most of us, however he then went on to show how people do bad things in each of these areas, and how to try to write better code.</p>
<p>For example, a confident input handler in a method is sure of the type of object coming in. &nbsp;You should treat the object, with duck typing perhaps, the way you expect it to be. &nbsp;He says one of the "code smells" in this area is when you do switches to process various input types, or check for nils. &nbsp;I have a ton of notes to go over for his talk. &nbsp;Great stuff.</p>
<h3>Coffee Script?</h3>
<p>Ok, I never heard of this before now. &nbsp;Yes, I've been hiding under a rock. &nbsp;Think of a simple language like a Groovy for Javascript, and a pre-compilation process to turn it into Javascript. &nbsp;Bingo, that's Coffee Script. &nbsp;I had really wanted to see that talk, but it was super-over-full and so I just sat down and hacked with Coffee Script itself. &nbsp;VERY cool idea. &nbsp;I have to see how it works in practice, and how to integrate things like jQuery with it, but wow. &nbsp;You should just take a few minutes and hack around with it.&nbsp;</p>
<h3>Sass - CSS meets code</h3>
<p>I didn't get a seat for the <a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/19066" target="_blank">Sass talk</a> either. &nbsp;You'll see a theme here. See, I'm not 24 so I can't run to the talks as fast as some of these other guys. &nbsp;Ok, it's an excuse. &nbsp;By the time I got to the sass talk, the best I could do is stand in the back for a bit and write down some URLs. &nbsp;So I sat down and also took a look at that as well. &nbsp;Again, nifty pre-processing DSL for CSS. &nbsp;If you thought it would be a good idea to put your palette RGB numbers in variables and re-use them throughout your CSS file, this is easy in Sass. &nbsp;There are a lot more cool things, like blocks for nested items such as table rows of tables within divs. &nbsp;So, again, something on my short list.</p>
<h3>Legacy Code - In Rails?</h3>
<p>As we well know at Chariot, and Noel Rappin of Obtiva <a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/19458" target="_blank">points out</a>, at some point, you'll have to deal with a legacy Rails app. &nbsp;If you've ever been on a rescue project, you know what I'm talking about. &nbsp;Noel points out that your first job is to make everything better incrementally. &nbsp;He brings up the Boy Scout Rule (quick, what is it? &nbsp;I remembered the Cub Scout one, Always Do Your Best, but it's "Leave the campsite in better shape than you found it"). &nbsp;</p>
<p>Lots of tips here, after showing us the modern version of Goofus and Gallant (which still exists apparently) and how you can really harm your effort by rushing to push or rewrite the something without testing. &nbsp;He strongly suggests using Git to make cheap branches (an idea I highly agree with) and pressed us to learn git bisect if we haven't already. &nbsp;A tool that helps you figure out when things started to change in your history so you can figure out what commit changed the world on you.&nbsp;</p>
<p>He suggests things like using Cucumber first for outside in testing - that way you can cover a lot of the application early on. &nbsp;Many other suggestions including things like test driven exploration. &nbsp;Lots of notes to review, lots of food for thought.</p>
<h3>Building Rich Applications in Rails</h3>
<p>Yehuda Katz was on this morning talking about how you may think about writing your own rack-based Restful platform to serve data for RIAs, using something like Sinatra, but that Rails gives you so much that you should take pause and really think about it. He suggests building <a class="offsite-link-inline" href="http://en.oreilly.com/rails2011/public/schedule/detail/18047" target="_blank">Rich Applications in Rails</a>.</p>
<p>He had tons of details on how to approach writing restful APIs, especially on returning predicatable results in JSON, so that your programs can consistently call the API in a safe way. &nbsp;He discussed the Bulk_API project, which lets you do things like POST /api/bulk?posts=1,5,6,34 so that you can get them back with one hit, etc...</p>
<p>He mentioned some Javascript templating engines, something I have to check out (echo, handlebars /moustache, etc..) &nbsp;So much detail in that talk!</p>
<h3>Trinidad</h3>
<p>I also saw a talk on the Engine Yard sponsored Trinidad project. &nbsp;This is a server that hosts rack-based applications on JRuby using Tomcat behind the scenes. &nbsp;You can configure tomcat using YAML, deploy multiple applications, and it's now on my short list of new engines to take a look at. &nbsp;More on that project at the gitub site, <a class="offsite-link-inline" href="https://github.com/trinidad/trinidad" target="_blank">https://github.com/trinidad/trinidad</a>.</p>
<h3>Wrap-up</h3>
<p>All-in-all, I see a lot of activity in the Rails community and a lot of life. &nbsp;There is an energy here and tons of people deeply committed to the platform and language. &nbsp;Rails 3 seems to be "growing up" into the enterprise a bit more, and DHH seems committed to opinionated development and dependency injection (take bundler for example), and to not just improving rails, but delighting developers with very well thought out and meaningful improvements.</p>
<p>&nbsp;</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/4/19/its-a-comin-philly-emerging-tech.html"><rss:title>It's a comin' - Philly Emerging Tech</rss:title><rss:link>http://www.rimple.com/tech/2011/4/19/its-a-comin-philly-emerging-tech.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-04-19T13:22:21Z</dc:date><dc:subject>ETE Philly ETE chariot-news</dc:subject><content:encoded><![CDATA[<p>Yep, it's about that time.&nbsp; The Philly ETE conference (as we like to call it on the <a class="offsite-link-inline" href="http://twitter.com/#search?q=%23phillyete" target="_blank">twitter</a>) is fast approaching.&nbsp; We are all eagerly awaiting the results of our latest Frankenstein.&nbsp; Or is it Frank Stein?&nbsp;</p>
<p>Anyhoo, we have some fresh <a class="offsite-link-inline" href="http://techcast.chariotsolutions.com" target="_blank">techcasts</a> - last week we <a class="offsite-link-inline" href="http://techcast.chariotsolutions.com/chariot-tech-cast-61-johanna-rothman-on-managing-projects" target="_blank">released an interview</a> with <a class="offsite-link-inline" href="http://www.jrothman.com" target="_blank">Johanna Rothman</a>, famed project management guru and author of <a class="offsite-link-inline" href="http://pragprog.com/titles/jrpm/manage-it" target="_blank">ManageIt!</a> and <a class="offsite-link-inline" href="http://www.pragprog.com/titles/jrport/manage-your-project-portfolio" target="_blank">Manage your Project Portfolio</a>, among <a class="offsite-link-inline" href="http://www.jrothman.com/books.html" target="_blank">other titles</a>.&nbsp; Today I released an <a class="offsite-link-inline" href="http://techcast.chariotsolutions.com/chariot-tech-cast-62-brendan-mc-adams-of-10gen-mongo-db-on-mongo-1-8-and-mongo-philly-2011" target="_blank">interview with Brendan McAdams of 10Gen</a>, the company behind <a href="http://mongodb.org">Mongo DB</a>, talking about <a class="offsite-link-inline" href="http://blog.mongodb.org/post/3903149313/mongodb-1-8-released" target="_blank">Mongo 1.8</a> and the <a class="offsite-link-inline" href="http://bit.ly/mongophilly" target="_blank">MongoPhilly conference</a>, which is happening the day before ETE in the Sheraton Old City (same venue).</p>
<p>Later this week, we'll have an interview with the creator of the Javascript behavior-driven testing framework <a class="offsite-link-inline" href="http://pivotal.github.com/jasmine/" target="_blank">Jasmine</a>, <a class="offsite-link-inline" href="http://phillyemergingtech.com/2011/speakers/davis-frank" target="_blank">Davis Frank</a>.&nbsp; He was a great interview and a lot of fun to chat with.&nbsp; He'll be giving a Practical Jasmine talk, and tells us it will be a good 10 minute introduction, but then 35 minutes of practical advice in writing Jasmine tests.&nbsp; You may want to brush up on Jasmine <a class="offsite-link-inline" href="http://www.viddler.com/explore/saucelabs/videos/32/" target="_blank">with this demo talk</a>, and also here is a <a class="offsite-link-inline" href="http://saucelabs.com/blog/index.php/2010/10/sfse-video-pivotal-labs-davis-frank-discusses-jasmine-framework/" target="_blank">57 minute standup talk video from Davis at SFSE</a>.&nbsp; Read up, be ready, and learn a LOT of useful tips from this session.</p>
<p>We'll be having more content than ever coming back from ETE this year.&nbsp; We've been working with a videographer who will be recording all of the sessions in Salon C, both with audio and video, and I've just secured a deal with the makers of ScreenFlow to use up to 24 licenses during the conference for anybody who presents using a Mac, so we can have screencasts of other presentations.&nbsp; It should prove to be a great time.</p>
<p>I'll be there, both sitting at the training table and presenting my Roo talk.&nbsp; Roo 1.1.3 has really begun to mature, and playing with the recently released version I'm very happy - I think it will be a great working session.</p>
<p>Anyway, I hope to see you all there at ETE, and I'll be bringing my handheld recorder around, so if you want to talk about anything ETE related, please speak into the mic!</p>
<p>Best,</p>
<p>Ken</p>
<p>&nbsp;</p>]]></content:encoded></rss:item><rss:item rdf:about="http://www.rimple.com/tech/2011/3/15/build-a-better-roo-exception-page.html"><rss:title>Build a better Roo exception page</rss:title><rss:link>http://www.rimple.com/tech/2011/3/15/build-a-better-roo-exception-page.html</rss:link><dc:creator>Ken Rimple</dc:creator><dc:date>2011-03-15T10:30:52Z</dc:date><dc:subject>SpringSource Roo Tips chariot-news</dc:subject><content:encoded><![CDATA[<p>Ok, Roo fans.  This is a quick post, in response to a forum post on the Manning Roo in Action forum.  Wanna get Root Causes in your exceptions page?  Do this!</p>
<h3>Build an Exception Resolver</h3>
<p>Start by building a class that extends <code>SimpleMappingExceptionResolver</code>.  This example uses the Apache commons-lang utility class, ExceptionUtils, to get the root cause exception and push it to the page.  I suspect I may need to check for nulls here so if you get a chance to debug this before me, post a message and I'll update the blog post:</p>
<pre class="brush: java">public class FullTraceMappingExceptionResolver extends
  SimpleMappingExceptionResolver {

  @Override
  protected ModelAndView getModelAndView(String viewName, Exception ex) {
    ModelAndView modelAndView =  super.getModelAndView(viewName, ex);
    String stackTrace = ExceptionUtils.getFullStackTrace(ExceptionUtils.getRootCause(ex));
    modelAndView.addObject("rootCause", stackTrace);
    return modelAndView;
  }
}</pre>
<h3>Add commons-lang 2.5</h3>
<p>Add this to your pom.xml file, in the <code>dependencies</code> section...  A Roo shell command can do this for you, but here is the fragment:</p>
<pre class="brush: xml">&lt;dependency&gt;
  &lt;groupId&gt;commons-lang&lt;/groupId&gt;
  &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
  &lt;version&gt;2.5&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<h3>Install it!</h3>
<p>Next, install it in the <code>webmvc-config.xml</code> file, by replacing the mounted class SimpleMappingExceptionResolver with the FullTraceMappingExceptionResolver. &nbsp;Just swap the value in the class property below and leave the rest alone:</p>
<pre class="brush: xml">&lt;bean class="package.path.to.FullTraceMappingExceptionResolver"
           p:defaultErrorView="uncaughtException"&gt;
  &lt;property name="exceptionMappings"&gt;
    &lt;props&gt;
      &lt;prop key=".DataAccessException"&gt;dataAccessFailure&lt;/prop&gt;
      &lt;prop key=".NoSuchRequestHandlingMethodException"&gt;resourceNotFound&lt;/prop&gt;
      &lt;prop key=".TypeMismatchException"&gt;resourceNotFound&lt;/prop&gt;
      &lt;prop key=".MissingServletRequestParameterException"&gt;resourceNotFound&lt;/prop&gt;
    &lt;/props&gt;
  &lt;/property&gt;
&lt;/bean&gt;
</pre>
<h3>Modify unhandledException.jspx</h3>
<p>Ok, the final step - just add the unhandled exception to the jspx for the uncaught exceptions, <code>WEB-INF/views/uncaughtException.jspx</code>:</p>
<pre class="brush: html">&lt;c:if test="${not empty rootCause}"&gt;
  &lt;util:panel id="_fullStackTrace" 
        title="Full Stack Trace" openPane="false"&gt;
    &lt;h4&gt;Full Stack Trace&lt;/h4&gt;
    &lt;br/&gt;
    &lt;div style="overflow: auto;" 
         dojoType="dijit.layout.ContentPane"&gt;
      &lt;pre&gt;&lt;c:out value="${rootCause}"/&gt;&lt;/pre&gt;
    &lt;/div&gt;          
  &lt;/util:panel&gt;
&lt;/c:if&gt;
</pre>
<p>Want more Roo in Action goodness?  <a href="http://www.manning.com/rimple">Subscribe to the MEAP!</a></p>]]></content:encoded></rss:item></rdf:RDF>
