Proxy Design Pattern in Java

In the video below, we take a closer look at the Proxy Design Pattern in Java. This video tutorial includes an introduction, real-time examples, a class/sequence diagram, and implementation. Let's get started!

6 Best Java Podcasts to Check Out

Want to learn more about coding with Java? Whether you're brand new to coding, or you're looking to improve the skills you already have, there are plenty of different options. How do you know which one you should pick? Here are some of the best podcasts out there right now, which can teach you a lot.

Coding 101

This podcast is no longer being made, but there's still an impressive back catalog of episodes to check out. They all hold up too, so it's something that's worth binging through. Hosted by Lou Maresca and Father Robert Ballecer, a Catholic priest, it's a podcast that's a little different from the norm.

Mediator Design Pattern in Java [Video]

In the video below, we take a closer look at the mediator design pattern in Java. Including an introduction, real-time examples, class diagram, and implementation, this tutorial will help you dive into the topic. Let's get started!

A Spring Boot Developer’s Guide To Micronaut

This is a guide for Spring application developers who want to get started with using Micronaut. With this guide, you will get enough information to work with the Micronaut framework.

Introduction

Micronaut is a framework, which has gained its name for faster startup time and is usually preferred for solutions with AWS Lambda. It uses Ahead Of Time (AOT) Compilation to determine what the application needs. The result of this is an application that has a smaller memory footprint, fast start-up time, and is reflection-free.

How to Get and Set a Sitemap URL in Java

Sitemaps allow a webmaster to provide search engines with a list of URLs on a website that are available for crawling; this can be especially helpful if you’re attempting to increase your page rank. In addition to providing the list of URLs, sitemaps also supply information about each individual URL, such as relevancy to the website, update times, and change frequency. 

Since the internet is a pretty crowded place, it is incredibly important to take the proper steps to ensure your site is getting the highest amount of traffic possible. If your website is just getting started and you are looking to increase traffic, creating a sitemap can assist search engines by providing insight into pages that are new, recently updated, or not immediately accessible through the browsable interface. 

How to Convert DOCX to HTML in Java

As we have discussed in previous articles, while the Word DOCX format is the go-to for creating text documents, it can be insufficient when we enter the web-based territory. When considering formatting for online documents, it is Hyper Text Markup Language (HTML) that emerges as one of the clear winners for applications and websites. This dynamic language utilizes set cues or elements to construct documents that can be transmitted to browsers and presented to end-users as a readable web page. The structure of HTML even allows for the integration of images, interactive forms, and other objects that are more difficult to create with a straightforward Word document.

The Word DOCX format is actually based on a different markup language, XML (Extensible Markup Language).  Microsoft transitioned its most popular programs – Word, Excel, and PowerPoint – to an open standard, XML-based format in the mid-2000s. This move was to create improvements in file size, image compression, and security, as well as to maintain an edge over their competitors. While some users still prefer the older DOC version due to its compatibility with other platforms, the DOCX format is generally the better choice for current word processing projects.

How to Convert JSON to XML or XML to JSON in Java

Understanding how to convert between complex file types will allow you to optimize and perfect your operations, ensuring your data is always in the appropriate form. The two formats featured in today’s tutorial are JSON and XML. Both formats are widely used in web-based applications, but one may be more ideal than the other for certain objects. JavaScript Object Notation (JSON) is defined as an open standard file and data-interchange format that uses human-readable text to store and exchange data. It was initially developed from JavaScript, but as a language-independent format it can be used in many different programming languages. Due to its versatility, efficient design, and low cost, JSON has become a go-to for many businesses. 

Our other format, Extensible Markup Language (XML), is similar to JSON in that they both are easy to read, create, and decode. However, XML uses prescribed tags that divide information according to its traits and has limiting factors associated with characters (i.e. !”*(), etc.). While this option may contain a higher word count due to the tags, it does allow for more precision in how data is read by the computer, including improved metadata usability, which is unavailable in JSON. 

JGit Library Examples in Java

Introduction

This article will cover the basic methods from the JGit library that you can use to do git actions from Java code.

Introduction to JGit: JGit library is an open-source library under the Eclipse Licence (Eclipse Distribution Licence). This library has very few dependencies and it can be easily integrated into a Java application. It was implemented in Java to handle all the SCM action commands for Git.

How to Spellcheck Words and Sentences in Java

