Creating mobile web applications with jQuery mobile and Grails

Creating mobile web applications with jQuery mobile and Grails

The blogger demonstrates how easy it is to integrate the new jquery mobile library with Grails and easily create mobile views in scaffolding.

I wasn’t familiar with the grails install-templates command before which allows you to customise the scaffolding that gets generated.  Pretty neat.

Bookmark and Share
Posted in Grails | Leave a comment

mod_pagespeed

There is a new mod from Google for Apache servers called mod_pagespeed that removes redundant HTML before sending it to the client.  Very neat idea.  Makes me shed a tear I am wanting to move our legacy php into a Glassfish appserver so I cant take advantage of this, but still would be useful in future.

Optimization Made Easy with mod_pagespeed.

Bookmark and Share
Posted in Hosting, Platforms, Web Applications | Leave a comment

Rick Wagner’s Blog: How to find which .jar a class is in (easily)

Holy heck, I needed this earlier today

Rick Wagner’s Blog: How to find which .jar a class is in (easily).

Makes mention of JBoss’ tattletale utility.

The comments also mention the Java Class Finder plugin for Eclipse (I used the CTRL+SHIFT+T today personally which did the same job)

There is also LibraryFinder plugin for IntelliJ and classjarsearch command line tool to search a directory of Jars for a class.

Bookmark and Share
Posted in Java, Outrospective.org | Leave a comment

Glassfish V3.0.1 and Update Tool

When installing plugins for glassfish at work I would receive a Premature EOF just after accepting the license terms for the plugin. This would occur regardless of method used, updatetool cli, gui or web.
Strangely it worked at home, but for me and my colleagues at work, we couldnt get through. I suspect some network issue on our end but didnt need to delve too deep as I found a workaround.

