Subscribe: Javalobby - The heart of the Java developer community
http://www.javalobby.org/rss/rssmessages.jspa?threadID=75340
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
boot  build  design principles  design  isempty  java platform  java  jdk  json  new  osgl  part  principles  release  spring boot  spring 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Javalobby - The heart of the Java developer community

DZone Java Zone



Recent posts in Java on DZone.com



 



SOLID Design Principles Explained: Interface Segregation

Sat, 21 Apr 2018 04:01:01 GMT

The Interface Segregation Principle is one of Robert C. Martin’s SOLID design principles. Even though these principles are several years old, they are still as important as they were when he published them for the first time. You might even argue that the microservices architectural style increased their importance because you can apply these principles also to microservices.

Robert C. Martin defined the following five design principles with the goal to build robust and maintainable software:




Mastering Java 8 Streams (Part 4) [Video]

Fri, 20 Apr 2018 20:01:01 GMT

One of the more advanced (but incredibly useful) streams methods is the reduce method. What does it do? When would you use it? What does reduce have to do with Donald Trump and his wives and children? 

Find out in the next episode of the Master Java 8 streams series!




Waiting for Tasks With Phaser

Fri, 20 Apr 2018 16:01:01 GMT

The class Phaser lets you wait for a flexible number of tasks executed in other threads. Use the method register to add a task you want to wait for. Call arrive to signal that a registered task is finished. And call awaitAdvance to wait until all registered tasks are finished. We will see how to use it by looking at a real-life example. But first, how does it work?

How Does Phaser Work?

The class Phaser works in phases. You register tasks for all phases by calling the method register. You signal that a task is finished for this phase by calling arrive. When all registered tasks have arrived for this phase, the Phaser starts a new phase and you can start over again. The following shows this for the first phase, phase zero:




How to Read and Write a CSV File Using Core Java [Snippet]

Fri, 20 Apr 2018 10:01:01 GMT

A CSV is a comma-separated values file that allows data to be saved in a table-structured format.

Let's try to read a CSV file using Java and filter out the required rows and create a new CSV, as per our own requirements.




Get to Know JSON Binding (Part 2)

Fri, 20 Apr 2018 07:01:01 GMT

The Java API for JSON Binding (JSON-B) 1.0 strengthens the Java EE platform's overall support for the JSON data interchange format. Already, the Java API for JSON Processing (JSON-P) 1.1 has proved popular, and together, they form the perfect partners that fill a long-standing shortcoming in Java EE's JSON capacity.

The next article in this series covers the customization of JSON Binding operations.




Spring Boot Actuator in Spring Boot 2.0

Fri, 20 Apr 2018 04:01:01 GMT

In this post, we will take a closer look at Spring Actuator and highlight some changes in Spring Boot 2.0. We will discuss some of the endpoints and will create a custom endpoint to our application. The sources can be found at GitHub.

What Is Spring Boot Actuator?

Spring Boot Actuator supplies several endpoints in order to monitor and interact with your application. It does so by providing built-in endpoints, but you are also able to build your own endpoints. In the next sections, we will create a dummy application, enable the Actuator endpoints, provide the version and build information to it, add security to the endpoint, and customize an endpoint to our needs.




OSGL Tool (Part 2): Extending the Power of Image Processing

Thu, 19 Apr 2018 20:01:01 GMT

In the previous article, OSGL Tool: The Art of Image Processing, we introduced how to uset he OSGL Img utility to process images, including:

  • Cutting
  • Resizing
  • Watermarking
  • Flipping
  • Blurring
  • Concatenation
  • Using a pipeline to process images

In this article, we will talk about how to extend OSGL Img with a customized image processor.




Java 8: ConcurrentHashMap Atomic Updates

Thu, 19 Apr 2018 16:01:02 GMT

Whilst doing some refactoring on updates to ConcurrentHashMap values, I came across these great articles ...

... and was inspired to try to develop the theme a bit further.




Software Design Principles DRY and KISS

Thu, 19 Apr 2018 10:01:01 GMT

In this article, I am going to explore software design principles and their benefits, why design principles are useful for us, and how to implement them in our daily programming. We will explore the DRY and KISS software design principles.

The DRY Principle: Don't Repeat Yourself

DRY stand for "Don't Repeat Yourself," a basic principle of software development aimed at reducing repetition of information. The DRY principle is stated as, "Every piece of knowledge or logic must have a single, unambiguous representation within a system."




Spring Tips: Redis [Video]

Thu, 19 Apr 2018 07:01:01 GMT

Hi, Spring fans! In this installment, we look at the many facets of Redis, the distributed data structure server. Spring supports Redis through the Spring Cache abstraction, Spring Session, the Spring message-listener container abstraction, and through the Spring Data Redis module.

Speaker: Josh Long




Optional.isEmpty() Coming to Java?

Thu, 19 Apr 2018 04:01:01 GMT

JDK-8184693 requests that the method isEmpty() be added to the Optional class introduced with JDK 8. Invoking Optional.isEmpty() would be the equivalent of invoking . There is no JDK release currently associated with JDK-8184693, but it is being actively worked as demonstrated in a recent core-libs-dev mailing list post titled " RFR: 8184693: (opt) add Optional.isEmpty".

