Welcome

We are an IT consultancy specialising in high quality, high value, Agile & Test Driven Software Development, based on the Gold Coast in Queensland, Australia.

We have the experience and expertise to help you eliminate the ‘pain points’ in your business by applying the latest technologies and techniques. We are an established, productive software development team available for hire.

The first step is to work with you in understanding your business and industry and the day-to-day challenges you face. So please contact us via the menu above for a no obligation chat about what Refactor can do for you.

Steve Dalton's picture

Refactor now a Jetbrains Authorised Partner

We are proud to announce that Refactor is now a Jetbrains authorised partner. We've been using IntelliJ for so many years now (Rob even wrote quite a few plugins along the way), that we thought we might as well make it official. So, if you have any requirements for Jetbrains software, please contact us, we are happy to help.

We are particularly keen to hear from local South East Queensland companies that are already using the tools and might be interested in partnering with us on plugins for IntelliJ or any of the other products we resell (such as Atlassian Jira and Confluence).

Lee Butts's picture

Grails UI Performance Plugin - beware of uiperformance.html.compress

We use the excellent UI Performance plugin (thanks Burt!) to help optimise ShareYourLove.com and on the whole it does a great job.

One option that I have found has an undesirable side effect is uiperformance.html.compress.

This option enables the PJL Compressing Filter to compress the html content of the responses. Unfortunately this adds a Vary: Accept-Encoding header to every response, including images, javascript etc.

This header causes browsers (we especially noticed it with IE) to re-request all resources even when the have far-future expires headers (as added by the ui-performance plugin). This was causing slow page loads for users, especially those on slower/high latency connections. Even though our server would return 302: Not Modified in response to all these requests, the connection overhead (the site has a lot of CSS images) was still a significant performance hit.

By disabling the html compression option, the site caches much better and only the main content of each page (and any new resources not in the cache) is requested each page view. You would need to access whether the smaller download gains of html compression, outweigh the extra server requests for resources when configuring this option on your application.

I tracked this down with the help of Fiddler2 which is a proxy that analyses your browser requests and provides guidance on best practices to improve performance. There is a good page from the Fiddler explaining the Vary header here.

Steve Dalton's picture

Twitter Groovy scripts from Podcamp Gold Coast

I had the pleasure of doing a basic intro to Social Media APIs session at the Gold Coast Podcamp on Saturday 20th Feb. I tried to make it as basic as possible, but did include some Groovy code that interacted with the Twitter API. Anyway here's the code for anyone that's interested, for groovyists - it's not very idiomatic Groovy code, but I wanted to keep it pretty simple and not use any external libraries.

Follow another user's friends:

Unfollow all your friends

Follow all users that mention a hashtag (can be modified to do replies or mentions)

Lee Butts's picture

Grails, Shiro, IE8 and RememberMe

UPDATE: We're still having RememberMe issues under IE8 so there more to this bug than the solution posted here. I will update this when we get to the bottom of it.

I've recently been looking at a bug we had with IE8 and RememberMe cookies not persisting at ShareYourLove.com when users closed their browsers.

The crux of it was that Shiro was not explicitly setting a domain on the cookie which apparently is a no-no as far as IE8 is concerned.

The fix is to configure Shiro's SecurityManager via resources.groovy:

beans = {
    shiroSecurityManager(DefaultWebSecurityManager) {bean ->
        realms = [ref('JsecDbRealmWrapper')]
        //override remember me expiry to 30 days
        rememberMeCookieMaxAge = 60 * 60 * 24 * 30
        switch (Environment.current.name) {
            case 'beta':     
                rememberMeCookieDomain = '.beta.shareyourlove.com'
                break      
            case 'production':
                rememberMeCookieDomain = '.www.shareyourlove.com'
                break
            default:
                rememberMeCookieDomain = null
        }
    }
}

Steve Dalton's picture

Grails log4j configuration and custom environments

If like me, you have different appenders depending on the grails environment - you might not have realised that custom environments don't work with the log4j config DSL. So code like this doesn't work:

