Subscribe: Eclipse Zone - Community for Eclipse users and developers
http://www.eclipsezone.com/rss/rssmessages.jspa?threadID=52193
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
application  applications  code  features  idea  java  jdk  message delivery  message  new  part  public  release  spring  systems 
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: Eclipse Zone - Community for Eclipse users and developers

DZone Java Zone



Recent posts in Java on DZone.com



 



How Do Generic Subtypes Work?

Sat, 18 Nov 2017 06:02:11 GMT

Generic classes are a powerful tool in any programming language, but they can also bring a great deal of confusion. For example, how come List is not a subclass of List even though Double is a subtype of Number? In this article, we will explore the various rules that surround subclassing generic types and build a cohesive view of the generic inheritance mechanism provided by Java. Before delving into this important topic, though, we will define the various different techniques for defining generic types and generic class arguments.

Understanding Generics

The purpose of generics in an object-oriented language is to allow for arbitrary aggregate types to be supplied to a class without having to write a new class for each of the supplied types. For example, if we wanted to write a list class to store objects, without generics we would be forced to either create a new class for each type passed (e.g. IntegerList, DoubleList, etc.) or have the internal structure of the list class store Objects as depicted in the listing below:




Failing Fast With Java 8

Fri, 17 Nov 2017 21:01:00 GMT

Fail fast or fail early is a software engineering concept that tries to prevent complex problems from happening by stopping execution as soon as something that shouldn't happen, well, happens.

In a previous blog post and presentation, I go more into detail about the merits of this approach, but in this blog post, I will just detail another use of this idea in Java 8.




Picocli 2.0: Do More With Less

Fri, 17 Nov 2017 17:01:02 GMT

Picocli is a one-file command line parsing framework that allows you to create command line applications with almost no code. Annotate fields in your application with @Option or @Parameters, and picocli will populate these fields with command line options and positional parameters respectively. For example:

@Command(name = "Greet", header = "%n@|green Hello world demo|@")
class Greet implements Runnable {

  @Option(names = {"-u", "--user"}, required = true, description = "The user name.")
  String userName;

  public void run() {
    System.out.println("Hello, " + userName);
  }

  public static void main(String... args) {
    CommandLine.run(new Greet(), System.err, args);
  }
}





Spring Tips: The Spring Boot Build Plugin

Fri, 17 Nov 2017 11:01:01 GMT

Hi, Spring fans! In this installment of Spring Tips, we’ll look at the Spring Boot build plugin, “fat” .jars, executable .jars, and “thin” .jars.




Build Secure Single Sign-On With OIDC and JHipster

Fri, 17 Nov 2017 08:01:00 GMT

Devs might not care about single sign-on (SSO) when building one-off applications for clients or themselves. However, when developing apps for their company or consulting on internal application development, the ability to hook into an existing identity provider is often required.

Whether you need to connect to Active Directory (AD), LDAP, or any number of other systems, Okta can provide easy to use tools to support you. Okta provides SSO for many companies around the world and allows them to configure AD and LDAP as masters that sync their users to the cloud.




Is OOP Compatible With an Enterprise Context?

Fri, 17 Nov 2017 05:01:01 GMT

This week, during a workshop related to a Java course I give at a higher education school, I noticed the code produced by the students was mostly ok — entirely procedural. In fact, though the Java language touts itself as an Object-Oriented language, it’s not uncommon to find such code developed by professional developers in enterprises. For example, the JavaBean specification is in direct contradiction of one of OOP’s main principles, encapsulation.

Another example is the widespread controller, service, and DAO architecture found equally in Java EE and Spring applications. In that context, entities are generally anemic, while all business logic is located in the service layer. While this is not bad per se, this design separates between state and behavior and sits at the opposite end of true OOP.




OpenCSV: Properly Handling Backslashes

Thu, 16 Nov 2017 21:01:01 GMT

OpenCSV is one of the popular Java libraries out there used for handling CSV data. In this post, I will discuss one specific issue that I recently faced with this library.

