Monday, December 1, 2008

iUI Web Development with Grails article

I am excited to announce my iPhone article iUI Web Development with Grails was just published as the cover story of the December 2008 edition of GroovyMag. In the article I explain why you might want to consider iPhone web development over native iPhone applications, how to add native iPhone looking support to an existing Grails application using the iUI library and the iUI Grail plug-in as well as tips for testing and debugging iPhone web applications. Check out my article and the other great GroovyMag articles at

Wednesday, November 26, 2008

Columbus iPhone Developers User Group (CIDUG)

I am interested in meeting other iPhone developers in Central Ohio and sharing information. So I am proposing a local iPhone Developers User Group. If you are interested, please join the Google Group created for starting the conversation about this group at

Wednesday, November 5, 2008

Announcing Grails iUI plug-in

I am excited to announce the release of a new Grails plug-in, iUI Plug-in version 0.2. This is the initial release of the plug-in. This plug-in installs the current version of the popular iUI library for developing native looking iPhone web applications. iUI is a combination of CSS, JavaScript and images for simplifying iPhone web applications and give the application a native iPhone application look and feel.

You can find more details about the Grails iUI plug-in and how to use it at the iUI Plug-in page. Also keep a look out for an upcoming indepth iPhone Web Development article in GroovyMag.

Eclipse World 2008 Slides

I just finished speaking at Eclipse World 2008. Like previous years it was a marathon of speaking. I gave one full day tutorial and three regular sessions so unfortunately I did not get to attend very many sessions. I have posted my sessions for all to enjoy.

Develop Better Java EE Applications With Eclipse Web Tools Platform (tutorial)
Step by Step: Making Enterprise JavaBeans With J2EE Standard Tools
Beat Those Java Dependencies: Extend the Web Tools Platform With Facets
Interacting With Relational Databases

Thursday, October 16, 2008

Please Be Safe

I thought this was a humorous sign I saw at The Wilds.

This is an interesting way to protect your investment. Notice the large cats in the background.

Sunday, August 10, 2008

Enabling the AJAX Spinner in Grails

For standard page requests, browsers use an animated icon as an indicator to the user that the browser is waiting for the request to complete. However, for AJAX calls that are initiated via JavaScript in a separate thread the browser icon does not animate. So, typically the application developers use an animated icon within the page to notify the user the page is waiting for a request to complete. In an effort to simplify web development Grails automatically includes an animated spinner icon when using the Prototype or AJAX frameworks.

To enable the Grails AJAX spinner you must include the Prototype or JavaScript typically using the or tags. But these declarations can not be included just any place within your page. These declarations must come before the tag since it includes the application.js file that registers the spinner with Prototype and requires Prototype variables to be available.

If you are using the default layout found in main.gsp, you can declare the Prototype or inclusions in one of two places. You can either make the declarations in the header section of an individual view such as in this example:

<title>Make and Model</title>
<meta equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="layout" content="main">
<g:javascript library="scriptaculous"/>
Or in the header section of the main.gsp prior to the application declaration such as in this example.

<title><g:layoutTitle default="Grails" /></title>
<link rel="stylesheet" href="${createLinkTo(dir:'css',file:'main.css')}" />
<link rel="shortcut icon" href="${createLinkTo(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
<g:layoutHead />
<g:javascript library="scriptaculous" />
<g:javascript library="application" />
If you are not using the standard layout just make sure you put the Prototype or tag prior to the application tag and include the following or similar div tag found in the default layout.

<div id="spinner" class="spinner" style="display:none;">
<img src="${createLinkTo(dir:'images',file:'spinner.gif')}" alt="Spinner" />

Friday, August 8, 2008

Groovy Programming Review

I recently finished reading Groovy Programming: Dynamic Productivity for the Java Developer by Venkat Subramaniam. I found it to be a very good and inspiring book. For experienced Groovy developers, the first half has some jems so it is worth reading but the second half is what makes the book. Venkat's explination of Groovy's Meta Programming and dynamic features makes a difficult topic very easy to understand with good simple examples. His explination of building builders inspired me to evaluate some of the behaivor tests I was writing at the time. It helped me to realize the hierartical data structure I was building in code for test data could be better represented using a custom builder which ultimately made the code much easier to read and maintain.

I recommend every serious Groovy and Java developer read at least the second half of the book so congradulations Venkat on an excellent book.