In our technology-driven world, electronic communication is increasingly overshadowing verbal communication. Whether we are filling out an online form, sending a text on our phone, or writing an email, it is a fact that many of our business and personal interactions require efficiently written (typed) language. Due to this heavy reliance on electronic communication, it is critical to ensure your online platform has a support system built-in to account for human error; if your application or website allows input or search queries from users, you run the risk of your systems not understanding the text due to spelling errors — and this is where spellcheck comes in.

When you stop and consider how many times you encounter spellcheck in your electronic interactions, it should become clear that it has created a huge failsafe for our often rushed and impatient natures. Spellcheck has come a long way since its beginnings; the first spellcheckers simply verified words instead of suggesting corrections. Fast forward to our current era and spellcheckers have improved in both functionality and efficiency; they operate in the background of our applications and let us know with a red line that we have made a potential error. This is often accomplished with Natural Language Processing (NLP) which, as we have discussed previously, enables computers to process and interpret human language in the form of text or audio data. 

How to Validate Code Identifiers in Java

When building applications and programs for use by other developers, ensuring you are utilizing valid code identifiers is an important component. These unique identifiers are symbols that have been designated to specific program elements essential to the successful creation of a program, and they can refer to a wide variety of features, including class, namespace, types, variables, and more. To avoid any confusion or misinterpretation, the names given to the symbols should clearly indicate the usage of the corresponding element. The general idea is to create an identity of sorts for the symbol so that it can easily be identified by any individual, not just the original developer.

During the creation of these integral program pieces, it is also important to be conscious of the technical nuances of the applicable programming language; for example, since Java is case sensitive, identifiers that have different cases will be treated differently. As you may know, attempting to navigate the various rules and requirements for code identifiers can take up a lot of time, so we are going to highlight an easy tool you can integrate to do the work for you. The following API can be run in Java to validate input identifiers and analyze for incorrect strokes including usage of whitespace, hyphens, underscores, and other special symbols within the identifier. This is accomplished by configuring input rules for the symbols, such as allowing the identifier “helloWorld” but not "hello*World".

How to Protect URLs from SSRF Threats in Java

Server-side request forgery (SSRF) attacks are yet another form of cyber-crime, and they are designed to specifically target a server by sending back-end requests from vulnerable web applications. These attacks can threaten not only servers, but other connected confidential information such as cloud services in AWS, Azure, and OpenStack as well. They can be especially challenging to battle since they are generally used to target internal systems protected by firewalls that are inaccessible from the external network; by directing these strikes, the attacker has the potential to gain full or partial control of the requests sent by a web application.

There are multiple approaches that the malicious user may take in a typical SSRF attack; a frequently seen example is by inducing the server to create a connection back to itself or external third-party services. From here, the attacker can seize control of the third-party service URL to which the web application makes a request. Other examples include making requests to internal resources, running port scans on internal IPs, and more. These attacks exploit relationships that your server has built, inciting trust only to strike the vulnerable application and carry out their own agenda.

Future, A Token of Task Submission

Future, A Token of Task Submission

I believe, the title is very abstract but clearly explains the purpose. The concurrency package is the boss when it's come to asynchronous programming. Of course, this is the continuation of my previous articles on asynchronous programming.

We have seen creating Threads and make use of Executor Framework for the Thread management. Also, We look at how to submit a task and how is it processed internally in the executor. But we haven't seen how to check the status or getting the result etc.

Introduction to Spring Boot and JDBCTemplate: Refactoring to SpringData JPA

Refactoring is the process of modifying a software system without changing its desirable behavior. It was necessary to have an application integrated with the relational database using the Spring JDBC Template in the first parts. The Spring JDBC Template is a powerful tool that facilitates productivityHoweverthere is a way to simplify the code even further with Spring Data JPA. The purpose of this post is to refactor the project to use Spring Data JPA.

Spring Data JPApart of the larger Spring Data family, makes it easy to implement JPA-based repositories easilyThis module deals with enhanced support for JPA-based data access layers. It makes it easier to build Spring-powered applications that use data access technologies.

Fast and Efficient Development With Payara Server and IntelliJ IDEA Ultimate

In this blog, we’re going to look at how to use Payara Server with IntelliJ IDEA Ultimate. We’ll cover how to create a simple web application that runs on a Payara server. We’ll also explore some of the features available to help you develop your enterprise applications.

Payara Server Support in IntelliJ IDEA

IntelliJ IDEA provides great tooling for developing with Payara servers. By default, IntelliJ IDEA Ultimate comes with the Glassfish plugin installed and enabled. You can use the Glassfish plugin to start, stop and debug Payara servers along with other server functionality.