The Problem

Here is a minimal code snippet for writing and reading CSV data using OpenCSV:




This Week in Spring: Kotlin, Hibernate, and Spring 5

Thu, 16 Nov 2017 17:01:01 GMT

Hi, Spring fans! Welcome to another installment of This Week in Spring! This week I am in Casablanca, Morocco for the amazing Devoxx Morocco event talking to developers in the hub of North Africa.

Can you believe it’s already the middle of November? And can you believe we are less than a month away from the amazing SpringOne Platform event in San Francisco, CA? I hope you’re going!




Inside the JVM (Part 4): ClassLoader [Video]

Thu, 16 Nov 2017 11:01:01 GMT

This video discusses the JVM ClassLoader. This is a detailed and advance discussion of what each classloading phase does and the internal process of loading, linking, and initialization. Also, we will discuss how and why Java initializes parent classes while we use the child class and the six points that Java needs to initialize objects at. Finally, we will discuss four ways to create new instances and how the initial value assignment works each way.




On the Proposal for ''Data Classes'' in Java

Thu, 16 Nov 2017 08:01:01 GMT

There is a new draft proposal for Java ‘Data Classes’ being worked on in Project Amber — read about it here. In short, I think the main points are:

  • Design intent: clearly and unequivocally express the design intent of a class as a ‘DTO’ (even though the author never mentions DTO)
  • Boilerplate: let the compiler take care of proper implementations of typical DTO operations like equals() and hashCode()
  • Switch statements: the author briefly talks about enabling semantic features around these DTOs, eg. the ability to use them as targets for switch statements

The draft also goes into some specifics like accessors not necessarily following JavaBeans conventions, opt-in mutability, and migration/compatibility concerns, among others.




What's Planned for JDK 10?

Thu, 16 Nov 2017 05:01:01 GMT

With the recent release of Java Development Kit (JDK) 9, a great deal of attention has been rightfully focused on the newest features of Java, including the introduction of modules (through the incorporation of Project Jigsaw). Although much of the recent attention has been devoted to these powerful new features, work has already begun on the next release of Java: JDK 10. In this article, we will take a cursory look at the major features slated for JDK 10, as well as explore some of the features for JDK 10 that may be included in JDK 10 down the road.

Note that the world of JDK 10 is changing fast and the information contained in this article is intended to be accurate at the time of writing. The JDK 10 feature group is expected to increase and the proposals for features are likely to grow before JDK 10 is finally released.

New Features

Just as with previous JDK releases, there are some major features coming to JDK 10. These features can be broken up into two principal categories: (1) targeted for release and (2) proposed for release. The former category constitutes those features that have taken on a great deal of traction and have been scheduled for release with JDK 10. The latter category are those features that have gained momentum and require increased support and maturity prior to being included in JDK 10. Once a feature in this latter category has gained these prerequisites, it may be upgraded to a targeted for release status.




Akka Message Delivery: At-Most, At-Least, and Exactly-Once (Part 2)

Wed, 15 Nov 2017 21:01:01 GMT

This article is the second in a series of three articles that dives into some of the interesting aspects of messaging within distributed systems environments. The particular focus of this article covers messaging that is relevant for implementations with the Akka distributed actor systems and for applications within other distributed systems, such as messaging within microservice systems.

Message Delivery Semantics

In Part 1 of this three-part series, we discussed the mechanics of at-most-once message delivery. In part 2 we are going to look at what is called at-least-once message delivery. Finally, in part 3 we will look at exactly-once message delivery.




IntelliJ IDEA 2017.3 Public Preview

Wed, 15 Nov 2017 17:01:01 GMT

IntelliJ IDEA 2017.3 is now available for public preview! Everyone is welcome to download the public preview build right away. We are committed to creating a better product, we really appreciate your input when you share your feedback and send us bug reports. We are constantly working to improve user experience and productivity, and, of course, on bug fixes. In this post, we'd like to give you a glimpse of the highlights of the upcoming release.

