I have no special talent. I'm only passionately curios - Albert Einstein
February 15, 2010
Acegi Security Plugin for Grails
Posted by Dave Malone
in Grails,
Java,
Configuration,
Technology
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
February 10, 2010
Apache CXF on WAS 7.0
Posted by Dave Malone
in Bug,
Spring,
Java,
Configuration,
Technology
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
February 02, 2010
Developing jsonp Services for jQuery
Posted by Dave Malone
in Javascript,
Java,
Technology
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
November 16, 2009
Unit Testing
Posted by Dave Malone
in Java,
Best Practices
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
November 06, 2009
Tools of the Trade
Posted by Dave Malone
in Java,
Technology
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
November 03, 2009
Automate your Twitter Feed in Java
Posted by Dave Malone
in Spring,
Java
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
July 28, 2009
Creating Wireframes
Posted by Dave Malone
in Technology
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
July 14, 2009
Ant: Setting Your JVM Memory Options (-Xms -Xmx, etc.)
Posted by Dave Malone
in Java,
Configuration,
Technology
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