Home Contact Blog
612-605-9740 info@refactr.com
The Process The Work Our Team Our Community

More Grails Filter Tricks: JSONify Controller Actions

Post by Josh Reed

Oct
16
2012

Building on the previous post, we can use the same filter tricks to clean up some other controller smells. When building REST APIs, it’s a common requirement to output your data in JSON and/or XML. This is usually accomplished using Content Negotiation and the withFormat method:
Continue reading →

Posted in Software Development | Tagged filter, grails, json | 9 Comments

iOS tips: @synchronized

Post by Steve Vlaminck

Oct
12
2012

If you’re just getting started with threading in Objective-C, it won’t be long before you’ll need to make some thread-safe modifications to objects. One of the many useful tools that Objective-C gives us is the @synchronized directive. From the documentation:

The @synchronized directive is a convenient way to create mutex locks on the fly in Objective-C code. The @synchronized directive does what any other mutex lock would do—it prevents different threads from acquiring the same lock at the same time.

Using @synchronized is super easy

@synchronized(key) {
// thread-safe code goes here
}

Continue reading →

Posted in Software Development | Tagged iOS, iPad, iPhone, synchronized, thread, tips | 3 Comments

Grails Filter Tricks: Ajaxify Controller Actions

Post by Josh Reed

Oct
5
2012

A common requirement in the last couple of projects I worked on was the ability to create and edit domain classes via modal dialogs instead of Grail’s standard scaffolded pages. Originally I started down the path of embedding hidden forms in page and displaying them as needed. This quickly proved cumbersome on pages with many editable objects. I then hit upon the idea of fetching the forms via AJAX and displaying them in the modal dialogs. This worked pretty well but meant that I had to update some of my controller actions, typically ‘create‘ and ‘edit‘, to be aware of AJAX requests so they would only render the appropriate form instead of the whole page. The updates were relatively minor, usually as simple as adding a check of request.xhr and rendering a template:
Continue reading →

Posted in Software Development | Tagged filters, grails | 4 Comments

It’s not about automation, its about elimination

Post by Matt Bjornson

Oct
4
2012

Yesterday, after finishing up a meeting at a coffee shop, I happened to overhear two people talking about IT automation. I wasn’t eavesdropping, one of the men was so adamant in his “they don’t get automation” tirade, I am sure half of the people in the coffee shop did as well.

“Sorry *you* don’t get it, it’s about elimination, not automation”, is what I wanted to say. I didn’t. Don’t get me wrong, where appropriate, automation is a good thing, but it begs a *bigger* question: why? This is a good time to pull out the “5 Whys” from our Lean toolkit, which originated with the Toyota Production System. It’s *really* simple, just ask ‘why?’ five times.

The 5 Why’s is a simple, but not easy, tool to use to get to a root cause. You start by asking “why are we doing x”, wait for a response, to which you respond with a “why?”, followed by a response. This iterates for three more cycles of “why?” followed by responses – you know, like a 5-year-old.

What is the first “why” we should be asking? If you said “why are we automating?”, you’d be wrong. The correct answer is…..

“Why are we doing this at all, is this a value add activity?”

Value add means – is the customer willing to pay for this? It’s time to be brutally honest here, and it’s especially difficult for Corporate America’s IT organizations to answer. They are far too separated from the customer. I would venture the response to this question is something along the lines of “this is how we do that” or “it says in our process document”.

“Why?”

At this point, we start to get into institutional disfunction, and culture problems (which often manifest themselves as technical debt). This process needs to be honest, candid, and without political motivation. Tough to do in Corporate America, but many companies have implemented Lean, why shouldn’t IT be the same?

You’ve got 3 more “whys” to ask… If, at the end of each of these 5 whys, you don’t receive responses that indicate there are good reasons to be performing an activity, you shouldn’t be doing it. Activities that aren’t value-added should be eliminated.

What does this typically say about IT Operations? What activities in your development team and process are value-added?

Even in startup companies, what features of your product are value-add? The highest value-added should really be what your MVP is about. The lowest, don’t do them.

Eliminate where possible, automate if you can’t eliminate.

Posted in Agile Processes, Business | Tagged Corporate America | 3 Comments

iOS tips: Custom Fonts

Post by Steve Vlaminck

Sep
19
2012

My good friend google told me that using a custom font in iOS is “easy”. And for the most part it is, but I got tripped up in a few places. I happen to have Apples Keychain example code lying around so I’ll be using that in this example. I am also using Xcode 4.5 and focusing on iOS 5.1, and iOS 6.

Adding the font to your project

Drag the .ttf file to your project.

Continue reading →

Posted in Agile Processes, Software Development | Tagged fonts, iOS, iPad, iPhone, objective-c, Xcode | 15 Comments

Welcome Scott Atkins!

Post by Matt Bjornson

Sep
17
2012