Java Inspections and Quick-Fixes

IntelliJ IDEA 2017.3 has loads of new improvements made to the data flow analysis.
The IDE now detects possible nullability issues in Stream API call chains:




Java Code to Handle Versions and Their Comparisons [Snippet]

Wed, 15 Nov 2017 11:01:01 GMT

Hello, buddies.

I'm sharing a small but useful piece of code that can help you in handling version strings and comparisons in day-to-day coding.




Why I Still Prefer Eclipse Over IntelliJ IDEA

Wed, 15 Nov 2017 08:01:00 GMT

Over the years, I’ve observed an inevitable shift from Eclipse to IntelliJ IDEA. Last year, they were almost equal in usage, and I have the feeling things are swaying even more towards IDEA.

IDEA is like the iPhone of IDEs – its users tell you that “You will feel how much better it is once you get used to it,” or “Are you STILL using Eclipse?” or “IDEA is so much better, I thought everyone has switched,” etc.




Constructors or Static Factory Methods?

Wed, 15 Nov 2017 05:01:03 GMT

I believe Joshua Bloch said it first in his very good book "Effective Java": static factory methods are the preferred way to instantiate objects compared with constructors. I disagree. Not only because I believe that static methods are pure evil, but mostly because in this particular case they pretend to be good and make us think that we have to love them.

Let's analyze the reasoning and see why it's wrong, from an object-oriented point of view.




Using Google reCaptcha With Spring Boot Application

Tue, 14 Nov 2017 15:01:01 GMT

reCaptcha by Google is a library used to prevent bots from submitting data to your public forms or accessing your public data.

In this post, we will look at how to integrate reCaptcha with a Spring Boot-based web application.




An Introduction to Spring

Tue, 14 Nov 2017 10:02:33 GMT

Spring is an application framework well-known for enterprise application development. Its ability to enable software developers to implement systems of almost any size, including banking, ERP, e-commerce, POS, and beyond, is remarkable. Spring is built using the Java language. The latest version of the framework, Spring 5, now has support for reactive web applications. Furthermore, reactive applications are applications that adhere to the Reactive Manifesto. Being reactive means that a system is resilient, responsive, message-driven, and elastic. In this article, we will discover the basic crucial concept of Spring.        

Spring IOC 

At the forefront of any Spring-based application is the Spring container, where all Spring-managed beans are stored and retrieved for instantiation. The main advantages of the container are to decouple the "plumbing" code from the actual business logic. The plumbing code includes things like object instantiation, database configuration, queuing configuration in case of messaging systems... and the list goes on. Further, the business logic comprises all the application logic specified by the business requirements/specifications.  




Who Will Use JDK 9?

Tue, 14 Nov 2017 05:01:00 GMT

Recently, I ran a webinar on migrating applications to JDK 9. To develop this, I used some of the material I had researched for an earlier blog post along with new material gleaned from different sources. Rather than looking at the details of moving an application from the classpath to a set of modules, I focused on changes in JDK 9 that might cause existing applications to stop working. It turns out there are quite a few small changes that may result in an application not starting on JDK 9, even if it does not use any of the internal APIs, like the infamous sun.misc.Unsafe class.

During the webinar, I conducted a poll of the audience to find out what stage they had reached in moving their applications to JDK 9. Given the title of the webinar, I assumed this would be a good group to ask. The results were both revealing and interesting. I ran the webinar twice: once for developers in EMEA and once for developers in the Americas.




Java 8 History: Interfaces

Mon, 13 Nov 2017 21:01:00 GMT

Interfaces in Java are usually a mechanism for allowing a number of classes to share a number of methods and constants. It is also one of the best mechanisms for achieving polymorphism in Java.

So if you are one of those types that were very familiar with Interfaces before the arrival of Java 8, it would make a great deal of sense to discover some of the cool stuff Interfaces could do when Java 8 arrived.