Quick Look: java.util.stream Examples

Keith Shakib Java, Technology Snapshot, Tutorial Leave a Comment

Some of us take for granted the newer features in Java, but, being a software consultant, I get to be involved in projects that are sometimes constrained to older versions of Java. The features from Java 1.8 that I have enjoyed for a few years are brand new to others.

I wrote this blog as a primer for those who are just getting started using java.util.Stream classes, or for those who haven’t had a chance to take a look at them until now. The quick topics below represent just a sampling of some of the ways to be more productive using java stream classes. Rather than providing a tutorial on how the classes are used, I’ll attempt to explain by example.

January 16: Behavior-Driven Development Talk @ KC Java

Keyhole Software Community, Company News, Educational Event, Java Leave a Comment

The Keyhole Software team is excited to announce that we are sponsoring and speaking at the upcoming Kansas City Java User Group on Thursday, January 16th.

Keyhole’s Keith Shakib will lead the January meetup of the monthly educational user group with the topic of Behavior-Driven Development in Practice. Attendance is free and dinner will be provided by Keyhole.

Thursday, January 16, 2020
5:30 PM to 7:30 PM
YRC Worldwide – 10990 Roe Ave Overland Park, KS

Spring Batch Testing & Mocking Revisited with Spring Boot

Jonny Hackett Java, Spring, Spring Batch, Spring Boot, Technology Snapshot, Testing Leave a Comment

Several years ago, 2012 to be precise, I wrote an article on an approach to unit testing Spring Batch Jobs. My editors tell me that I still get new readers of the post every day, so it is time to revisit and update the approach to a more modern standard.

The approach used in the original post was purely testing the individual pieces containing any business logic. Back then, we didn’t have some of the mocking capabilities that we have today, so I went with an approach that made sense at the time.

However, there have been a few improvements in the past several years. One of those improvements has been the ability to Mock beans within a Spring Context. That’s where the @MockBean annotation comes to the rescue.

Building a Java Cloud Native Spring Microservice Application on Azure, Part 1

Zach Gardner Azure, Cloud, Java, Microservices, Technology Snapshot Leave a Comment

The big three cloud providers (AWS, Azure, and Google Cloud, in that order) have their various strengths and areas of expertise. Most large organizations though typically pick one cloud provider for their cloud computing needs. This works well if you’re a Java shop that’s on AWS, or a Microsoft shop on Azure. But what if you’re on a large Java project in an organization that wants to use Azure? You’re in luck.

Microsoft Azure has come a long way, and is very supportive of non-Microsoft technologies. The proof though is in the pudding. Which is where this blog post comes in. I take Josh Long’s Bootiful Microservice Services, a great starting point to get a cloud native Spring microservice application up and running, and show how it can be run on Azure.

This first blog post will be all about setting up our basic microservices by walking through the various parts of Josh’s example application, with some best practices and patterns that I’ve found to be effective. Rather than a simplistic ToDo application, we’ll be basing our application off of my favorite bagel shop in New York, Original Bagel Boss in Hicksville, to manage its orders, inventory, etc. If we can run a bagel shop on a Spring application running on Azure, and keep customers happy and full of carbohydrates, then it proves out for applications of a similar size and complexity.

We’ll be staying mostly inside the familiar Java confines, then slowly start working our way out to getting our application deployed to Azure. Then we’ll start introducing additional complexity like Spring Batch jobs, a React front end, etc. A setup this complex will show that Azure is ready for prime time when it comes to running applications in production, even if they are built on non-Microsoft technologies…

AWS SNS Push Notifications

Matt McCandless AWS, Cloud, Java, Problem Solving, Technology Snapshot Leave a Comment

Have you ever received endless notifications from the latest application you just downloaded? For example, a bank application that tells you your balance is less than $50. It is likely a message sent directly to your phone through Apple Push Notification Service, Firebase Cloud Messaging, or some other like service.

While you can use any of these services directly, there is a lot to gain by using something like AWS SNS to manage, send, and organize your notifications.

In this post, we show an example of the Push Notification feature of Amazon Simple Notification Service (SNS) using Firebase to handle the iOS and Android messages. Code examples are in Java using Eclipse.

Do note that this blog is solely focused on Push Notification feature of SNS. Keep in mind that SNS can be used for email and SMS messaging, but for brevity, we will steer clear of those.