I have no special talent. I'm only passionately curios - Albert Einstein
Acegi Security Plugin for Grails Comment on Acegi Security Plugin for Grails 0

I've been attempting to develop an application using Grails 1.2.1, and the Acegi Security plugin for Grails v. 0.5.2 (also known as the Spring Security Plugin).  Grails is still young, and so is it's group of plugins, so there are a lot of configurations that are flawed.  This article outlines how to get up and running with Grails and the Acegi Security plugin v. 0.5.2, including how to get the JavaMail configurations working for use with Gmail

  Continue Reading

Apache CXF on WAS 7.0 Comment on Apache CXF on WAS 7.0 0

Apache CXF is an agile, open source web services framework that integrates out of the box with the Spring framework. This framework utilizes JAXB, and the new JAX-WS APIs, and does not require developers to use any proprietary APIs or annotations. CXF provides multiple transports - you can write a single service, and reuse it as a SOAP based web service, or a RESTful web service. The project, at the time of this writing, is very active, with new versions being released on a regular basis.

  Continue Reading

Developing jsonp Services for jQuery Comment on Developing jsonp Services for jQuery 0

The documentation for successfully developing jsonp services for use with jQuery is not very straightforward.  The examples consist of a number of ajax calls using jQuery's .ajax and .getJSON functions, but until recently did not contain any examples of performing remote calls to jsonp services.  If you read the documentation for using the jsonp dataType with their ajax function, you will see a link to an article by Bob Ippolito outlining the first proposed jsonp format, and how to use it.  The format documented on Bob's article is not valid when used with jQuery's functions (jQuery doesn't error out, it just doesn't do anything at all).  Their most recent example of using the new Flickr jsonp API sheds light on the format that jQuery really expects for json returned by remote jsonp services.

  Continue Reading

Unit Testing Comment on Unit Testing 0

Unit testing not only ensures that application code runs the way the developer intends it to, but can also provide a sort of guide for other developers. Unit testing helps to make an application more robust - running existing unit tests assists in revealing impacts changes may have on an application, assuring against defects. Any applications that don't have unit tests are considered Legacy Applications, and are usually more expensive to change, and have experienced more defects, adding into the break/fix cycle in production deployments. I prefer to implement unit tests using JUnit, since there is plenty of extensions and frameworks that support writing and running JUnit tests. EasyMock is a JUnit library that allows developers to unit test code which contains many dependancies, and provides a means to focus on actual unit tests instead of functional or integration testing. An excellent Unit test code coverage tool exists as a plugin for Eclipse, EclEmma, which provides package level, class level, and line by line statistics of unit test coverage in Java classes. The Spring Framework provides many utilities to unit test Spring configured code as well. Here are some example unit tests

  Continue Reading

Tools of the Trade Comment on Tools of the Trade 0

When you begin your journey as a developer, either fresh out of college, or as an individual experimenting with technology, you'll soon discover a plethura of tools available to assist you in your development.  I've encountered a lot of tools in my few short years of experience, but few remain in my arsenal today.  Those few have proven to be the best, with the most available features, active open source communities, and fewest bugs.

  Continue Reading

Character Encodings: Get rid of the question marks Comment on Character Encodings: Get rid of the question marks 0

Have you ever been to a web site and seen question marks where you would expect to see a single or double quote (even other characters)?  Have you had to deal with the problem yourself?  It was very frustrating for me to resolve this problem.  After a lot of research, and configuration changes, I finally have it pinned down.

  Continue Reading

Automate your Twitter Feed in Java Comment on Automate your Twitter Feed in Java 4

  I set out to automate the Twitter feed for the social networking site I developed, MyBuckStory.com.  The site is written in Java, and I wanted to continue using bit.ly to shorten my URLs, and the custom format I had come up with to use as a Twitter status update for new stories posted on the site.

  I was pleasantly surprised to find an open source library out there already, called Twitter4J.  The library was quick and simple to get myself up and running.  The closest thing I could find for a Java library for bit.ly was a JSP tag library.  I wanted to be able to run this in the service layer of my application, so I began developing my own custom solution.

  Continue Reading

Creating Wireframes Comment on Creating Wireframes 0

Wireframes are an effective way to communicate intended design to your business stakeholders.  They are invaluable because they allow your users to decide if the application will be useful and usable in the way they need it to be, without developing the entire application.  Developers love this because it helps to avoid scope creep, and it helps to produce an application even the most insatiable users will enjoy.

As a developer, I try to throw design concerns over the wall to a UI or usability specialist.  I often find myself needing to prepare a quick set of screen mockups or wireframes anyways by drawing one up on a piece of paper or a whiteboard.  I haven't convinced myself to use any of the software that's available to me because of price, or because of the lack of usability (yes, wireframe software can lack even common sense usability).

I've recently evaluated a few different wireframe technologies, including the Pencil plugin for Firefox, Axure RP Pro, and WireframeSketcher.

  Continue Reading

Ant: Setting Your JVM Memory Options (-Xms -Xmx, etc.) Comment on Ant:  Setting Your JVM Memory Options (-Xms -Xmx, etc.) 0

Ant provides an option to allow you to set your default JVM memory options globally.  On Windows, you must create a bat file titled antrc_pre.bat under your %USERPROFILE% directory.  Ant will read in this file to set the ANT_OPTS values before executing your build file.  Here is the contents of my antrc_pre.bat:

 

set ANT_OPTS=-Xms512m -Xmx1024m


For your reading pleasure... Comment on For your reading pleasure... 0

  A collegue of mine reccomended that I read the book Clean Code: A Handbook of Agile Software Craftsmanship, by Robert C. Martin.  I opened the book, and was immediately pleased with the introduction provided:

WTFs/minute

  Continue Reading

javascript functions in anchor tags: RETURN FALSE!!! Comment on javascript functions in anchor tags:  RETURN FALSE!!! 0

This is more of a rant than anything.  Have you ever been on a website, scrolled down to the middle of the page, and found a little slideshow control or some other anchor tag which is really controlled via the onclick method?  Have you ever clicked it, and seen that you're now located at the top of the page again?  How annoying is that!

  Continue Reading

About

David Malone is a Java developer residing in the Twin Cities area.  He has been developing enterprise applications since 2004.  This is his personal blog, as well as his design and development workspace.