Saturday, July 26, 2008

NFJS COSS 2008 1st Day Wrap Up

It is the morning after the first day of the No Fluff Just Stuff Central Ohio Software Symposium 2008 and I am writing this blog at 6:05 am because I am still so mentally stimulated I could not sleep at all last night so I gave up trying. I hope it does not catch up with me during today's sessions.

I really enjoyed Jared Richardson's, author of Ship It! A Pratical Guide to Successful Software Projects, keynote called Career 2.0. He announced he was writing a book of the same name that he expects to finish in January. In his keynote, he encouraged us to take control of our careers by improving our visibility in the industry. Some of his suggestions for getting started were writing, speaking and contributing to open source. He recommended setting goals but starting with simple steps like writing a blog, giving lunch and learns in your office or contributing documentation to your favorite open source project or maybe one you want to learn more about.

I have to agree with Jared completely. During my exit interview from college with my advisor, I was asked what I wanted to do with my career. I told her I don't know. But I did know there were two things I did not want to do. I did not want to write and I did not want to teach. 12 years, 4 books, several articals, numerous technical classses, many conferences and COJUG presentations I can say that was a very narrow minded view. I have found those are two of my favorite things to do and doing them have opened so many doors including free trips to Europe. I also discovered that contributing and observing open sources has really improved my disipline as a developer. It has allowed me to be exposed to more projects and practices then I could even be exposed to in my consulting practice. It allows me to see more of what works and what doesn't.

I also attended Scott Davis's, author of Groovy Recipes, Blue Pill and Red Pill presentations I had heard so much about from Java One. I was not dissappointed. I think it was a great introduction to Groovy for Java developers.

Friday, July 18, 2008

Validate legacy databases with Grails

By default Grails assume you are creating a new database schema from scratch. But one of its strengths is it's ease of mapping to existing database tables. However when you map to existing tables you must be careful. By default the DataSource.groovy file, is configured to create-drop tables so it is easy to inadvertently wipe out data and tables. In addition switching to the less disruptive option of update may not be safe either. See GORM objects by default have an id and version attribute that are injected by GORM. When GORM gets initialized it will add id and version columns to your database which you may not want or expect. So the best option may be to use the validate option which is not documented in the Grails user guide. On start up it will validate the tables have the columns that your domain classes expect and if not fail to start.

By the way, to turn off the version column you will need to set version to false in the domain class mappings. To prevent the id column from being created, you will need to map id to the primary key column of your table.

Wednesday, July 16, 2008

Eclipse 3.4 (Ganymede) is more friendly to Maven Users

Last week I started using Eclipse 3.4 (Ganymede). There are a ton of new subtle enhancements along with the new major features. One of the subtle features I immediately appreciated was not even in the Workbench or Java Development User Guide’s What’s new documentation. It is a minor enhancement to the Classpath Variables which makes working with a local Maven repository so much easier.

Let me start of by explaining what Eclipse Classpath Variables are. As you probably already know, fully qualified paths in code or configurations are a sign of a code smell. It often leads to comments like “It works on my machine”. In Eclipse projects, this commonly happens in adding Libraries to the classpath. Many developers use the Project > Properties > Java Build Path > Libraries and press the Add External Jars button to add jars. This causes a fully qualified path to the jar to be put in the Eclipse .classpath file. If other developers on the team do not have the exact same path, sharing the .classpath file via version control does not work. So I have seen many teams choose to not version control the file to get around the problem. Unfortunately that is not the answer because it takes longer to set up new developers and also leads to “It compiles and runs on my machine” since everybody is using a different library configuration. Another problem that often happens is one developer adds a new library dependency and other team members start getting ClassNotFoundExceptions or code from version control no longer compiles because they didn’t know a new jar dependency was added.

Classpath Variables can solve this by configuring a variable starting point in the classpath and then using the Add Variable button on the Libraries tab of Java Build Properties rather than the Add External Library button, jars can be added in a much more flexible way. As a mater of fact, just two weeks ago when I presented my 10 Eclipse Productivity Tips at COJUG somebody said we had that problem on my last project so we stopped checking in that file because one person didn’t want to conform. After the presentation she realized Classpath Variables could have solved that.

