JDK 12 – JEP 325 Switch Expressions

JDK 12 went GA on March 19, 2019, keeping its word on shorter release cycles and frequent releases. The features part of the release can be found here. One of the interesting features for the developers is the “JEP 325 Switch Expressions” which is available as a preview feature. A preview feature as defined here … Read more

How to create a QR Code SVG using Zxing and JFreeSVG in Java?

In this article, we will look at how to use the Zxing QR code generation library and JFreeSVG library to create a QR Code SVG image in Java. QR Code Generation The below code creates a java.awt.image.BufferedImage object representing QR Code using Zxing library: public static BufferedImage getQRCode(String targetUrl, int width, int height) { try … Read more

Working with LocalDate, LocalTime and LocalDateTime

Java 8 had a major change for the date and time APIs, which was the inclusion of Joda Time APIs into JDK under the JSR 310: Date and Time API. This JSR was lead by Stephen Colebourne, the creator of Joda Time. There are many amazing APIs to work with date and time. In this … Read more

Launch Single-File Source-Code Programs in JDK 11

JEP 330 – Launch Single-File Source-Code Programs is one of the exciting features in the upcoming JDK 11(18.9) release. This feature allows executing your java source code directly using the java interpreter. The source code is compiled in memory and then executed by the interpreter. The limitation is that all the classes have to be … Read more

API Updates in Java SE 11 (18.9)

Java SE 11, which is also named as 18.9 (based on the new naming scheme which uses the year and month of release), is slated to be GA during the last week of September. The new approach for releasing new JDK version frequently is allowing the language creators to introduce new features, API updates more … Read more

Java 10 – JEP 286: Local-Variable Type Inference

Java 10 is around the corner with RC Build available here. The features targetted for this release can be found here. Of all the JEPs targetted for Java 10, the interesting and most talked about by the developer community is the 286: Local-Variable Type Inference. What is Local Variable Type Inference? We saw in Java … Read more

Sample Logback Configuration for Spring Boot Profile Based Logging

We would want different logging configurations for different profiles in Spring Boot, like in local running we would just want console logging and for production, we would want file logging with support for rolling the log files daily. I came up with a sample logback configuration which I use in all my applications. Create a … Read more

Creating Bootpag Like Pagination Component Using Vuejs

Introduction In this article, I will try to create a pagination Vuejs component similar to the one supported by jQuery Bootpag plugin. Component State The component should track the following: Current Page Callback to be executed page click Max visible page numbers Start and end of the range of page numbers visible Component Event Handlers … Read more

Creating Simple Component in Vuejs

Introduction In this article, we will look at creating a very simple component in Vuejs. Let me pick the example from my previous post and create a component for showing the loading message. Vuejs Component There are two ways to create Vuejs component Single file component (.vue file) – this contains the component HTML template, … Read more

Moving From Mustache.js and jQuery to Vuejs for Client Side View Management Reactively

Introduction A month ago I wrote a post on using Mustache.js for client-side templating. I am pretty excited about the way we use Mustache.js, jQuery Ajax Client to build views. Its simple and does the work for us. But? it’s not reactive!, we manage a lot of DOM manipulation which can often lead to a … Read more