Subscribe: Javalobby - The heart of the Java developer community
http://www.javalobby.org/rss/rssmessages.jspa?threadID=53623
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
application  boot  build  data  design principles  java  json  method  principles  spring boot  spring  switch expressions  switch 
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



 



Understanding Java Keytool Keystore Commands

Mon, 23 Apr 2018 16:01:01 GMT

This guide will help you with the Java Keytool Keystore platform. We will show you which Java Keytool Keystore commands work for which process for certificate management.

This blog is a comprehensive guide on how Java Keytool Keystore commands are used to manage your digital certificate in Keystore. And, ultimately, it becomes a time saver for busy developers.




DZone Research: The Myriad Uses of Java

Mon, 23 Apr 2018 10:01:01 GMT

To gather insights on the current and future state of the Java ecosystem, we talked to executives from 14 companies. We began by asking, "What are real-world problems being solved by Java today by your organization?" Here's what the respondents told us: Content management, delivery, digital experience. Our platform geared toward a good ROI for web presence and extensibility. Java provides a good foundation to build from. There are a large number of APIs for extensibility. Source code to deploy applications from Git to build, test, deploy a binary package to a Docker image to enable CI/CD. The availability of developers. There are millions of Java developers. The libraries are important. Since the Equifax breach, companies are doing software composition analysis to look for known vulnerabilities. When there’s a known vulnerability, we see widespread attacks within a day. Tooling, manageability, libraries, and frameworks are all strengths of Java. Writing automation tests that test not only how an application functions, but also what an application looks like. This means not just taking the screenshots of the application in various stages of the flow, but also not generating false positives when verifying that it looks the same as it did the last time the test was run successfully. Serverless architecture (FaaS) RIFF from Pivotal. Running serverless on the edge since all of the data is event-driven. Twitter, financial payment systems, automobiles, and artificial intelligence. 1) As a developer of MMOs, Java’s ability to support high-speed concurrent processing is definitely something we take advantage of the most. Today, we can run around 2,000 simultaneous players on a single server which is possible, at least in part, because of Java. For comparison, other languages might only support perhaps 100 people on a server at once. 2) There’s another school of thought that doesn’t leverage concurrent programming and instead uses the database to resolve all concurrent issues. That approach is an order of magnitude slower which in turn makes it an order of magnitude more expensive because databases are really expensive systems. If you look at our datacenter, we spend ten times as much on our database servers than we do on everything else in our datacenter. By taking full advantage of concurrent processing we can reduce our database usage and reduce our overall cost compared to competing, single-threaded solutions. Millions of users. Spring Boot and Spring Cloud integrate with our APIs. One of the things that I am most excited about is using Java with a Function-as-a-Service engine, specifically Apache OpenWhisk.   FaaS will have a notable impact on the way developers build applications moving forward.   FaaS (aka Serverless) should have a bigger impact than the movement to microservices. In addition, some of our most interesting middleware technologies like Apache ActiveMQ Artemis is Java based.  This means Java developers who are leveraging this AMQP (or JMS) focused messaging broker can even run their Java debugger through the broker itself.   I consider that to be a substantial value-add to the average Java developer building their next generation of applications. We enable our customers to keep a full record of what happens. Event sourcing keeps all state changes. Legal proceedings for online gambling, banking, analytics, electronic medical records for research, for compliance framework demands. Automatic tracking. Scalability which is important when you have a large number of transactions. Starting with microservices can be difficult to know where to start. Writing a monolith is hard to scale. Our structured framework goes from monolith to microservices that scale. I'll write a few different use cases since I'm a contractor: 1) automating invoice handling and bookkeeping; 2) building cloud services for connectivity; 3) end-user systems that handle a lot of pressure (load wise) Our product filters profanity[...]



Introduction to the Scala Type System

Mon, 23 Apr 2018 07:01:01 GMT

As programmers, we often come across a concept called type inference. To begin with, let me clarify that type inference is not something unique to Scala, there are many other languages like Haskell, Rust, and C# that have this language feature. Going by the bookish definition, “Type inference refers to the automatic detection of the data type of an expression in a programming language.” Speaking in layman's terms, it means the language is intelligent enough to automatically deduce the type of the expression, e.g. String, Int, Decimal, etc.

Having learned what type inference is, the next inevitable question is “Why?” The sole purpose of having type inference is to help the programmer avoid verbose typing but still maintain the compile-time type safety of a statically typed language. So speaking simply, type inference is the amalgamation of the best of static and dynamic typing.




Switch Expressions: Enhancing Java Switch Statements

Mon, 23 Apr 2018 04:01:01 GMT

In late December of last year, I posted "Switch Expressions Coming to Java?" Since then, there has been significant discussion, expressed differences of opinion, and now a coalescence of general agreement regarding the future of switch expressions in Java. I have tried to capture some of the major developments related to switch expressions as comments on my December blog post. However, I felt like this week's Brian Goetz message title "[switch] Further unification on switch" on the amber-spec-observers mailing list warranted a new blog post on Java switch expressions.

Goetz opens his message with a reminder that the end game is not Java switch expressions. Instead, Goetz points out that "switch expressions are supposed to just be an uncontroversial waypoint on the way to the real goal, which is a more expressive and flexible switch construct that works in a wider variety of situations, including supporting patterns, being less hostile to null, use as either an expression or a statement, etc."




JDK 11 and Proxies in a World Past sun.misc.Unsafe

Sun, 22 Apr 2018 05:01:02 GMT

With JDK 11, the first methods of sun.misc.Unsafe are being retired. Among them, the defineClass method was removed. This method has been commonly used by code generation frameworks to define new classes in existing class loaders. While this method was convenient to use, its existence also rendered the JVM inherently unsafe, just as the name of its defining class suggests. By allowing a class to be defined in any class loader and package, it became possible to gain package-scoped access to any package by defining a class within it, thus breaching the boundaries of an otherwise encapsulated package or module.

With the goal of removing sun.misc.Unsafe, the OpenJDK started offering an alternative for defining classes at runtime. Since version 9, the MethodHandles.Lookup class offers a method defineClass similar to the unsafe version. However, the class definition is only permitted for a class that resides in the same package as the lookup's hosting class. As a module can only resolve lookups for packages that are owned by a module or that are opened to it, classes can no longer be injected into packages that did not intend to give such access.




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.