For Maven users a Classpath Variable of M2_REPO is often used and configured to the top of their local Maven repository. Unfortunately, maven repositories can often get very deep and may contain multiple copies of the same or similar jars in different locations. So, navigating the directory structure to add many dependencies can be very time consuming. This is where the new Classpath Variable feature comes in. A new filename filter was added making it easier to see all the jars at once or farther narrowing can be done.

Thursday, July 3, 2008

Free Groovy and Grails training and copy of Beginning Groovy and Grails

On March 10th, I made the offer to provide free 1 1/2 hours of Groovy and Grails training to any companies in the Central Ohio area. This offer has been very popular. With the recent publication of my book Beginning Groovy and Grails, I want re-offer this opportunity and sweeten the deal by providing one free copy of Beginning Groovy and Grails to any companies receiving the training. The training defines Groovy and Grails and demonstrates their capabilities with a live coding demo including some AJAX examples. If you are interested in learning more about taking advantage of this offer, please email me at

Eclipse ${project_loc} errors during Grails development

In your Grails development with Eclipse, if you have ever used the Run Launch configuration provided by Grails or followed Add domain classes etc. instructions on the Grails Eclipse IDE Integration wiki page, you may have received the Eclipse error message “Variable references empty selection: ${project_loc}”.

This is caused by the fact that certain actions can cause Eclipse to loose focus of the current project. To resolve the issue, simply select your current project in the Package Explorer or Navigator and repeat task that caused the error. This can get annoying so another alternative is to replace ${project_loc} with ${workspace_loc}\project_name if your project in your workspace directory.

Monday, June 30, 2008

Tip: Causes of java.lang.ClassNotFoundException

Class loading issues are a common frustration for many Java developers. The dreaded java.langClassNotFoundException means they can forget about going home at a reasonable hour. While Java class loading is very powerful feature, it is also a very flexible and confusing feature. But don’t let this exception scare you. The majority of the time, there are three very practical things to look at in order to resolve the issue.
  1. If you are loading a class by name either using Class.forName() or an Inversion of Control container like Spring it may be as simple as the class name was spelled incorrectly. Validate the fully qualified class name is spelled correctly. The best way is to use the Eclipse “Copy Qualified Name” feature or copying and pasting the package name and class name directly from the source file.
  2. The mostly likely culprit is the class can not really be found. This can be caused by the directory or jar file containing class not being included in the JVM classpath. The other common cause when multiple class loaders are involved such as in a web container or application server is a visibility problem. For example classes in an ejb-jar do not have access to classes in the war file for the majority of application servers. But classes in the war file have access to classes in the ejb-jar. The reason is the war file typically has its own class loader which is a child class loader of the ear class loader. The basic rule is children class loaders have access to their parents but not visa versa. For this error, check your application server’s class loading documentation and make sure the class that is trying to access the not found class has the acceptable access.
  3. The most challenging cause to debug is a dependency issue during initialization of a class. During initialization if a class can’t find certain resources it depends on such as other classes or files, this may result in a ClassNotFoundException. To resolve this, you may need to validate all dependencies are available. If you have the code, you can look at the class imports and any static initilization. If you don’t, you might need to reverse engineer the class to determine the dependencies.
I hope this helps. Just remember the cause of ClassNotFoundExceptions can be difficult to resolve but they are always deterministic so stick with it.

Thursday, June 26, 2008

Announcing Beginning Groovy and Grails Book

Ok, Beginning Groovy and Grails has been available for about a week and my co-authors have already announced it but I wanted to wait to make my announcement when the electronic/PDF version was available. It was a long but fun process and I am very proud of the results. I think we have managed to put together a book that will easily enable developers to get up to speed with what they need to know in Groovy to begin being productive in Grails. I think the remainder of the book does a good job of providing a strong foundation of the common things, plug-ins and tips a new Grails developer will need to know in order to put together a fully functional Web 2.0 application. Currently is sold out of print versions but you can still order and they will be getting more soon. Or you can purchase the print or electronic version from the Apress website.

Virtualization on the Mac; VMWare Fusion vs. Parallels

Let me start off by disclosing I am an architect, software developer, consultant and author so my use of virtualization may not be the typical use. Your use and results with virtualization are likely to vary. That said the way I primarily take advantage of virtualization on my Mac is segmentation. By that I mean I typically have multiple virtual machines at one time. I organize them by client, project or technology. This enables me to simplify my life. For example, one of the best things about owning a Mac laptop for a consultant is it allows me through virtualization to carry all three major operating system; OSX, Windows and Linux, all on a compact and powerful device. In addition, it enables me to create customized and easily backed up environments for each of my clients. When my assignment or contract ends, I can backup the virtual machine to a large secure hard drive and when my clients return with more work or questions, I am able to bring everything back up the way it was.

