<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marc Palmer &#187; plugin</title>
	<atom:link href="http://www.anyware.co.uk/2005/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anyware.co.uk/2005</link>
	<description>Grails developer/consultant</description>
	<lastBuildDate>Thu, 15 Jul 2010 17:55:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bean-Fields plugin 0.6 released</title>
		<link>http://www.anyware.co.uk/2005/2010/03/13/bean-fields-plugin-0-6-released/</link>
		<comments>http://www.anyware.co.uk/2005/2010/03/13/bean-fields-plugin-0-6-released/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 19:40:20 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugin release]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=701</guid>
		<description><![CDATA[I have released Bean-Fields plugin 0.6. This extremely handy plugin for Grails applications makes your data form GSPs DRY by centralizing the rendering and styling of your fields, handling &#60;label&#62; rendering, rendering appropriate HTML field based on property type, application of HTML max length constraints, rendering &#8220;required field&#8221; indicators, and rendering per-field errors. Rendering a [...]


Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/' rel='bookmark' title='Permanent Link: Weceem 0.8 Released &#8211; Highlights and background'>Weceem 0.8 Released &#8211; Highlights and background</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I have released <a href="http://grails.org/plugin/bean-fields">Bean-Fields plugin</a> 0.6. This extremely handy plugin for <a href="http://grails.org">Grails</a> applications makes your data form GSPs DRY by centralizing the rendering and styling of your fields, handling &lt;label&gt; rendering, rendering appropriate HTML field based on property type, application of HTML max length constraints, rendering &#8220;required field&#8221; indicators, and rendering per-field errors. Rendering a whole bean&#8217;s worth of fields can be as simple as:</p>
<div class="dean_ch" style="white-space: wrap;">&lt;bean:form beanName=&quot;book&quot; properties=&quot;title, primaryAuthor.name, isbn&quot;/&gt;</div>
<p>Version 0.6 fixes a bunch of bugs related to rendering fields for nested property paths e.g. propertyName=&#8221;book.author.firstName&#8221; and introduces support for list / array properties eg &#8220;book.authors[3].firstName&#8221; (This was really quite painful to implement!). Radio groups are working properly now, and test coverage much improved &#8211; thanks to contribs from Antony Stubbs.</p>
<p>It also adds a user-definable threshold for whether a radio group or select list should be used for a field with an inList constraint.</p>
<p><a href="http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+GRAILSPLUGINS+AND+fixVersion+%3D+%22Grails-BeanFields-0.6%22+ORDER+BY+updated+DESC%2C+priority+DESC%2C+created+ASC&amp;mode=hide">Full list of resolved issues is here</a>.</p>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F03%2F13%2Fbean-fields-plugin-0-6-released%2F&amp;linkname=Bean-Fields%20plugin%200.6%20released" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F03%2F13%2Fbean-fields-plugin-0-6-released%2F&amp;linkname=Bean-Fields%20plugin%200.6%20released" title="Slashdot" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F03%2F13%2Fbean-fields-plugin-0-6-released%2F&amp;linkname=Bean-Fields%20plugin%200.6%20released" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/evernote?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F03%2F13%2Fbean-fields-plugin-0-6-released%2F&amp;linkname=Bean-Fields%20plugin%200.6%20released" title="Evernote" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/evernote.png" width="16" height="16" alt="Evernote"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F03%2F13%2Fbean-fields-plugin-0-6-released%2F&amp;linkname=Bean-Fields%20plugin%200.6%20released"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/' rel='bookmark' title='Permanent Link: Weceem 0.8 Released &#8211; Highlights and background'>Weceem 0.8 Released &#8211; Highlights and background</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2010/03/13/bean-fields-plugin-0-6-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Weceem 0.8 Released &#8211; Highlights and background</title>
		<link>http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/</link>
		<comments>http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 14:01:02 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[weceem]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=670</guid>
		<description><![CDATA[I&#8217;ve just managed to push out version 0.8 of the Weceem CMS for Grails.
This is a pretty cool if slightly unglamourous release because it has focussed on some performance and security stuff &#8211; oh and compatibility with the latest and greatest Grails 1.2.0 release.
Let me first apologise for the ropey typography on weceem.org &#8211; we [...]


Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/08/20/weceem-01-to-02-changes-under-the-hood/' rel='bookmark' title='Permanent Link: Weceem 0.1 to 0.2 &#8211; changes under the hood'>Weceem 0.1 to 0.2 &#8211; changes under the hood</a></li>
<li><a href='http://www.anyware.co.uk/2005/2010/04/26/javascript-and-css-frameworks-in-grails-plugins/' rel='bookmark' title='Permanent Link: Javascript and CSS frameworks in Grails plugins'>Javascript and CSS frameworks in Grails plugins</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/09/17/development-is-easy-creating-product-is-hard/' rel='bookmark' title='Permanent Link: Development is easy. Creating product is hard.'>Development is easy. Creating product is hard.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just managed to push out version <a href="http://weceem.org">0.8 of the Weceem CMS</a> for Grails.</p>
<p>This is a pretty cool if slightly unglamourous release because it has focussed on some performance and security stuff &#8211; oh and compatibility with the <a href="http://grails.org">latest and greatest Grails 1.2.0 release</a>.</p>
<p>Let me first apologise for the ropey typography on weceem.org &#8211; we haven&#8217;t yet had the time/resources to fix up the CSS styles so things are a little ugly in places. We will fix it as soon as we get time!</p>
<p>Anyway, we added a security policy. This is a groovy script (currently only loaded once at startup) that lets you define what different users can do. This uses a DSL that lets you declare roles and then say what they can do in different spaces, including whether they can admin the space, edit/view/delete/create content, and even do this by URI requested. (<a href="http://www.weceem.org/weceem/Documentation/Reference-manual/Security-Authorisation">see more info and example here</a>)</p>
<p>Because we believe strongly that Weceem should not force you to use a particular authentication library, we had to decouple the policy mechanism from authentication. As a result these roles are completely uninterpreted by Weceem. To integrate and authentication system all you have to be able to do is provide the name, email, login and list of roles for the currently logged-in user. (<a href="http://www.weceem.org/weceem/Documentation/Reference-manual/Security-Custom-Authentication">an example here</a>)</p>
<p>This has enabled some cool stuff in <a href="http://fisheye.codehaus.org/browse/grails-plugins/grails-weceem/tags/RELEASE_0_8/grails-app/services/org/weceem/services/WeceemSecurityService.groovy?r=HEAD">WeceemSecurityService</a> which relies on the security policy. The service has utility methods for implementing our security logic, e.g. isUserAllowedToViewContent(Content c). For example in previous versions of Weceem you could not preview content if it was not in a publicContent status (eg not Published).</p>
<p>Thankfully from version 0.8, anybody who has the EDIT permission can view non-published content. the default security policy ensures that the default administrator account has EDIT permission, so you can preview away as much as you like. We plan future updates to this to allow the security policy to control who can manipulate different types of content, which will be really powerful for people using custom content types.</p>
<p>On the performance front, it became obvious that something needed to be done because the default &#8220;index&#8221; page installed by <a href="http://weceem.org">Weceem</a> into new spaces was resulting in huge amounts of SQL queries for a single page.</p>
<p>This is because the page is made up like this:</p>
<ul>
<li>It pulls in a Template node for the styling</li>
<li>It pulls in three Widgets for reusable HEAD section tags and header and footer</li>
<li>The header widget iterates over all root content nodes and their children to render the menu with the wcm:menu tag</li>
<li>The page itself links to various StyleSheet and JavaScript nodes to pull in styling and scripts &#8211; these are processed on separate requests but still add to the overall burden of the page</li>
</ul>
<p>This can result in a lot of SQL chatter because we have (rightly so) made no effort to optimize this until now.</p>
<p>There are a couple of areas here that would make a big difference to the SQL traffic.</p>
<p>It is very important to realise that turning on the 2nd level cache in your Grails app&#8217;s GORM configuration does not magically give you major performance improvements. My understanding of this rather complex area (which frankly I found very disappointing) is:</p>
<ul>
<li>The 2nd level cache is only used for retrieval by object id. This is very important</li>
<li>The query caches are used to cache the ids of objects returned for a given query</li>
<li>Query caches are invalidated frequently by Hibernate if your model is not primarily read-only (<a href="http://tech.puredanger.com/2009/07/10/hibernate-query-cache/">and can cause some threading contention</a>)</li>
</ul>
<p>Luckily a CMS is pretty read-only in terms of number of requests that actually read vs update content, so the 2nd level cache is a good candidate for us here.</p>
<p>One of the major SQL hits for Weceem is resolving a URI to the ultimate content node to render. Due to the model we need to query for each part of the URI, so a request for /a/b/c results in three selects. So that&#8217;s an easy one &#8211; we added URI path -&gt; content id caching (and some other smarts) into the ContentRepositoryService. So once content has been hit, it will always be retrieved by id in future, via the 2nd level cache.</p>
<p>Another issue is iterating over child nodes. This is less trivial. We are using some query caching but I have noticed that some of the criteria were not hitting the caches despite this &#8211; it needs further investigation. I think that due to the polymorphic nature of the content model and query cache invalidation issues, we may stop using these in future (think blog comments being submitted and invalidating ALL your caches).</p>
<p>Next up: Template and Widget nodes are GSP pages that we compile and evaluate. It turned out that due to issues in Grails GSP handling (that persist in 1.2 to my knowledge), there is no internal caching of compiled GSP classes built from non-Resource content e.g. strings. This results in a leak of PermGen space which ultimately results in VM collapse. So we now have a simple cache of compiled Template and Widget GSP pages, which is automatically invalidated as necessary when templates and widgets are edited, so it is transparent to the end user that there is a cache.</p>
<p>Finally with regard to performance, we introduced a nice simple <a href="http://www.weceem.org/weceem/Documentation/Reference-manual/tag-reference/cache">wcm:cache</a> tag. This lets you cache fragments of a Template/Widget and hence get major performance improvements. The cache is currently fixed at 1 hour, but its great for anything that pulls in remote content or for any expensive node iteration tags you might be using. More enhancements will come in future.</p>
<p>A couple of nice little things we squeezed in:</p>
<ol>
<li>The Cancel button is back on the content editor screen, in the &#8220;right&#8221; place for Windows users (meh) and browsers (who made return always select the first button argh!)</li>
<li>The wcm:link tag now passes through any unused attributes eg class=&#8221;whatever&#8221;</li>
<li>We added a JS syntax highlighting script to the default space that you can use to render code snippets in your content easily</li>
</ol>
<p>Anyway, please enjoy this release. Soon time to get started on 0.9 which should see the Blog functionality completed and other refinements.</p>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F01%2F12%2Fweceem-0-8-released-highlights-and-background%2F&amp;linkname=Weceem%200.8%20Released%20%26%238211%3B%20Highlights%20and%20background" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F01%2F12%2Fweceem-0-8-released-highlights-and-background%2F&amp;linkname=Weceem%200.8%20Released%20%26%238211%3B%20Highlights%20and%20background" title="Slashdot" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F01%2F12%2Fweceem-0-8-released-highlights-and-background%2F&amp;linkname=Weceem%200.8%20Released%20%26%238211%3B%20Highlights%20and%20background" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/evernote?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F01%2F12%2Fweceem-0-8-released-highlights-and-background%2F&amp;linkname=Weceem%200.8%20Released%20%26%238211%3B%20Highlights%20and%20background" title="Evernote" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/evernote.png" width="16" height="16" alt="Evernote"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2010%2F01%2F12%2Fweceem-0-8-released-highlights-and-background%2F&amp;linkname=Weceem%200.8%20Released%20%26%238211%3B%20Highlights%20and%20background"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/08/20/weceem-01-to-02-changes-under-the-hood/' rel='bookmark' title='Permanent Link: Weceem 0.1 to 0.2 &#8211; changes under the hood'>Weceem 0.1 to 0.2 &#8211; changes under the hood</a></li>
<li><a href='http://www.anyware.co.uk/2005/2010/04/26/javascript-and-css-frameworks-in-grails-plugins/' rel='bookmark' title='Permanent Link: Javascript and CSS frameworks in Grails plugins'>Javascript and CSS frameworks in Grails plugins</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/09/17/development-is-easy-creating-product-is-hard/' rel='bookmark' title='Permanent Link: Development is easy. Creating product is hard.'>Development is easy. Creating product is hard.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Announcing the &#8220;Navigation&#8221; Plugin for Grails</title>
		<link>http://www.anyware.co.uk/2005/2009/01/27/announcing-the-navigation-plugin-for-grails/</link>
		<comments>http://www.anyware.co.uk/2005/2009/01/27/announcing-the-navigation-plugin-for-grails/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 15:16:27 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=422</guid>
		<description><![CDATA[Another plugin release&#8230; this time thanks to help from Andreas Arledal on the CSS front.
The Navigation Plugin gives you site navigation menus by convention. You just define a property in your controllers to determine what actions are shown and in what groups.

Full docs here
There is even a default styling of neutral &#8220;silver&#8221; buttons that you [...]


Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/08/20/weceem-01-to-02-changes-under-the-hood/' rel='bookmark' title='Permanent Link: Weceem 0.1 to 0.2 &#8211; changes under the hood'>Weceem 0.1 to 0.2 &#8211; changes under the hood</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/09/18/ive-released-another-grails-plugin/' rel='bookmark' title='Permanent Link: I&#8217;ve released another Grails plugin'>I&#8217;ve released another Grails plugin</a></li>
<li><a href='http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/' rel='bookmark' title='Permanent Link: Weceem 0.8 Released &#8211; Highlights and background'>Weceem 0.8 Released &#8211; Highlights and background</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Another plugin release&#8230; this time thanks to help from Andreas Arledal on the CSS front.</p>
<p>The Navigation Plugin gives you site navigation menus by convention. You just define a property in your controllers to determine what actions are shown and in what groups.</p>
<p><a href="http://www.anyware.co.uk/2005/wp-content/uploads/2009/01/nav-plugin.png"><img class="alignnone size-full wp-image-424" title="nav-plugin" src="http://www.anyware.co.uk/2005/wp-content/uploads/2009/01/nav-plugin.png" alt="" width="500" height="53" /></a></p>
<p><a href="http://www.grails.org/Navigation+Plugin">Full docs here</a></p>
<p>There is even a default styling of neutral &#8220;silver&#8221; buttons that you can use, or override the CSS easily, or use tags to render the items any way you like.</p>
<p>Part of the motivation for this is that if we can establish a &#8220;de facto&#8221; convention for navigation info, then plugins will be able to use it, to have functionality that just automatically &#8220;pops up&#8221; in your existing application.</p>
<p>Anyway now when you are prototyping your apps you can just add &#8220;static navigation = true&#8221; to your controllers, and add &lt;nav:render/&gt; to your GSP layout&#8230; and away you go!</p>
<p>Enjoy!</p>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F27%2Fannouncing-the-navigation-plugin-for-grails%2F&amp;linkname=Announcing%20the%20%26%238220%3BNavigation%26%238221%3B%20Plugin%20for%20Grails" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F27%2Fannouncing-the-navigation-plugin-for-grails%2F&amp;linkname=Announcing%20the%20%26%238220%3BNavigation%26%238221%3B%20Plugin%20for%20Grails" title="Slashdot" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F27%2Fannouncing-the-navigation-plugin-for-grails%2F&amp;linkname=Announcing%20the%20%26%238220%3BNavigation%26%238221%3B%20Plugin%20for%20Grails" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/evernote?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F27%2Fannouncing-the-navigation-plugin-for-grails%2F&amp;linkname=Announcing%20the%20%26%238220%3BNavigation%26%238221%3B%20Plugin%20for%20Grails" title="Evernote" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/evernote.png" width="16" height="16" alt="Evernote"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F27%2Fannouncing-the-navigation-plugin-for-grails%2F&amp;linkname=Announcing%20the%20%26%238220%3BNavigation%26%238221%3B%20Plugin%20for%20Grails"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/08/20/weceem-01-to-02-changes-under-the-hood/' rel='bookmark' title='Permanent Link: Weceem 0.1 to 0.2 &#8211; changes under the hood'>Weceem 0.1 to 0.2 &#8211; changes under the hood</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/09/18/ive-released-another-grails-plugin/' rel='bookmark' title='Permanent Link: I&#8217;ve released another Grails plugin'>I&#8217;ve released another Grails plugin</a></li>
<li><a href='http://www.anyware.co.uk/2005/2010/01/12/weceem-0-8-released-highlights-and-background/' rel='bookmark' title='Permanent Link: Weceem 0.8 Released &#8211; Highlights and background'>Weceem 0.8 Released &#8211; Highlights and background</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2009/01/27/announcing-the-navigation-plugin-for-grails/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Functional testing in Grails just got a bit sexier</title>
		<link>http://www.anyware.co.uk/2005/2009/01/08/functional-testing-in-grails-just-got-a-bit-sexier/</link>
		<comments>http://www.anyware.co.uk/2005/2009/01/08/functional-testing-in-grails-just-got-a-bit-sexier/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 23:32:15 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=381</guid>
		<description><![CDATA[Ok so here&#8217;s the 1.0 release in the spirit of &#8220;don&#8217;t worry be crappy&#8221; (can&#8217;t use that phrase enough these days) of a new functional testing plugin for Grails.
Actually its far from crappy already.
I have developed this partly as part of my work for my generous client Historic Futures Ltd. who agreed to open source [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Ok so here&#8217;s the 1.0 release in the spirit of &#8220;don&#8217;t worry be crappy&#8221; (can&#8217;t use that phrase enough these days) of a new functional testing plugin for <a href="http://grails.org">Grails</a>.</p>
<p>Actually its far from crappy already.</p>
<p>I have developed this partly as part of my work for my generous client <a href="http://www.historicfutures.com">Historic Futures Ltd.</a> who agreed to open source this.</p>
<p>I plan to continue improving and maintaining it personally. It&#8217;s surely a bit rough around the edges but the benefits should be pretty obvious to those who use it.</p>
<p>So what are you waiting for? Run:</p>
<div class="dean_ch" style="white-space: wrap;">grails install-plugin functional-test</div>
<p><a href="http://www.grails.org/Grails+Functional+Testing">See the documentation</a></p>
<p>&#8230;but in a nutshell it is HTTP testing with HtmlUnit under the hood but the rest is pure groovy smarts, leveraging standard JUnit.</p>
<p>Example:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="co2">import functionaltestplugin.*</span><br />
<a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20class"><span class="kw2">class</span></a> TwitterTests <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20extends"><span class="kw2">extends</span></a> FunctionalTestCase <span class="br0">&#123;</span><br />
&nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20void"><span class="kw4">void</span></a> testSearch<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.google.de/search?q=site%3Adocs.codehaus.org/%20get"><span class="kw5">get</span></a><span class="br0">&#40;</span><span class="st0">&#8216;http://www.twitter.com&#8217;</span><span class="br0">&#41;</span></p>
<p>&nbsp; &nbsp; click <span class="st0">&quot;Search&quot;</span></p>
<p>&nbsp; &nbsp; assertStatus <span class="nu0">200</span><br />
&nbsp; &nbsp; assertContentContains <span class="st0">&quot;search&quot;</span></p>
<p>&nbsp; &nbsp; form<span class="br0">&#40;</span><span class="st0">&#8217;searchForm&#8217;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; q = <span class="st0">&quot;#grails&quot;</span><br />
&nbsp; &nbsp; &nbsp; click <span class="st0">&quot;Search&quot;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; assertStatus <span class="nu0">200</span><br />
&nbsp; &nbsp; assertContentContains <span class="st0">&quot;#grails&quot;</span><br />
&nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p>What&#8217;s special about this?</p>
<ol>
<li>Simplicity and &#8220;elasticity&#8221; by default = less fragile functional tests as a result</li>
<li>Simple compact DSL/methods to learn &#8211; it tries to &#8220;do the right thing&#8221;. Let&#8217;s face it writing tests is really boring.</li>
<li>Ability to get/post directly without browsing to a page first. eg REST testing</li>
<li>No .properties configs</li>
</ol>
<p>&#8230;and one more thing URL stacktrace. When a test fails the report includes a stack of the URLs at the point of failure. The xxx-out.txt file contains request parameters+headers, content received etc. This feature will be expanded in future to allow a proper request/response chain autopsy.</p>
<p>Caveats &#8211; things I definitely want to sort out pronto:</p>
<ul>
<li>currently test output is a bit ropey, I would like to do much nicer stuff with custom output xml and rendering</li>
<li>no simple way to set post body</li>
<li>no simple way to parse out json/xml responses yet</li>
</ul>
<p>All this and more will come, with your support! Contribs also welcome!</p>
<p>ENJOY!</p>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F08%2Ffunctional-testing-in-grails-just-got-a-bit-sexier%2F&amp;linkname=Functional%20testing%20in%20Grails%20just%20got%20a%20bit%20sexier" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F08%2Ffunctional-testing-in-grails-just-got-a-bit-sexier%2F&amp;linkname=Functional%20testing%20in%20Grails%20just%20got%20a%20bit%20sexier" title="Slashdot" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F08%2Ffunctional-testing-in-grails-just-got-a-bit-sexier%2F&amp;linkname=Functional%20testing%20in%20Grails%20just%20got%20a%20bit%20sexier" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/evernote?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F08%2Ffunctional-testing-in-grails-just-got-a-bit-sexier%2F&amp;linkname=Functional%20testing%20in%20Grails%20just%20got%20a%20bit%20sexier" title="Evernote" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/evernote.png" width="16" height="16" alt="Evernote"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2009%2F01%2F08%2Ffunctional-testing-in-grails-just-got-a-bit-sexier%2F&amp;linkname=Functional%20testing%20in%20Grails%20just%20got%20a%20bit%20sexier"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2009/01/08/functional-testing-in-grails-just-got-a-bit-sexier/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Grails mail plugin 0.4 released, as well as the first &#8220;Grails Rocks&#8221; screencast</title>
		<link>http://www.anyware.co.uk/2005/2008/09/25/grails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast/</link>
		<comments>http://www.anyware.co.uk/2005/2008/09/25/grails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 09:24:23 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[screencast]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=241</guid>
		<description><![CDATA[I released version 0.4 of the grails-mail plugin in the Grails plugin repo the other day, but have not posted about it as I&#8217;ve been busy working on-site. I&#8217;ve also been putting together a screencast that shows how to use the plugin in the most basic scenario and also render content from GSPs from within [...]


Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/09/25/and-another-grails-plugin/' rel='bookmark' title='Permanent Link: &#8230;and another Grails plugin'>&#8230;and another Grails plugin</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/09/18/ive-released-another-grails-plugin/' rel='bookmark' title='Permanent Link: I&#8217;ve released another Grails plugin'>I&#8217;ve released another Grails plugin</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I released version 0.4 of the <a href="http://grails.org/Mail+Plugin">grails-mail plugin</a> in the <a href="http://grails.org">Grails</a> plugin repo the other day, but have not posted about it as I&#8217;ve been busy working on-site. I&#8217;ve also been putting together a screencast that shows how to use the plugin in the most basic scenario and also render content from GSPs from within services.</p>
<p>To install the plugin, which adds support for rendering the mail body from a GSP from within a controller, service or job, run: grails install-plugin mail</p>
<p>Full <a href="http://grails.org/Mail+Plugin">docs for the mail plugin are here</a>.</p>
<p><a href="http://s3.amazonaws.com/AnyWare/Blog/Screencasts/Grails%20Rocks%20Screencast%20%231%20-%20Grails%20Mail.mov"><img class="alignnone size-full wp-image-229" title="Grails Rocks Screencast 1 Thumbnail" src="http://www.anyware.co.uk/2005/wp-content/uploads/2008/09/grails-rocks-screencast-1-thumb.png" alt="" width="200" height="125" /></a></p>
<p>To view the <a href="http://s3.amazonaws.com/AnyWare/Blog/Screencasts/Grails%20Rocks%20Screencast%20%231%20-%20Grails%20Mail.mov">&#8220;Using the Grails mail plugin&#8221; screencast</a>, click on the thumbnail or go to the fledgling &#8220;<a href="http://www.grailsrocks.com">Grails Rocks</a>&#8221; page.</p>
<p>This is the first Grails Rocks screencast, but I hope to do many more. The next one is already planned, for the forthcoming release of the Email Confirmation plugin &#8211; which was dependent on this mail plugin 0.4 release.</p>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F25%2Fgrails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast%2F&amp;linkname=Grails%20mail%20plugin%200.4%20released%2C%20as%20well%20as%20the%20first%20%26%238220%3BGrails%20Rocks%26%238221%3B%20screencast" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F25%2Fgrails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast%2F&amp;linkname=Grails%20mail%20plugin%200.4%20released%2C%20as%20well%20as%20the%20first%20%26%238220%3BGrails%20Rocks%26%238221%3B%20screencast" title="Slashdot" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F25%2Fgrails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast%2F&amp;linkname=Grails%20mail%20plugin%200.4%20released%2C%20as%20well%20as%20the%20first%20%26%238220%3BGrails%20Rocks%26%238221%3B%20screencast" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/evernote?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F25%2Fgrails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast%2F&amp;linkname=Grails%20mail%20plugin%200.4%20released%2C%20as%20well%20as%20the%20first%20%26%238220%3BGrails%20Rocks%26%238221%3B%20screencast" title="Evernote" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/evernote.png" width="16" height="16" alt="Evernote"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F25%2Fgrails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast%2F&amp;linkname=Grails%20mail%20plugin%200.4%20released%2C%20as%20well%20as%20the%20first%20%26%238220%3BGrails%20Rocks%26%238221%3B%20screencast"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/09/25/and-another-grails-plugin/' rel='bookmark' title='Permanent Link: &#8230;and another Grails plugin'>&#8230;and another Grails plugin</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/09/18/ive-released-another-grails-plugin/' rel='bookmark' title='Permanent Link: I&#8217;ve released another Grails plugin'>I&#8217;ve released another Grails plugin</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/09/25/grails-mail-plugin-04-released-as-well-as-the-first-grails-rocks-screencast/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Latest Grails-mail plugin SVN commits fix GSP view rendering</title>
		<link>http://www.anyware.co.uk/2005/2008/09/11/latest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering/</link>
		<comments>http://www.anyware.co.uk/2005/2008/09/11/latest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 14:31:42 +0000</pubDate>
		<dc:creator>Marc Palmer</dc:creator>
				<category><![CDATA[Groovy and Grails]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.anyware.co.uk/2005/?p=205</guid>
		<description><![CDATA[The other day I committed some further improvements to the experimental email body rendering from GSP views. There is no release of grails-mail with this code in, you need to manually svn checkout and build it from the grails-plugins SVN repo.
Anyway, the fixes allow you to render email body GSPs where the GSP may live [...]


Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/09/18/ive-released-another-grails-plugin/' rel='bookmark' title='Permanent Link: I&#8217;ve released another Grails plugin'>I&#8217;ve released another Grails plugin</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/08/20/weceem-01-to-02-changes-under-the-hood/' rel='bookmark' title='Permanent Link: Weceem 0.1 to 0.2 &#8211; changes under the hood'>Weceem 0.1 to 0.2 &#8211; changes under the hood</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The other day I committed some further improvements to the experimental email body rendering from GSP views. There is no release of grails-mail with this code in, you need to manually svn checkout and build it from the grails-plugins SVN repo.</p>
<p>Anyway, the fixes allow you to render email body GSPs where the GSP may live in a plugin, or be overriden by your app. To do this, you have to specify the plugin name when rendering the body of the mail &#8211; this is required because there&#8217;s currently no way Grails can know where the view might be as the contents of plugin view trees are not merged with the app view tree. I can see scope for a future improvement in Grails core, to add all plugin view paths to the resource search paths during development, and shipping a single merged views/ tree within .WAR files built by Grails.</p>
<p>So here&#8217;s how you render a mail body from a view in a controller with grails-mail installed:</p>
<div class="dean_ch" style="white-space: wrap;">sendMail <span class="br0">&#123;</span><br />
&nbsp; &nbsp;to <span class="st0">&quot;test@somewhere.com&quot;</span><br />
&nbsp; &nbsp;subject <span class="st0">&quot;Hello&quot;</span><br />
&nbsp; &nbsp;body<span class="br0">&#40;</span>view:<span class="st0">&#8216;/something/mailbody1.gsp&#8217;</span>,<br />
&nbsp; &nbsp; &nbsp; plugin:<span class="st0">&#8216;my-great-plugin&#8217;</span><span class="br0">&#41;</span><br />
<span class="br0">&#125;</span></div>
<p>This will try to locate the view in:</p>
<p>&lt;app&gt;/grails-app/views/something/mailbody1.gsp</p>
<p>but if it can&#8217;t find it, will try:</p>
<p>&lt;app&gt;/plugins/my-great-plugin-&lt;vernum&gt;/grails-app/views/something/mailbody1.gsp</p>
<p>Also these commits fix GSP taglibs in email bodies. Previously they&#8217;d appear in the HTML response of the controller ooops&#8230; now they appear in the body of the mail as expected.</p>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F11%2Flatest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering%2F&amp;linkname=Latest%20Grails-mail%20plugin%20SVN%20commits%20fix%20GSP%20view%20rendering" title="Twitter" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/slashdot?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F11%2Flatest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering%2F&amp;linkname=Latest%20Grails-mail%20plugin%20SVN%20commits%20fix%20GSP%20view%20rendering" title="Slashdot" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/slashdot.png" width="16" height="16" alt="Slashdot"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F11%2Flatest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering%2F&amp;linkname=Latest%20Grails-mail%20plugin%20SVN%20commits%20fix%20GSP%20view%20rendering" title="Delicious" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/evernote?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F11%2Flatest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering%2F&amp;linkname=Latest%20Grails-mail%20plugin%20SVN%20commits%20fix%20GSP%20view%20rendering" title="Evernote" rel="nofollow" target="_blank"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/icons/evernote.png" width="16" height="16" alt="Evernote"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.anyware.co.uk%2F2005%2F2008%2F09%2F11%2Flatest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering%2F&amp;linkname=Latest%20Grails-mail%20plugin%20SVN%20commits%20fix%20GSP%20view%20rendering"><img src="http://www.anyware.co.uk/2005/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>

<p>Related posts:<ol><li><a href='http://www.anyware.co.uk/2005/2009/09/18/ive-released-another-grails-plugin/' rel='bookmark' title='Permanent Link: I&#8217;ve released another Grails plugin'>I&#8217;ve released another Grails plugin</a></li>
<li><a href='http://www.anyware.co.uk/2005/2009/08/20/weceem-01-to-02-changes-under-the-hood/' rel='bookmark' title='Permanent Link: Weceem 0.1 to 0.2 &#8211; changes under the hood'>Weceem 0.1 to 0.2 &#8211; changes under the hood</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.anyware.co.uk/2005/2008/09/11/latest-grails-mail-plugin-svn-commits-fix-gsp-view-rendering/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
