About the Author
Rik Scarborough

Rik Scarborough

Twitter

Rik Scarborough is a Kansas City-based software developer on the Keyhole Software team. He specializes in Enterprise Application Development using Java, Web Application Development, Spring Batch, Google's Appengine, Google Web Toolkit (GWT), and Groovy. Also, a student of conversational American Sign Language.

Java-Based UI Frameworks

Rik Scarborough Java, Programming 1 Comment

In today’s development environment, there is an abundance of frameworks that we can choose from for front-end or user interface (UI) work.

I was recently talking with a friend about UI development. He has also been a programmer since programming was considered an arcane art (when those of us that did it were considered like Gandalf the Grey facing the Balrog). Or maybe we just saw ourselves that way. Regardless, both of us have been Java programmers for a great deal of that time.

We both lamented the fact that it was a context switch to go from coding most of our projects in Java, then needing to switch to JavaScript for the front end.

Based on conversations I’ve seen online, several readers are warming up their keyboards to chide me for complaining about having to code in JavaScript. Keep your keys cool, both of us and our co-workers are experienced in, and happy to write in, JavaScript and any of its frameworks for our clients. But using JavaScript isn’t always the best approach.

 In this post, we introduce two frameworks that allow you to code your user interface in Java: GWT & Vaadin…

Hello Micronaut

Rik Scarborough Java, Microservices, Testing Leave a Comment

From some of my previous posts, you can get the idea that I promote the idea of developing maintainable code rapidly. So I was pretty excited when I learned that the same group that was responsible for Grails was working on a similar project for Web Services. Hello, Micronaut.

In this post, I provide an introduction to the Micronaut framework and its features to provide a foundation for you to try it out yourself.

Reading and Writing from Excel in Spring Batch

Rik Scarborough Java, Spring, Spring Batch, Technology Snapshot, Tutorial Leave a Comment

We have discussed many different ways to read and write data in Spring Batch. The framework comes with quite an assortment of Readers and Writers that can be used directly or reused in some manner. Most of the time, the requirements consist of reading the data from some type of text file or database.

So what happens when the business we are supporting asks for something out of the ordinary, such as reading an Excel file and outputting the data to another Excel file? Typically the off-the-cuff response would be, “can you convert it to a CSV or other delimited text file?” Or “You know, Excel will read a CSV file just fine.” Sometimes that works, and sometimes the business requirements do not allow that type of flexibility.

Consider this scenario; in these days of Cloud and other online computing, the input file is likely created by a server that the company has no direct access to as far as programming. The file it creates is in one format, Excel. The output of your process has to go before several executives or other business clients and needs to be formatted in a professional looking manner. Adding a manual process to import a CSV and format it diminishes the value of using Spring Batch.

For the sake of the honor of the coding profession, you agree to the requirement to read and write from an Excel file directly. Now, how do you do that?…

Encrypting Working Files Locally in Spring Batch

Rik Scarborough Java, Spring, Spring Batch, Technology Snapshot Leave a Comment

It seems that quite often we read stories in the news about computer systems being cracked and data being compromised. It’s a growing concern that should be a consideration for everyone in Information Technology. There is probably not just one solution that will keep all data safe, but hopefully small efforts in many areas will provide us with the best possible solution.

In this post, I show a solution for encrypting sensitive files for local use with Java’s Encryption library & tying directly into Spring Batch readers and writers.

The Scenario
Recently we began writing a Spring Batch application that would handle sensitive data. The application servers were set up with some very good, basic security, but we felt the data could use some extra protection.

The data would be delivered to the company on a well-protected and secure FTP server. Mark Fricke did an excellent post recently on Spring Integration and Spring Batch in which he discusses downloading an encrypted file from a FTP server and decrypting it. Unfortunately, this was not exactly the problem we had. We needed to download a unencrypted file, but never write it to the Application Server unencrypted. But, we needed to be able to read that file and process it in Spring Batch.

Using Java’s built-in cryptography, we are able to extend Spring Batch to encrypt the file on the disk and then read that file in a Spring Batch Reader. In addition, we can write the results out as an encrypted file then transfer that file back to the secure FTP server as clean text.

Wow, that sounds like a lot and will be a really complex solution. Actually the code turned out to not be all that complex. This solution relies partly on the Delegate Pattern I wrote about before, so I will be using the same code I developed for that and just showing the changes here. Please refer back to the original post…

Introducing The Delegate Pattern

Rik Scarborough Java, Spring Batch Leave a Comment

Delegate: a person who is chosen or elected to vote or act for others – Merriam-Webster. Delegate pattern: In software engineering, the delegation pattern is a design pattern in object-oriented programming where an object, instead of performing one of its stated tasks, delegates that task to an associated helper object – Wikipedia. Make things as simple as possible, but not simpler – Albert …