I bought my first Mac, a Mac Book Pro, just over a year ago. I immediately purchased a copy of Parallels because at the time it was the only viable virtualization option available for Mac. I successfully used Parallels for about 9 months on OS X 10.4 Tiger. I endured some minor annoyances which I will discuss later but over all I was extremely pleased. Then I upgraded to OS X 1.5 Leopard by backing up my whole machine, formatting the hard drive and reinstalling the OS and all my software. After that, I started running into some stability problems which I will describe later. That made me start evaluating other options. After discovering how my friends enjoyed VMWare Fusion, and based on my experience with other VMWare products, I made the switch. So for the past four months, I have been creating all new VMs in VMWare and using Parallels for my existing VMs.

I think both solutions are excellent and I will be the first to admit that some of my issues with Parallels could be self-inflicted. But this experience encouraged me to provide a comparison of the features and things I like and dislike about both products. I hope it helps if you are trying to evaluate virtualization solutions for the Mac.

VMWare Fusion

Over all, I have found VMWare Fusion to be extremely stable and simple which is why it is now my primary VM solution. However, it lacks many of the Mac integrations I enjoy in Parallels and does not have very many configuration options.

+ Stable, works well on OS X 10.5 Leopard and with Spaces
+ Larger community
+ Many reconfigured images
+ VMs can be shared between Windows and Mac versions of VMWare
+ VM is stored in a single stand alone file
- Not very may configurations, including changing a VM name - the solution for that feels very hacky
- Poor integration with the Mac - integration between the Mac and VM is the same as having two separate machines on a network.
- Start up performance from sleep seems slower than Parallels, but that might be because it uses an overlay until the machine is ready so it may just be perceived performance
- Making a clone is just copying a file. When you start the new VM copy, it prompts you as to whether this is a move or a clone which feels very reactive not proactive.
- Virtual library window stays up in the background after the VM is started
- Sound doesn’t work even after following forum and tech tips

Parallels Desktop for Mac

Over all, Parallels excels in Mac integration.

+ Great Mac integration - I love the fact it shows up as a device like any disk image
+ Parallels explorer enables you to see file contents of a VM with out starting it up which can save time when you just need a file
- Unstable with OS X 1.5 especially when using Spaces
- Constantly crashes my whole machine when I plug in a projector while it is running
- Prompts me with warnings of missing devices every time the VM starts up after removing the original base VM I cloned from
- I can not stand that the applications running in the VM are added to my dock. This needs to be changed to a configurable option
- Some times it does not want to shut down without forcing it when certain applications are running
- With Spaces turned on after my Mac wakes up, I get horrible screen painting issues in my VM

Wednesday, June 18, 2008

My Biggest Fan

I recently received copies of the third book I co-authored for Apress, Beginning Groovy and Grails. Since then my four year old son has been carrying around copies of all my book saying things like "I love your books, the ones that you wrote" and "I love the books your pictures are on". But that did not prepare me for coming home today and finding my son had taken all the Apress books off my shelves, which are quite a fews, in an effort to find my picture on the back of them.

Saturday, June 14, 2008

Eclipse Productivity Tips

I gave a presentation this week at COJUG (Central Ohio Java Users Group) called 10 (or so) Eclipse Productivity Tips. The presentation was very well attended, especially for a lunch meeting. We had over 50 people. The slides are available on the link above if you want to check them out.

Friday, June 13, 2008

eApps is great for Grails hosting

In episode 58 of the Grails Podcast, Glen and Sven spoke about a Grails hosting service that costs about a dollar a day if used in production. So, I thought I would share my experiences in hosting Grails applications. For the past year I have used eApps for my Java, PHP and Grails hosting. I have been extemely happy with them from a support, feature and price perspective. I have used many hosting services in the past including other Java hosting services and eApps is definitely the best. My Beginning Groovy and Grails co-authors, Joseph Nusairat and Jim Shingler also use them for hosting as well.

