<?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>fiveclouds &#187; web</title>
	<atom:link href="http://www.fiveclouds.com/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiveclouds.com</link>
	<description>collaboration, creativity and the next big thing</description>
	<lastBuildDate>Tue, 25 May 2010 11:06:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Charlotte 2.0.1 Podcast</title>
		<link>http://www.fiveclouds.com/2009/12/18/starting-charlotte-podcasts/</link>
		<comments>http://www.fiveclouds.com/2009/12/18/starting-charlotte-podcasts/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 03:13:02 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[charlotte]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=223</guid>
		<description><![CDATA[<p>The past few months have been incredibly busy,  a large part of that was finishing off work for 2009 and starting to prepare things for 2010.  After spending a year floating around doing a few side projects here and there I really wanted to start 2010 in the right way.</p>
<p>Since coming to Charlotte several years ago I have tried several paths to connecting with the tech scene in the city,  restarting the <a href="http://www.charlottejug.org">Charlotte Java User Group</a> and then helping organize <a href="http://www.barcampcharlotte.org">two Barcamps</a>. I&#8217;m met up with some great people in the city &#8211; but I still have felt like&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>The past few months have been incredibly busy,  a large part of that was finishing off work for 2009 and starting to prepare things for 2010.  After spending a year floating around doing a few side projects here and there I really wanted to start 2010 in the right way.</p>
<p>Since coming to Charlotte several years ago I have tried several paths to connecting with the tech scene in the city,  restarting the <a href="http://www.charlottejug.org">Charlotte Java User Group</a> and then helping organize <a href="http://www.barcampcharlotte.org">two Barcamps</a>. I&#8217;m met up with some great people in the city &#8211; but I still have felt like I haven&#8217;t really met the start-up elements,  those individuals who are driven to creating new technology companies and working in environments which foster innovation.</p>
<p>After the last Barcamp I was chatting with some of the guys from CLTBlog and Area15 and we started talking about doing a set of podcasts to explore that side of Charlotte and hopefully bring more of these activities to the surface.  After that there was the usual lull of getting back to daily work and filtering out enough time &#8211; then I decided to get together with Justin from CLTBlog and the <a href="http://www.netphase.com">Netphase</a> guys and very quickly (within a few days) we had our first podcast at <a href="http://www.areafifteen.com">Area15</a>.   One of the big hits was meeting up with Josh from <a href="http://www.charlotte20.com">Charlotte 2.0</a> &#8211; he is a man on a mission to help bring more start-ups to Charlotte and I&#8217;m sure I&#8217;m going to be listening and helping him with it all I can.</p>
<p><object width="400" height="255"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8127298&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=8127298&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="255"></embed></object>
<p><a href="http://vimeo.com/8127298">Charlotte 2.0.1</a> from <a href="http://vimeo.com/jruckman">Justin Ruckman</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>We are working to produce another podcast in mid January.  Hopefully it will establish the conversation &#8211; something that needs to start if we are going to build some new tech start-ups here in Charlotte.  It all makes me feel much more excited about 2010 &#8211; and I&#8217;m looking forward to sharing more about what I&#8217;m going to be doing too!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2009/12/18/starting-charlotte-podcasts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails and Google AppEngine</title>
		<link>http://www.fiveclouds.com/2009/07/13/grails-and-google-appengine/</link>
		<comments>http://www.fiveclouds.com/2009/07/13/grails-and-google-appengine/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 15:20:13 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[jpa]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=158</guid>
		<description><![CDATA[<p>I have recently started a new project and I decided based on some of the application requirements and its rapid development that I would host it at <a href="http://appengine.google.com">Google AppEngine</a>.  For a web framework I went with Grails due to the rapid prototyping that it makes possible.</p>
<p>I can&#8217;t really go to much into the functionality of the app,  however I thought I would share some of the experiences I&#8217;ve had building the application in the Google environment with Grails.  First off,  if you are going to be doing any serious work with Grails then you&#8217;ll need to get a&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I have recently started a new project and I decided based on some of the application requirements and its rapid development that I would host it at <a href="http://appengine.google.com">Google AppEngine</a>.  For a web framework I went with Grails due to the rapid prototyping that it makes possible.</p>
<p>I can&#8217;t really go to much into the functionality of the app,  however I thought I would share some of the experiences I&#8217;ve had building the application in the Google environment with Grails.  First off,  if you are going to be doing any serious work with Grails then you&#8217;ll need to get a copy of Intellij,  the experience developing with it is much better than others I tried (and improving even more in the 9.0M1 release).  The initial cut of the application was written using GORM and against a local database,  however after trying<a href="http://grails.org/plugin/gorm-jpa"> GORM-JPA</a> (it is very early still though moving quickly), I decided that trying to take a RDBMS mapping over to AppEngine datastore was not going to be a productive route.  The first real lesson of AppEngine is understanding the data store,  it is strange but several of the applications I have worked on over the past 4-5 years have started to move away from traditional RDBMS.  I&#8217;m not about to get into the <a href="http://blog.oskarsson.nu/2009/06/nosql-debrief.html">NoSQL</a> argument, other than to say ultimately you need to sit down and understand the tools that are available.  AppEngine DataStore is a powerful storage engine (I&#8217;m purposefully not calling it a database),  though it does take a little getting used to.  If you are planning to take a look I would start with the recent <a href="http://www.youtube.com/watch?v=2jW2iSKDipY">Google IO presentation by Max Ross</a>.</p>
<p>Since I have been working with HBase lately some of the concepts weren&#8217;t so alien, however it I did find that using JPA annotations actually lead me into incorrect thinking at times,  while adding the annotations I was immediately thinking in the RDBMS mapping terms.  Since I wanted to use the JPA annotations, but didn&#8217;t feel that GORM-JPA was quite ready I switched over and used the <a href="http://www.grails.org/JPA+Plugin">Grails JPA plugin</a>,  in some ways this meant creating a DAO to allow me to interact with the store.  In the end I did this through the creation of a service which I used in the controllers,  it was pretty generic thanks to the nature of groovy &#8211; in the end I can see myself probably moving back to GORM later on,  though in the meantime having a closer relationship with the JPA interface allowed me to better understand how relationships were being managed by AppEngine.  GORM has a tendency to abstract you a little to much at times and coming to terms with a new type of storage engine means that abstraction leads to another level of indirection.  I can see that as time passes and the ins and outs of AppEngine Datastore become more like second nature then that indirection is something that is easy to handle,  though at the beginning I think it is easier to get used to the datastore without it there.</p>
<p>Plugins is one of the powerful aspects of Grails,  however one of the problems you encounter in the AppEngine world is the file limit (currently 3,000).  While adding a lot of UI plugins speeds up development you can quickly find that you have blown the file limit.  Also make sure you watch the $USER_HOME/grails/1.1.1/projects/{yourproject}/stage directory,  if you start removing things from your application (ie. unneeded JS) then you might well find that they are remaining in the stage directory.</p>
<p>If you are using YUI you can switch to their servers, so that you don&#8217;t have to hold all the YUI files,  first add the following to your BootStrap:</p>
<pre class="brush: plain;">
def init = {servletContext -&gt;
JavascriptTagLib.LIBRARY_MAPPINGS.yui = []
}
</pre>
<p>Then in your main.gsp make sure you reference the CSS and JavaScript you need.</p>
<p>If you are using the grails-ui plugin 1.0.4 it is currently using the javax.rmi.UID class to generate UUIDs, this class is blacklisted by GAE/J and therefore you would need to change the GrailsUITagLibService.groovy and remove the import.  I found that I was able to use the UUID class to get a similar effect (see <a href="http://jira.codehaus.org/browse/GRAILSPLUGINS-1290">JIRA</a>)</p>
<pre class="brush: plain;">
def getUniqueId = { 'gui_' + DigestUtils.md5Hex(UUID.randomUUID().toString()) }
</pre>
<p>Once you have the basics in place,  then you will need security.  Obviously Google provides API&#8217;s to allow this to exist,  however often you need more complex security than is currently provided by the Google API.  In Grails I naturally jumped for the Aecgi plugin,  however after a few battles with its close connection with Hibernate (I get the feeling that plugin does a little too much and would be well served by being broken up into a several plugins rather than a lot of configuration in one plugin).  Next up was Stark Security plugin &#8211; I have to admit it was a little new to me,  however I was able to quickly implement this in grails and also get it functioning in GAE/J.  Basically I needed to create the basic DAO stuff using the plugin then change it to use JPA methods (as seen below):</p>
<p><strong>User.groovy</strong></p>
<pre class="brush: plain;">

import org.datanucleus.jpa.annotations.Extension
import org.springframework.security.GrantedAuthority
import org.springframework.security.userdetails.UserDetails
import javax.persistence.*

/**
* This class is the default UserDetails implementation for the Stark Security plugin.
* Since instances of this class will be used by the underlying Spring Security framework across
* Hibernate sessions, we can't have any lazy loading in here (see special handling of roles below).
*/
@Entity
class User implements UserDetails {

@Id
@GeneratedValue (strategy = GenerationType.IDENTITY)
@Extension (vendorName = &quot;datanucleus&quot;, key = &quot;gae.encoded-pk&quot;, value = &quot;true&quot;)
String id

@Column
String username

@Column
String password

List&lt;String&gt; roles = new ArrayList&lt;String&gt;();

GrantedAuthority[] getAuthorities() {
return roles.collect { new Role(authority:it) } as GrantedAuthority[]
}

boolean isAccountNonLocked() {
return true
}

def setAccountNonLocked(boolean nonLocked) {}

boolean isCredentialsNonExpired() {
return true
}

def setCredentialsNonExpired(boolean nonExpired) {}

boolean isAccountNonExpired() {
return true
}

def setAccountNonExpired(boolean acctNonExpired) {}

boolean isEnabled() {
return true
}

def setEnabled(boolean enabled) {}
}
</pre>
<p><strong>Role.groovy</strong></p>
<pre class="brush: plain;">

class Role implements GrantedAuthority {

String authority

static final ANONYMOUS = 'IS_AUTHENTICATED_ANONYMOUSLY'
// Add your roles here so you can reference them, for instance:
static final ADMIN = 'ROLE_ADMIN_USER'

// This list holds all roles, convenient when you're declaring controller methods
// that should be available to everybody (see AccessController for instance).  When
// you add roles to your system, make sure you add them to this list as well.
static final ALL_ROLES = [ANONYMOUS,ADMIN]

int compareTo(Object o) {
if (o instanceof Role) {
return this.authority.compareTo(o.authority)
}
return 0
}

String toString() {
return authority
}
}
</pre>
<p>Also once in AppEngine it is a little more sensitve to reflection,  with the standard plugin I got:</p>
<pre class="brush: plain;">
java.lang.IllegalAccessException: Reflection is not allowed on private int java.util.ArrayList.size
</pre>
<p>This was down to line 217 of the StarkSecurityGrailsPlugin.groovy having:</p>
<pre class="brush: plain;">
if (authFilters.size &lt; 1) {
</pre>
<p>When it should have been</p>
<pre class="brush: plain;">
if (authFilters.size() &lt; 1) {
</pre>
<p>I opened a <a href="http://jira.codehaus.org/browse/GRAILSPLUGINS-1298">JIRA for this one</a>.  Also you might find that plugins embed javascript (such as the Grails UI plugin),  in which case you will want to change the StarkSecurityConfig.groovy to allow access to these files:</p>
<pre class="brush: plain;">

authorizations = [
'/': Role.ALL_ROLES,
'/js/**': Role.ALL_ROLES,
'/css/**': Role.ALL_ROLES,
'/images/**': Role.ALL_ROLES,
'/plugins/**': Role.ALL_ROLES,
'/j_acegi_logout': Role.ALL_ROLES
]
</pre>
<p>Another problem was changing the log4j not to write to the file system (you&#8217;ll get a restricted class exception).  This is done with:</p>
<pre class="brush: plain;">
'null' name:'stacktrace'
</pre>
<p>While building the system up,  I also discovered the problems of not setting the <em>seralizationUIDs</em> on classes that might end up in session (ie. Role),  make sure you set it on the class or you will need to flush you local cookies after deployment.</p>
<p>Also I found a nasty little problem in the formRemote tag,  basically it would operate in the development server but not on AppEngine itself,  in the end I dug around I found that the JavascriptTagLib.groovy made some assumptions about a variable being a map which it wasn&#8217;t (in fact it was a String in this case).  Due to Groovy&#8217;s ability to reflect private values (which just feels dangerous),  you would end up with:</p>
<pre class="brush: plain;">

&lt;span&gt;[deve11/5.334872088869876828]&lt;/span&gt;.&lt;stderr&gt;: java.lang.SecurityException: java.lang.IllegalAccessException: Reflection is not allowed on private final char[] java.lang.String.value
</pre>
<p>I ended up having to pull the JavascriptTagLib.groovy into the project and make the fix there, and opened another <a href="http://jira.codehaus.org/browse/GRAILS-4826">JIRA in grails</a> for it.</p>
<p>So there it is &#8211; a brief little walkthrough getting Grails operating in Google AppEngine. GAE/J feels a little clunky at times and it probably does suffer from being a little rushed out of the door.  However,  after you start to get your head around the restrictions it does start to become a good platform.  Over time I&#8217;m sure we are going to see further improvements in the Google Platform,  and while I am still working with the Amazon style Infrastructure as s Service world starting to look more closely at Platform as a Service has opened my eyes to some of its benefits.  The days of managing your database and server could soon be gone &#8211; though I think it will be a specific type of application that benefits most.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2009/07/13/grails-and-google-appengine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When Enterprise 2.0 really kicks in</title>
		<link>http://www.fiveclouds.com/2008/01/01/when-enterprise-20-really-kicks-in/</link>
		<comments>http://www.fiveclouds.com/2008/01/01/when-enterprise-20-really-kicks-in/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 07:55:02 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/2008/01/01/when-enterprise-20-really-kicks-in/</guid>
		<description><![CDATA[<p><img src="http://geekandpoke.typepad.com/geekandpoke/images/2007/12/28/ep203_2.jpg" height="338" width="480" /></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://geekandpoke.typepad.com/geekandpoke/images/2007/12/28/ep203_2.jpg" height="338" width="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/01/01/when-enterprise-20-really-kicks-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