We’re excited to welcome Scott Atkins to the team! He’s joining us from Garmin where he has been developing mobile products for iOS, Android and Windows Mobile.

Scott will be jumping into a project that we’re very excited about: SmartThings. He’ll be working on the mobile clients of SmartThings. Scott is particularly proud of his work developing Garmin’s Pilot for iOS product. He also enjoyed development of the Android app, MyCast, which he worked on for the past 3 years.

Welcome Scott!

Posted in Business | Tagged growth, new hires | Leave a comment

Grails Tip: Deploy to the Cloud with AppFog

Post by Matt Nohr

Aug
28
2012

AppFog LogoAppFog (appfog.com, @appfog) is a relatively new cloud platform that lets you deploy your applications to one of a number of different cloud providers like HP Openstack, Rackspace, and Amazon Web Services. It supports a number of languages and databases,  but I’ll be focusing on Grails.

The real interesting part to me is that there is a free plan you can use to test your applications. The free plan currently includes unlimited number of applications, as long as you only use 2 GB of RAM. There is a 50 GB data transfer limit, and a 1 GB database limit. If the free plan is not quite enough, they have paid plans starting at $100/month.

AppFog and Grails

If you have a Grails application that you want to deploy to AppFog, it can be a little confusing the first time, but once you go through the process once, following these steps, it should be fairly straight-forward.
Continue reading →

Posted in Software Development | Tagged cloud computing, grails, hosting | 6 Comments

Creating a Flipping Tile Transition in Motion 5 for Final Cut Pro X

Post by Hiromi Matsumoto

Aug
21
2012

One of our clients wanted a transition for a marketing video that mimics the tile animation in their mobile app. There are a few options to accomplish this. FCPx ships with a few similar transitions like “Mosaic”, but they don’t offer granular control over the grid configuration, or the direction of the animation. There are also paid third party plugins, but they don’t seem to have been updated to work within FCPx. So here’s one possible 10 minute solution:

Continue reading →

Posted in Design, Video | 1 Comment

Reserved Words as Grails Domain Objects

Post by Matt Nohr

Aug
14
2012

I recently ran into a SQL exception creating a simple domain class called “Group” that looked like this:

class Group {
    static constratints = {}
}

When I ran my application I got this not-exactly-helpful error:

| Compiling 1 source files....
| Running Grails application
| Error 2012-08-14 09:30:01,325 [pool-5-thread-1] ERROR hbm2ddl.SchemaExport - Unsuccessful: create table group (id bigint generated by default as identity, version bigint not null, primary key (id))
| Error 2012-08-14 09:30:01,325 [pool-5-thread-1] ERROR hbm2ddl.SchemaExport - Syntax error in SQL statement "CREATE TABLE GROUP[*] (ID BIGINT GENERATED BY DEFAULT AS IDENTITY, VERSION BIGINT NOT NULL, PRIMARY KEY (ID)) "; expected "identifier"; SQL statement:
create table group (id bigint generated by default as identity, version bigint not null, primary key (id)) [42001-164]
| Server running. Browse to http://localhost:8080/test

Continue reading →

Posted in Software Development | Tagged domain classes, grails, H2, persistence | 3 Comments

GR8Conf Overview

Post by Matt Nohr

Aug
3
2012

This week was the United States GR8Conf, and we were lucky enough to have it right here in Minneapolis. GR8Conf is a conference focusing on Groovy and Grails and is held in the US, Europe, and Australia. Refactr was one of the sponsors this year as well.
Continue reading →

Posted in Agile Processes, Software Development | Tagged gr8conf, grails, groovy | Leave a comment
← Older posts
At refactr we believe in the value of connection, the utility of agile processes, and the power of great ideas. We are creating the next generation of software for people who expect more from their web applications.
Subscribe to the re:think blog
Follow Refactr on Twitter!
    • Archives

      • October 2012
      • September 2012
      • August 2012
      • July 2012
      • June 2012
      • May 2012
      • April 2012
      • March 2012
      • February 2012
      • January 2012
      • October 2011
      • August 2011
      • July 2011
      • June 2011
      • April 2011
      • March 2011
      • December 2010
      • November 2010
      • October 2010
      • September 2010
      • August 2010
      • June 2010
      • January 2010
      • December 2009
      • November 2009
      • October 2009
      • September 2009
      • August 2009
      • June 2009
      • May 2009
      • April 2009
      • March 2009
      • February 2009
      • January 2009
      • December 2008
      • November 2008
      • October 2008
      • September 2008
      • August 2008
      • July 2008
      • June 2008
      • May 2008
      • April 2008
      • March 2008
      • February 2008
      • January 2008
      • November 2007
      • October 2007
      • September 2007
      • August 2007
      • July 2007
      • June 2007
      • May 2007
      • April 2007
      • March 2007
      • February 2007
      • January 2007
      • December 2006
      • November 2006
      • October 2006
      • September 2006
      • August 2006
      • July 2006
      • June 2006