eApps starts Java hosting at $20 a month for Tomcat and a offers a $30 option for JBoss or Glassfish which is less than a dollar a day. It also includes database options of MySQL, PostgreSQL or Derby. It has a load of other standard options such as email, ftp, control panel, PHP, Ruby On Rails, etc. But my favorite features are root access to my own virtual server, DNS configuration through control panel, easily hosting of multiple domains with one account (which can bring the daily cost down furture) and a Subversion or CVS repository.

I personally use the JBoss option while Joseph and Jim are using the Tomcat option.

Wednesday, April 30, 2008

Doughnut Token

The development team I am currently on has the common practice of using an integration token like many agile teams. Instead of using a stuffed animal like some teams to communicate that you are integrating or checking in code, we use the integration token built into the open source XP project management tool XPlanner. We started using this when we had an offshore component. We have continued using an on-line token because some of the developers do their best work in the evenings from home, and we still want to prevent each other from clobbering check-ins.

This week we experienced a new challenge. Two team members brought donuts in on the same day. There were so many donuts we could not finish them all in one day. So to prevent this tragedy from happening in the future, we started a new practice based on our agile experience. We implemented the first ever donut token. Now we should be able to spread out our donut enjoyment. Unfortunately, there are no known open source donut tokens available. If anybody is inclined to create one, make sure it includes a mobile component so the token can be checked from a
Krispy Kreme parking lot.

Tuesday, April 29, 2008

Agile Web Development with Groovy and Grails at ITX Forum

I will be presenting "Agile Web Development with Groovy and Grails for the Java Platform" at the ITX Forum sponsored by Compuware on Tuesday May 27, 2008 from 5:30 pm to 7:30 pm at the Compuware Columbus Branch located 8351 North High Street Suite 200, Columbus Ohio 43235. This is a free event. If you are interested in attending, please RSVP to by Friday May 23, 2008.

Monday, April 21, 2008

Posted my Agile Development with Groovy and Grails presentation

I have given a presentation I call Agile Development with Groovy and Grails at CodeMash, the Columbus Ruby Brigade, and other places around Columbus, Ohio. Unfortunately most of the presentation shows the power of Groovy and Grails in demo but if you are interested you can download it at

In addition, I offer to freely give this presentation to any companies or organizations interested in Groovy and Grails in the central Ohio area.

Announcing Polyglot Programming interview with Neal Ford

Recently, I had a chance to sit down with one of my favorite people, Neal Ford Meme Wrangler for ThoughtWorks, and ask him about about the term he coined, Polyglot Programming. In the interview, Neal talks about the history of the term and its recent interest. Neal also provides great insite into the Java platform and the languages that run on it including Java, Groovy, Ruby, Scala, Python and Haskle.

You can find the interview at the COJUG website.

Thursday, April 17, 2008

Mounting HP Photosmart All-In-One printer SD cards on Mac OS X

I have an HP Photosmart 2575 All-In-One printer with flash, SD card, USB drive, etc reader. I have been frustrated since I started trying to use my card reader on my printer with my Mac. There does not seem to be an easy way to mount one of the cards with the HP provided software like I expected there to be. The only way I could get a card to mount so I could import my pictures into iPhoto was to run HP Photosmart Studio Software and start importing the photos from it. But the problem is it started importing my pictures to my Pictures folder as well as iPhoto and I had to remember to delete the duplicate photos from the Pictures folder.

Well after a year, I have solved my frustration. I figured out that HP was just using sharing to access the printer and the card became a drive on that share. Below is how I now mount my card without running the HP software.

Mounting SD Cards on HP Photosmart All-In-One Printers

1. Put card in appropriate slot on printer.
2. From Finder choose Go > Connect to Server.
3. Enter smb:// where ip address is the ip address of your printer.
4. Press Connect.
5. When prompted for user name and password select Guest and press Connect.

At this point, your printer should be added as a share and if you are lucky iPhoto will auto start.

Firefox 3 beta 5 Rocks

I know I have only been playing with it for two days but I am really impressed with Firefox 3 beta 5. I especially love the auto complete feature which not only shows you recent sites that match what you have typed so far, but it also shows the favicon and the title of the page.

Saturday, April 5, 2008

Grails Integrated Framework Documentation