Written by Stuart Marks in July 2017, JDK-8184693 provides some interesting justification for the addition of Optional.isEmpty(). Marks points out that "generally we avoid adding methods that are simple inverses of each other" and cites as examples presence of String.isEmpty() and Collection.isEmpty() without any accompanying String.notEmpty() or Collection.nonEmpty() counterparts. Marks writes this approach works well in these cases because "emptiness/non-emptiness isn't fundamental" for them: "For these objects, it's perfectly reasonable to operate on an empty String (e.g., searching or appending it) or collection (e.g., iterating over it)."




This Week in Spring: Spring Boot, Docker, and GCP

Wed, 18 Apr 2018 20:01:01 GMT

Hi, Spring fans! Welcome to another installment of This Week in Spring! This week I’m in Paris, France and I’ll be in Mainz, Germany, next week for JAX and Linz, Austria for the DevOne event. If you’re in any of these places then don’t hesitate to reach out!

We’ve got so much to cover so let’s get to it!




CodeTalk: Getting to Know the Specification Process Behind Jakarta EE [Podcast]

Wed, 18 Apr 2018 16:01:02 GMT

Thanks for tuning in to another episode of DZone's CodeTalk Podcast where hosts Travis Van and Travis Carlson have early conversations with the creators of new developer technologies. For the next few episodes, we'll be stepping outside of our usual coverage to interview a series of folks on Jakarta EE (the platform formerly known as Java EE) to hear from a number of perspectives on what the switch from Oracle governance to Eclipse means for developers.

Check back every Wednesday for a fresh episode, and if you're interested in being involved as a guest or have feedback for our hosts, scroll down to the bottom for contact information. Also be sure to check out the previous episode in our Jakarta series, where Travis and Travis both spoke with Jonas Bonér, the original author of the Reactive Manifesto and CTO at Lightbend.  




Test-Driving Kotlin in ZK (Part 2)

Wed, 18 Apr 2018 10:01:01 GMT

As promised in Part 1, it's now time to build a more useful example to try out if/how data-classes work in a ZK application. Finally wrapping up to check how Kotlin might help when writing the oh-so-dreaded test cases.

Building a Simple CRUD UI

(image)




Java-Related April Fools Day Pranks

Wed, 18 Apr 2018 07:01:01 GMT

Although you'd never catch me stooping to this level, it has been interesting over the years to see some of the effort and thought put into Java-related April Fools' Day pranks. This post references and summarizes some of them.

Google Annotations Gallery (gag)

The Google Annotations Gallery (cleverly abbreviated as 'gag') is hosted on Google Code, so you may want to download that as soon as possible so that you do not miss out on it. Both gag-1.0.zip (original release) and gag-1.0.1.zip (supplements original release to "add many great user-suggested annotations"). These ZIP files include actual Java source code with the libraries that gag depends on.




Java 10: Let's Play With var

Wed, 18 Apr 2018 04:01:01 GMT

Oracle is finally up to a time-bound release of Java and announced the general availability of Java 10 on March 20, 2018, as part of the new six-month release cycle.

This release introduced twelve new enhancements defined by JEPS(JDK Enhancements Proposals). One of them is Local-Variable Type Inference (JEP 286).




How I Used BeanUtils for Editing a JPA Entity

Tue, 17 Apr 2018 20:01:02 GMT

So I was wondering how to edit an entity using Spring JPA/ Hibernate.

Below is how my model looked like: 




JDK 11 Early Access Build 8

Tue, 17 Apr 2018 16:01:02 GMT

In the message " JDK 11 Early Access build 8 available," Muneer Kolarkunnu announces that "JDK 11 EA build 8, under both the GPL and Oracle EA licenses, is now available at http://jdk.java.net/11." Kolarkunnu specifically highlights Build 8's changes to the Selector API that have been discussed on the nio-dev mailing list in threads such as Callback Based Selectors and More Selector Cleanup.

The JDK 11 EA Build 8 announcement also mentions that "VM option '-XX:+AggressiveOpts' is deprecated in JDK 11 and will be removed in a future release" as of Build 7. The announcement highlights JDK-8193033 ("Release Note: remove terminally deprecated sun.misc.Unsafe.defineClass") in Build 6 and reminds that "users should use the public replacement ' java.lang.invoke.MethodHandles. Lookup.defineClass' which was added in Java SE 9."




Java 10: New Features And Enhancements

Tue, 17 Apr 2018 10:01:01 GMT

Oracle has recently delivered the new Java 10 within the previously announced deadline. It is a feature release of the Java SE platform, which got released on March 20, 2018. It contains various new features and enhancements into many functional areas. Some of its key improvements include enhancements for garbage collection and compilation as well as local variable types.

Georges Saab, vice president of Software Development in Oracle’s Java Platform Group, said that “Oracle is committed to rapidly evolving and delivering new innovations in the Java platform – this being the first in our newly adopted release cycle and licensing model. We’re especially proud of the simplicity of this release, which introduces useful new features, removes unnecessary elements, and is easy for developers to use.”




OSGL Tool (Part 1): The Art of Image Processing

Tue, 17 Apr 2018 07:01:01 GMT

OSGL (Open Source General Library) is a set of Java toolkit libraries. It is designed for concise and expressive coding.

This is the first article about OSGL, and we will introduce how to use the OSGL tool Img utility to manipulate images.