The simple thing to do is to install the latest version of the pkg command. I used pkg-2.3.2 from updatecenter (http://wikis.sun.com/display/IpsBestPractices/Downloads) site.

After extracting the archive, I ran this at a command prompt (in its bin directory)
C:\DevEnv\pkg-2.3.2\bin>pkg install updatetool

The download is strangely very slow and it timed out about three times before I could install update tool. Thankfully running the same command again resumes from where it left off.

C:\DevEnv\pkg-2.3.2\bin>pkg install updatetool
DOWNLOAD PKGS FILES XFER (MB)
wxpython2.8-minimal 1/2 915/929 7.5/7.9

Errors were encountered while attempting to retrieve package or file data for
the requested operation.
Details follow:

1: Framework error: code: 18 reason: transfer closed with 2028 bytes remaining t
o read
URL: ‘http://pkg.sun.com/layered/collection/dev’. (happened 4 times)
2: Framework error: code: 18 reason: transfer closed with 1901 bytes remaining t
o read
URL: ‘http://pkg.sun.com/layered/collection/dev’. (happened 4 times)

C:\DevEnv\pkg-2.3.2\bin>pkg install updatetool
DOWNLOAD PKGS FILES XFER (MB)
Completed 2/2 929/929 7.9/7.9

PHASE ACTIONS
Install Phase 1092/1092
PHASE ITEMS
Reading Existing Index 8/8
Indexing Packages 2/2

You then can simply run updatetool from the command prompt to kick off the GUI app. Downloading plugins via here was slow and timed out also, but it found my local Glassfish install and worked to install plugins to it as I needed.

Bookmark and Share
Posted in Java EE, Outrospective.org | Tagged , | Leave a comment

Java EE, Spring, and why I care

Finally a post that seems to be sticking up for the Spring framework. (nice change)

Java EE, Spring, and why I care « techscouting through the news.

Sure EJB 3.1 does make things easier, but it has taken a lot of time to catchup to where Spring was.  And as the blogger points out, as new versions of the technologies that JEE use like JPA come out, how long will it take for JEE to implement these.

Also, one thing that does bother me with all the ‘my JEE is better than your Spring’ articles is, and the blogger alludes to here, is that they compare annotations in EJB to Springs old XML config which just like EJB is seldom needed these days.  This is a little unfair.

As for myself, I’m technology agnositic, but easily develop biases based on the path of least resistance factoring in long sightedness too.  Like many, if a tool does what I want and is scalable, I’m going to use it.  I think both approaches are fine but they aren’t necessarily compatible.  Unfortunately we aren’t unified yet although the standards are in place to get it to work (eg Spring components <-> JEE components).  Getting a Grails app to talk locally to EJB components hasn’t been easy as I learnt last week primarily due to having the app log to the right place in a container its not used to, and thats just at the container level, but thats another post.

Bookmark and Share
Posted in Java EE, Spring | Leave a comment

Serialization under the magnifying glass

The Java serialization algorithm revealed | JavaWorld’s Daily Brew.

A good post about what happens when Java takes your class and serializes it, including its fields, parents and collaborators and the class definitions of the object and the parents and collaborators involved.

Bookmark and Share
Posted in Java, Outrospective.org | Leave a comment

The Seven Wastes of Software Development | Agile Zone

Bookmark and Share
Posted in Development Practice | Leave a comment

Deploying grails 1.3.x war to glassfish

This was a recent bug bear which may be a regression from 1.2.x line

When you deploy to Glassfish you get an error message

An error has occurred
There is no installed container capable of handling this application com.sun.enterprise.deploy.shared.FileArchive@1e46947

The fix is to include in BuildConfig.groovy

grails.project.war.osgi.headers=false

Maven users can also set the property when running the grails war artificat.

mvn clean grails:war -Dgrails.project.war.osgi.headers=false

via Grails – grails 1.2.2 and glassfish.

Bookmark and Share
Posted in Outrospective.org | Leave a comment

The interruptible programmer

A read a good blog post about learning to work interrupted.  Work 2.0 – the interruptible programmer.  The blogger had to learn to switch from a conventional, anti-interruption, get in ‘the mode’ then stay there for as many hours as possible, to a take frequent breaks mode due to health problems.   It was interesting since the majority of my career I’ve been exposed to the frequent interruptions style of working and have been aspiring for the non-interruptions style in order to improve throughput.

At my old job, I used to handle a plethora of queries.  Support phone calls would come through distracting me from programming.  I also used to keep my ears open for conversations about areas of the software or business I knew about so as to be able to help my colleagues avoid taking a wrong, time-consuming path as they were scoping out ideas for solutions to business / technical problems.  These too were distractions that I had to learn to shut out.

At my new job, there are still distractions but an order of magnitude less than what my old job was.  No phone on my desk, or MSN chat allowed means that the only real distractions are from my boss, some seldom queries from a fellow dev or product manager, and then emergency support queries from the business when all the other developers are away that are even more seldom.

Adjusting to this new way has been a little harder than I initially thought.  I was used to being interrupted.  The benefit of being interrupted often was that I wouldn’t get ‘locked on’ to a problem. If I was stuck, something would happen by chance to distract me so that when I came back I had pondered a way forward in the background.  It was so run of the mill that I didn’t realise how much it became part of my daily routine.

At my new job, I found I’d get stuck on a problem and then keep pondering and pondering on it without a way forward thanks to the seemingly productive ‘one thing at a time’ mentality. When faced with a hard problem, I had to learn to deliberately leave a problem be for a little while and re-employ the task switching skills I’d learnt at my previous job. Here is a crazy analogy: Work is not a sausage that you can split in half and then continue eating the other half later.  Some parts of eating the sausage wear you out, and you need to cut up into smaller chunks so you can chew through it.

The blogger however reminds me of my current boss, who I must say is exceptional at task switching in the face of constant business and colleague distractions (or at least able to do frequent task switching without complaining about loosing context).  It was good to have a working example to think about whilst reading the blog.  It seems that the best tricks to employ are, to one, not get upset that you are being distracted, and two, keep some context of what you are doing, so that when you switch you have something you’ve written down to come back to.  The blog post makes mention of GTD as well which is good to see.

Bookmark and Share
Posted in Development Practice, Time Management | Tagged , , | Leave a comment

Google’s guava java: the easy parts

More Guava goodness

dzone.com – Google’s guava java: the easy parts.

Bookmark and Share
Posted in Java | Leave a comment