One of the things I really like about Grails is that it does not suffer from "Not Invented Here" syndrome. Instead or reinventing the wheel, it integrates with best of breed proven open source frameworks. It then goes on to make the integration seamless hiding much of the complexities of those frameworks. But sometimes you need to access those frameworks more explicitly and therefor you must learn there apis, configurations and other details. So, below is a compiled list of the documentation for the frameworks Grails integrates.

Groovy - User Guide - API & GDK
Spring Framework - User Guide - API
Hibernate - User Guild - API
SiteMesh - User Guide - API
Jetty - User Guide - API
HSQLDB - User Guide - API
JUnit - User Guide - API
Ant - User Guide - User Guide - API
Prototype - User Guide - API
OpenRico - Demos

Wednesday, April 2, 2008


I am excited to announce that in addition to my responsibilities at Judd Solutions, I have excepted the position as the g-wizMOBILE CTO. g-wizMOBILE is a service and product company targeting the mobile platforms of J2ME, iPhone, Android and WAP. Mobile is such an exciting and emerging market. I look forward applying my years of J2ME and enterprise Java experience to create exciting new products and help other companies trying to develop and deploy their own mobile applications.

Wednesday, March 19, 2008

Groovy Meta Libraries

The more and more I write Groovy, the more I really like its meta-programming (Meta-Object Protocol or MOP) capabilities. I find myself frequently refactoring code into meta methods of existing Java classes that would have otherwise been methods in some utility classes. I am slowly building a libraries of these I would like to reuse. Unfortunately one thing that challenges me is what is the best practices for turning them into reusable meta libraries. I would like to be able to package them in a jar and just drop them in the classpath and they would be automatically available(bootstrapped). This would make them easier to carry between projects and share with the community. There would also have to be a good way of creating good GroovyDoc like we have with the GDK. If somebody has a recommendation or idea I would love to hear it. Otherwise, I wonder if there could be a standard way to use the Java jar service provider mechanism like JDBC driver do now to auto register.

Thursday, March 13, 2008

I might be getting this DSL stuff

I know I am a little slow. I usually have to hear and see something three times before I start to grasp it. I know it was that way with Aspects and it has definitely been that way with DSLs. At every conference I have gone to for the last 2 years I have made sure to attend DSL talks. I have probably seen Neal Ford speak on the topic at least five times alone. By this point, I have definitely understood the concepts. Hearing Neal Ford's Starbuck's language example gave me that aha moment. But I have not been able to take it to the next step. I have not been able to put it into practice. That may be because I have been writing code so long I don't see problem with curly braces and long lists of method chaining and ugly parameters. But tonight, I think I got it. I think I saw the value in a whole new way.

I took this simple example written in Groovy that only a programmer could love.

println this.class.getResourceAsStream('readme.txt').getText()

This example only reads a file found in the classpath and then prints it to standard out. It might look pretty standard to developers but to anybody else it looks like a cryptic foreign language. This example is even in Groovy which simplifies the code a lot compared to a Java equivalent. (I actually started writing a Java equivalent for this post but it was too painful after writing the Groovy solution so I stopped.)

So after looking at this example, I set out to write the same functionality in a human readable format. In all the DSL sessions I have attended, they always say start of with the end in mind and make it look like a sentence.

So, I came up with "write readme.txt contents". In code it looks like the following example:

write 'readme.txt'.contents()

Not to bad for my first DSL. I think the intent is pretty clear. Next is how I implemented it.

