Techno Trouser Blogs
Here are a series of short blogs about some technology that I am using, and some passing comments about some other interesting “techy” stuff ...
Installing Groovy and Grails
Oct 26
2008
Having just bought a new Mac Book I thought I would document the steps for installing Groovy and Grails.
Step 1 - Download Groovy
Go to http://groovy.codehaus.org/Downloadand download Groovy (Version 1.5.7). The Tutorial 1 - Getting Started is a help but as a newcomer to Mac OS-X I found the installation instructions more than a bit vague.
Download the zipped Binary Release and copy the resulting folder (mine was called groovy-1.5.7) to your target folder. I stored mine in the Library folder (under Macintosh HD). This is where the Java folder resides, so it seemed a reasonable place to store it.
Step 2 - Download Grails
While we are here, we might as well do the same for Grails via the http://grails.org/Download download website and download the Binary ZIP. Move the resulting folder (grails-1.0.3) to the Library folder.
Step 3 - Edit HOME variable
The Getting Started instructions tell you to Create a GRAILS_HOME environment variable that points to the path where you extracted the archive. On the Apple this is in a file called profile which is found in the etc folder.
In the Textmate ‘open file’ dialog box (tick the Show Hidden Files checkbox) and edit /etc/profile to include the following:
export JAVA_HOME=/Library/Java/Home
export GROOVY_HOME=/Library/groovy-1.5.7
export GRAILS_HOME=/Library/grails-1.0.3
PATH=$PATH:$GROOVY_HOME/bin
PATH=$PATH:$GRAILS_HOME/bin
Step 4 - Check it out
By opening the terminal window (Applications/Utilities/Terminal) and typing groovysh you can check that Groovy was installed properly.
Then type grails to check that grails is installed. This gave me a -bash: /Library/grails-1.0.3/bin/grails: Permission denied error. Run the command chmod +x /Library/grails-1.0.3/bin/grails - to fix this problem (I am not sure what this does but I found the solution somewhere on the web).
Have fun!
Installing Netbeans and MySQL
I intend to use MySQL as my database of choice for web applications. I have been using Textmate to develop Groovy / Grails applications, but Netbeans V6.5 (RC) now supports Groovy and Grails. I can't quite bring myself to move away from the simplicity of Textmate but will check out Netbeans 6.5 as it matures.
Go to the www.netbeans.org website for the latest downloads. I installed the Netbeans + MySQL (Version 6.1) bundle first - this is a quick and simple way to get going with MySQL (Don't forget to install the MySQL preference pane). Then I downloaded the Version 6.5 (Release candidate). Just follow the instructions; if only everything was this simple.
Note: You will need to set Groovy Home in the Netbeans preferences (Miscellaneous/Groovy) to /Library/grails-1.0.3
For a good introduction to Groovy and Grails take a look at Jason Ruldolph’s (free) PDF Getting Started with Groovy and Grails.
Other essential reading is Beginning Groovy and Grails by Christopher Judd, Joseph Nusairat and James Shingler and The Definitive Guide to Grails (Version 2) by Greame Rocher and Jeff Brown
Sproutcore?
This looks interesting. Sproutcore is a framework for developing desk-top like applications for browsers. It has been used by Apple on their Mobile.Me application. Take a look at www.sproutcore.com.
I will report back when I have used it a bit more, but in the short term I am not sure if a have a real use for it.
New from Google
Sep 15
2008
Google have been very busy recently with lots of new offerings. I have only looked at a few of their products and this is just the tip of the iceberg
Google Chrome
Chrome is the new web browser from Google with fast page loads and a minimalist user interface. Less often used features are available via a few simple icons, most of which are easily discoverable as you need them. Chrome uses the same rendering engine (WebKit) as Apple's Safari, but bundles its own super-fast JavaScript engine, called V8.
I emailed all my clients to point them towards Chrome, and I know that quite a few of them are now using Chrome as their default (Windows) browser. For me it is difficult to move away from Safari on the Apple.
Google Charts
I was looking for a simple way to convey some statistics from a Groovy / Grails / MySQL application and took a quick look at Google charts.
The Team GB Olympic medal haul would look something like this using Google Charts:
There are lots of different chart types, and very easy to drive from a JSP or GSP page.
Google Analytics
Google Analytics requires that you drop a section of Javascript code at the bottom of each webpage.
But from then on it is capturing lots of useful information about web traffic, and also allows you to profile your sites against a workflow, and compare how different approaches affect your sales conversions.
Google Mail
I set up my Google mail account many months ago, but don't tend to use it for day-to-day email. However, on a recent collaboration it was very handy to be able to share and co-edit a document. I should take some time to look into more of the Google mail features ...
Dear Bill
Aug 20
2008
Back in 2007 I was developing a .Net web service application for a local company, and upgraded to .Net version 2, only to find some new bugs (things that worked OK in version 1).
One bug that frustrated me for a few days was that any date function resulted in a “Subscript out of range” error message. I couldn't find any solution to this on the web (but plenty of people with the same problem) and eventually found that by changing my international settings for short date from dd mmm yy (I like to display dates with a 3 character month to avoid US/UK ambiguity) to dd-mm-yy solved the problem.
This was about the final straw for me with Microsoft. Shortly after this I bought my first Mac and a friend sent me a link this great ‘letter’ by Paul Chin ...
Windows (Sniff), I Used to Love You...
Dear Windows,
I'm sorry to do this with a letter but I don't think I can handle seeing you in person. We both know that things haven't been quite right between us these last couple of years. I've noticed that we've been drifting apart for a long time. I haven't spoken with anyone in your family -- Internet Explorer, Outlook, Office -- in ages and have been spending more and more time with Firefox, Thunderbird, and OpenOffice. I was hoping we could work out our differences, but we're beyond that. I hate to end things like this; I just don't think we're compatible anymore.
I thought if we took a trip to Vista we might ignite that spark in our relationship again -- you know, a new setting, a new beginning (remember how exciting it was when we first went from MS-DOS 6 to Windows 3.11?) Don't get me wrong, I really appreciate the effort you're making to win me over. Those scrolling 3-D application windows are really, really cool. You look absolutely fantastic and you're showing me a lot of glitz, but deep down, we still have the same old problems. We can't solve them with a simple makeover; this relationship needs to be more than skin deep.
I know that I'm not perfect, and I don't expect you to be perfect either; but I do expect you to be reliable. I want to be able to count on you and to trust you. It's been about five years since you promised me more security and reliability with your Microsoft Trustworthy Computing Initiative, but we're no more secure now than we were then. I also don't appreciate what you're doing when I'm not around ... Do you think I don't know that you're calling your mother with your Windows Genuine Advantage and talking about my PC behind my back? And when you were confronted by this you got defensive and kept denying that WGA is spyware. I'm sorry, if it looks like a chicken, walks like a chicken, and clucks like a chicken ... it's a chicken.
Who owns my computer anyway? You or me? I want you to stop changing things around without telling me. You're supposed to help me get my job done but you seem to be more concerned with licensing issues than security. I was hoping Vista would be a fresh start for us -- but it's ended up being the last straw. Instead of working things out, you just keep demanding more and more from me: graphics card upgrade, hi-def monitor, and all kinds of additional memory. I'm not made of money... Sorry, I just can't give you what you want.
There's no easy way to say this so I'm just going to come right out with it: I met someone else; her name is Mac OS X Tiger.
If it's any consolation this is not something I planned. A friend introduced me to her MacBook and one thing led to another. But this shouldn't come as a surprise to you. I've always been completely honest with you and never tried to hide our relationship. In fact, I even see now that you're trying to emulate her look and behavior; but you're showing me things that Tiger showed me over a year ago. Be true to yourself.
Tiger and I have so much in common and we're totally in synch. We work with, not against, each other. But you, Windows, you've never communicated with me -- and you're so temperamental. Some mornings you boot right up; others I have to try 2 or 3 times before you come on. I don't want to be mean but you're just too high maintenance for me. Every time we have a disagreement, you turn your cold blue screen at me and I'm left sitting there in silence waiting for you to cool down. I finally came to the realization that I've been keeping you around because I needed you, not because I wanted you -- that's not fair to either of us.
I don't hold any ill-will towards you, Windows. We've been together for a long time. You saw me through college, my first IT job, and now and my freelance career -- but it's time we both move on. Before I go, though, can I offer you some friendly advice? It's time you stop imposing yourself on others by sheer strength of market share and start listening -- I mean really listening. You can't win people over simply because there's no viable alternative for them. Perhaps if you spent more time with those who rely on you and less time with your lawyers (I know those Europeans are really on your case, but you brought it on yourself) we wouldn't be in this situation. If you realize this one day, maybe then we can start talking about "us" again.
Your friend always,
Paul
By Paul Chin, 26 February, 2007
Paul Chin (www.paulchinonline.com) is an IT consultant and a freelance writer. Previously, Paul worked as an intranet and content management specialist in the aerospace and competitive intelligence industries.
This article was first published on Intranet Journal.