Java

No image

Android Fragment Lifecycle In Detail

There are numerous articles on the Internet that provide an overview of the Android Activity lifecycle, as well as the corresponding Fragment lifecycle. One thing that I have found lacking, however, is a detailed examination of the relationship between the two - in particular, exactly what events trigger what other events. Thus, I've set out to remedy that particular lack with this blog post.

Read More
No image

Embedded Jetty for Integration Testing

In a previous post, I mentioned using Jetty as part of testing a web application. The basic idea is that you can embed Jetty within your application (or at least within your test code), have your tests fire it up as required, and then perform “live” queries against your site. The purists would argue, of […]

Read More
No image

Maven and the Google Web Toolkit (GWT)

I admit that I was a bit slow to see the value of Maven. Perhaps I had too many years steeped in Unix and make, but ant felt comfortable and Maven did not, at least initially. Suffice it to say that I’m a convert, and now find myself disappointed when I can’t manage a project […]

Read More
No image

reCaptcha and Google Web Toolkit (GWT)

In designing web applications, CAPTCHA tests are sometimes necessary to help prevent Bad People from automating attacks on your site. reCAPTCHA, a free service offered by Google, is a popular CAPTCHA service. While reCAPTCHA provides “plugins” for many client technologies, Google Web Toolkit (GWT) isn’t one of them. Fortunately, it’s quite straightforward to integrate using […]

Read More
No image

Using Android AsyncTask to initialize a database

When it comes to keeping user interfaces “lively,” threads are our friends. But Threads are a real pain in the neck. Such is the life of a programmer. It’s important that we design applications so that the user interface stays alive. Not only does this improve our user’s experience with our apps, but it keeps […]

Read More
No image

Themes for the Android ActionBar – Drop-downs

In the previous post, we dealt with theming tabs in the Android ActionBar. The ActionBar provides an alternate type of navigation – a drop-down list. You can specifically request this via: or you can sometimes unexpectedly find yourself in this situation if you try to create a lot of tabs, since Android may choose to […]

Read More
No image

Themes for the Android ActionBar – Tabs

Since Android 3.0 (a.k.a. “Honeycomb”) the ActionBar has been the workhorse of “standard” Android user interfaces. The nice folks over at ActionBarSherlock.com have also created a set of classes and resources that allow you to build ActionBar-based UI’s all the way back to Android 2.0 (“Eclair”). Unfortunately, customizing the look of the ActionBar is not, […]

Read More
No image

A Retry Framework for JPA

Databases are sometimes the bane of developer’s lives. Aside from all the fun of managing objects, queries, etc., databases are notorious for occasionally (and non-repeatably) hitting your application with an exception. All sorts of things can cause this: Your connection to the database may be momentarily interrupted. Even “high availability” approaches aren’t proof against this […]

Read More
No image

Custom Messages in Spring Validation

I always love it when I can use other people’s work. (Legally, of course.) Such is the case with JSR-303 validations, the reference implementation for which is Hibernate Validator. When combined with Spring’s conversion services, this makes for a lot less work in validating input in web applications.

Read More