log4j = {
     appenders {
         development {
             rollingFile name: "mylog",
                     file: 'mylog.log', layout: pattern(conversionPattern: '%d{ISO
         }
         test {
             rollingFile name: "mylog",
                     file: 'mylog.log', layout: pattern(conversionPattern: '%d{ISO
         }
         beta {
             rollingFile name: "mylog",
                     file: '/tmp/mylog-beta.log',
                     layout: pattern(conversionPattern: '%d{ISO8601} [%t] %p %c
         }
         production {
            rollingFile name: "mylog",
                     file: '/tmp/mylog-beta.log',
                     layout: pattern(conversionPattern: '%d{ISO8601} [%t] %p %c
         }
    }

The beta environment won't be picked up and you will get some error in your logs about it for other environments. In any case the configuration doesn't look very DRY to me. Probably better to just have the filename into a separate config param in your Config.groovy, then just refer to it from a single appender

myapp.logLocation = 'mylog.log'

environments {
    production {
        myapp.logLocation = '/tmp/mylog.log'
    }
    beta {
        myapp.logLocation = '/tmp/mylog.log'
    }
}

log4j = {
    appenders {
            rollingFile name: "mylog",
                    file: myapp.logLocation, layout: pattern(conversionPattern: '%d{ISO8601} [%t] %p %c %x - %m%n')
    }

Still not completely very DRY, wish I could do something like

environments {
     production, beta {
         somesharedconfig = 'foo'
     }

Hopefully they'll come up with some way to do this nicely in future grails releases.

Steve Dalton's picture

Groovy around the Globe - Australia & New Zealand

This article is the first in a series that will examine the Groovy/Grails/Griffon community around the world - it first appeared in the November issue of GroovyMag.

We all love the technology, and this series will focus on the people that help to make technology great – colleagues from the farthest flung corners of the globe. This first article focuses on one of the the most remote regions: Australia & New Zealand.

A far-flung land

Tucked away in a oft-forgotten corner of the Southern Pacific are the sparsely-populated countries of Australia and New Zealand. Despite the relative isolation from the rest of the development community (and each other), there's been a long history of innovation and contribution to Open Source projects from the Aussie and Kiwi developers over the years.

Australia in particular is a very urban society: 82% of the citizens live primarily in the eight state and territorial capitals. However, the population of 22 million is spread over an area the size of Europe, which makes face-to-face meetings of the tech community a pretty rare thing. Despite the long and dusty distances separating the capitals, a great sense of community and collaboration prevails. New Zealand has an even smaller population (about two million) and the development community is even more thinly dispersed; however, there is also a surprising amount of activity coming from this remote land.

Conferences

Despite the geographic challenges, in the Open Source area there are two successful annual conferences in the region: Open Source Developers Conference (OSDC), and Linux Conference Australia (LCA).

Steve Dalton's picture

Grails set-proxy and authenticated proxy servers

Quick tip.

If your company uses an authenticating NTLM proxy server and your login includes your domain name, eg:

internal\joebloggs

The \ in the username will cause some trouble for "grails set-proxy". Once set this way you will then get

Error executing script SetProxy: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script1.groovy: 2: unexpected char: '\' @ line 2, column 66.

If you try and set it again (you'll have to remove the proxy script in your .grails directory to be able to set it again)

Simple solution - just make sure you use a \\ in the username and it will all work

internal\\joebloggs

Wasted a bit of time for me - so just wanted to share in case it helps others.

Steve Dalton's picture

IntelliJ Grails Plugin and importing existing Grails projects

Something has been really annoying me for last couple of weeks.

Whenever I import a grails project from existing sources into IntelliJ (8.1.4), even though I had installed the Grails facet correctly - the Grails project view features would not be visible (eg. easy switching between controllers and views etc). New Grails projects created in IDEA were fine - so my setup was good.

Anyway, after searching the forums and lists I could find a lot of people complaining about the IDEA Grails plugin but no solution to my problem.

I finally gave up and thought maybe I could make some sense of the Intellij .iml file. It wasn't as bad as I expected there is a line:

<module relativePaths="true" type="JAVA_MODULE" version="4">

I noticed that in the "created from scratch" version it was:

<module relativePaths="true" type="GRAILS_MODULE" version="4">

So - I changed it in my none-working projects - and Voila! it worked.

Hope this helps others and saves some time - I wasted a fair bit looking for a solution.

Steve Dalton's picture

Open Source Developers Conference - Day 1

Well it's that time of the year again, and one of the highlights of my year. Open Source Developers Conference Australia - this year just up the road in Brisbane.

The drive up from Gold Coast pretty slow. It's been a while since I drove up in peak hour. Train is much faster, but we needed the car to get the last few kms to Bardon.

The venue is right in the bush near Mt-Cootha.... nice spot. Bit far from the pubs and civilisation, but I am warming to it.

I set up an OSIA stand for the day - we didn't actually have a stand, but I put up some posters to give a bit of visibility. Gave away a lot of badges that CustomTees did for us - saw a few people wearing them or attached to their lanyards which was good. Everyone really liked my polo shirt I was wearing - so hopefully I am going to get some more made and give one to each member. Lots of people knew about OSIA, lot's didn't - a few people were very interesting in joining - and I have to live up to my promise of activity this year now! Watch this space.

The opening Keynote on Volunteers by Karen Pauley was really really interesting. I sat next to Paul O'Keeffe and had a lot to think about there in relation to Barcamp, Legion of Tech and the various groups we run. I found what she said about leaders so true - there are a lot of groups that rely on 1 person, if that person stops, then the group usually stops. We need to future-proof our groups so that they are sustainable... a lot of good things happening, but we need to keep them going.

Syndicate content