String.metaClass.contents = {

def write = { file ->
println file

write 'readme.txt'.contents()

You can see I used a little bit of Groovy's MOP (Meta-Object Programming) to add a contents method to the String class that does the resource loading base on the delegate which is the object on which the message was passed which in this case is the 'readme.txt' String. Next I defined a write closure that does a println on the parameter passed. Note using Groovy's optional parentheses makes it flow much more like a natural sentence.

Now that I have reached this milestone, I am afraid all standard code is going to repulse me. I know I am stuggling to write Java code after having used Groovy.

Other advantages to Apple distribution model for iPhone apps

Another great advantages of distributing applications for the iPhones is not having to write installers or complicated installation instructions. That alone should save lots of development time and support headaches. Wouldn't it be nice if all software installation could be this easy.

Wednesday, March 12, 2008

Apple's iPhone application deployment model is fair

In talking to some of my fellow developer friends about the recent iPhone SDK launch, they are shocked and disappointed with Apple's for distribution model but especially with Apple's 70/30 split of the sale of the applications.

I happen to think this model is quite fair. Here is a list of things included with sharing 30% with Apple:
  • distribution
  • credit card transactions
  • marketing
  • platform
I think this makes the program a great bargain. For example other forms of distribution like retail often have a 40-50% markup. More importantly Apple is providing the opportunity by providing and opening the platform and SDK at no additional charge.

I also can't believe the Standard Developer Program is only $99. I have been developing J2ME application for several years now. Whenever you deploy you typically need to sign the J2ME app it can be $500 for a single deployment option because of certificates. If want to make your application available through several carriers you might have to have several certificates which cost additional money and add to the packaging and deployment complexity.

But the final benefit is the program includes free distribution for free apps. So if you don't want to share 30% with Apple, there is a missed revenue opportunity in Apple's plan. I have not heard or seen anything relate to participating in sharing for any other monetization options. So if you give away your application for free but sell ads, you can save it all :)

Finally, if you are looking for iPhone developers please contact me, I am very excited about the platform and would love the opportunity to work on this new frontier.

Monday, March 10, 2008

Free Groovy and Grails lunch and learn

Over the last year, I have become a huge fan of Groovy and Grails. I believe the speed of development combined with the short learning curve and the power of the Java platform will make them the future of the Java platform. If you want know why I believe this, I am offering a free hour and a half lunch and learn to companies in the Central Ohio area. This is a presentation I gave at CodeMash and to several companies in the area. The presentation defines Groovy and Grails and then demonstrates their capabilities with a live coding demo including some AJAX examples. If you are interested in learning more about scheduling me to speak at your next lunch and learn, please email me at

Groovy Ant task is for Groovy Scripts

Groovy includes an Ant task for executing either file based or embedded Groovy. I recently discovered the file option denoted by the src attribute must be a Groovy script and not a Groovy class containing a main method. If you have used the Java task, you might expect the Ant arg set to be passed as a parameters to the main method since it is the common Ant convention for passing command line arguments. However, as you can see in the following snippet of code from org.codehaus.groovy.ant.Groovy, a GroovyShell is created and the args are passed as a property to the script.
final GroovyShell groovy = new GroovyShell(classLoader, new Binding(), configuration);
try {
final Script script = groovy.parse(txt, scriptName);
script.setProperty("ant", new AntBuilder(this));
// code removed for brevity
script.setProperty("args", cmdline.getCommandline());;
This behavior was unexpected since it does not follow the normal Ant convention and because the documentation states the src attribute is a File containing Groovy statements rather than stating it expects a Groovy Script.

Tuesday, March 4, 2008

Excellent cell phone browsing experience with Opera Mini

I have a MOTORAZR V3 from Sprint. I have been some what satisfied with my browsing experience and the embedded Obigo browser for websites designed for mobile content. However websites not designed for mobile content look awful. So when I hard the Java Posse talk about a J2ME based browser I had to give it a try. The browser is the free Opera Mini browser. It was easy to install, just use your embedded mobile browser and click on a link and it installs. Sites designed for mobile content look incredible while sites not designed for mobile also look good. For regular content, it renders a scaled down version and gives you the ability to zoom in and move about the page. The other great thing is unlike embedded browsers, it is easily upgrade able. If you are not pleased with your current mobile browsing experience you should give Opera Mini a try. It is not as nice as the iPhone browsing experience but if you have a standard phone for making phone calls this might make you look at your phone differently.

Tuesday, February 26, 2008

Announcing FallME 0.6.0

FallME 0.6.0 is now available. In addition to a forms initialization enhancement, there is now a example application. We hope to have a better example and tutorial soon.

Sunday, February 17, 2008

Will Grails Hurt the Spring and Hibernate Brands?

Groovy and Grails are really starting to get some well deserved attention especially after the release of Grails 1.0. Grails has a chance of being a game changing technology. For example one of the things Grails does is make Spring and Hibernate web development really easy and for the most part makes those frameworks transparent. As evidence of the transparency, you can read Graeme Rocher, Grails project lead, blog entry about his experience at the Spring Experience conference. Graeme discovered that most people did not realize Grails had anything to do with Spring.

Could Grails cause Spring and Hibernate to become the BASF of the Java community and adopt the tag line of "We don't make a lot of the products you develop with. We make a lot of the products you develop with better". It is hard to tell at this point. But it is probably a good idea for the companies offering Spring and/or Hibernate services to take a hard look at Grails and consider providing Grails services as well.

Tuesday, February 12, 2008

Amazon Web Services at COJUG

Mike Culver of Amazon spoke about Amazon's Web Service offerings today at COJUG. His presentations were a little different between the lunch and evening meetings but between both of them, he covered the following:

Amazon Elastic Compute Cloud (Amazon EC2)
Amazon Flexible Payments Service (Amazon FPS)
Amazon SimpleDB
Amazon Simple Storage Service (Amazon S3)
Amazon Simple Queue Service (Amazon SQS)

Mike made a great business case for each of these services and how then can really benefit different types of scaling concerns at an unbelievable price. He also stressed their incredibly high level of security and redundancy. He told us the government uses them for storage because of their high level of physical and data security as well as how auditors aggressively test disaster recovery.

I am very impressed with what I heard and saw. I have not seen any other infrastructure in my travels that can compare. Amazingly enough, I heard two other podcasts today that talked about these services unrelated to any Amazon propaganda. I hope I get to work with some of these technologies in the near future.

Monday, February 4, 2008

Grails Encourages Best Practices

You know how every Apple Mac user says there is something special about the Mac? They can't usually put their finger on it but they say something like "it just does what I expect it" or "it does what is right". Well that's the way I feel about Grails. Recently I wrote my first real tag in Grails and I was just amazed at how it felt and how it does the right thing by encouraging best practices. For starters, writing tag libraries is incredibly easy (Read the Piragua Blog for details on how to write a Grails tag.). So why is this a best practice? Well I have seen a lot of scriptlets written in JSPs that should have been reusable JSP tags. But because it was to difficult or time consuming for a developer to actually spend the time to create a JSP tag or even more difficult yet a JSF component it simply was not done. But with Grails tags it is so simple there is no excuse.

Another example is tag and controller integration tests automatically inject mock request, response and session objects. I have seen many projects with no unit tests for the web components or unit tests that require deploying the application because they do not use mock objects. By automatically including mock objects developers no more have to download and add jars for mock web frameworks or even create instances of the mock objects. This should save time and help improve unit tests.

Wednesday, January 30, 2008

Announcing FallME

I am proud to announce a new open source project for the Java mobile and embedded community. Jim Shingler and myself have released the first version of FallME version 0.5. FallME is a Java ME framework based on the popular Spring Framework but designed for mobile devices including those running MIDP. This framework provides an IoC container as well as a RecordStoreTemplate. You can download it and find more details at

Thursday, January 24, 2008

Touch is a PDA not an iPod

I don't understand why Apple will not just admit it. They have admitted the iPhone is a smart phone. With the recent enhancements and the soon to be released SDK, the iPod Touch is a PDA not an iPod. Assuming somebody comes out with an application that enables me to do a timesheet (preferably something like the Palm based ThinkDB which was a nice relational database with form designer) that I can sync with my Mac, I will be able to retire my old Sony CLIE for an iPod Touch and be able to justify the cost. See, I prefer to think of the device as a PDA I can play music on rather than an iPod with a browser. Best yet is it has to sync with my Mac better than my CLIE. The other two things I would love to see added since it is a PDA is extended memory and bluetooth. I would love bluetooth, so I could use a bluetooth keyboard to enter data.

Thursday, January 10, 2008

Open source of the week - PDFCreator

Do you ever have documents you want to convert to PDF? Maybe you want to prevent modifications by others or you want to make sure everybody can read it since PDF is a widely used format and the Adobe PDF reader is free. You could buy one of the Adobe products for creating PDFs. They cost between $299-$499. But if you don't want to spend that much or you are on you mother's machine over the holidays, there is a great free open source tool called PDFCreator. Just download it from and run the installer. You will now have a new printer named PDFCreator and you can simply create a PDF by printing any document to this printer.

Tuesday, January 8, 2008

Rod Johnson is coming to COJUG

I am excited to announce, Rod Johnson, "Father of Spring" is going to be speaking at a special Central Ohio Java Users Group (COJUG) event January 24th. Chech out the COJUG website for more details.

The Ultimate Enterprise Java Build Solution Revisited

In May of 2009, I wrote the blog post The Ultimate Enterprise Java Build Solution . Over the past 7 years since I wrote the post I have help...