For the past couple of years, government and societies have been trying to make “Geek” cool again. Presidents and prime ministers are recommending that computer programming be part of schools’ curriculum. Politics aside, becoming a competent programmer today is more challenging than ever. Just being an introvert genius no longer suffices.
Companies and organizations are looking for people with cognitive skills to add to their technical abilities. It is difficult to put a number on this as it is very company-dependent, but the 70/30 rule could be applied here. That means that people should possess roughly 70% technical skills and 30% soft (cognitive) skills. A “hardcore” developer hardly moves into management if he/she lacks the soft skills required. I have managed many teams across multiple verticals and developed some job descriptions and career progression paths along the way that are in use in some of the largest companies in the world. Let’s try to sum up a few aspects of what seems to be the pattern when companies are recruiting or promoting.
Just recently, after one of my sessions at JavaDay Kyiv, I was asked by an attendee what the reasons were for my use of Java EE. In the session, I mentioned that in the past, I was also a heavy user of Spring.
Actually, I always enjoyed programming in Spring, and I liked the declarative programming model with annotations and the fact that the technology evolves quite fast. I used Spring up to version 4 in real-world projects, and we always tried to use the latest approaches — like @RestControllers, or Java-based configuration back then.
Welcome to another installment of This Week in Spring! This week, I’ll be in Des Moines, Iowa, for the Prairie.Code conference. If you’re nearby, stop by and say hi!
As usual, we’ve got a lot to cover so let’s get to it.
As discussed in that article, Karaf has its own XML format for a "feature repository," an XML file that lists one or more features. Each feature lists features or bundles that it relies on, with support for versioning. The whole thing works because Karaf can retrieve both the feature repository XML files and the OSGi bundles from a variety of sources, including Maven.
In the object-oriented world, each developer who wants to live long and prosper should know the SOLID rules. SOLID is just an acronym of basic tips for writing maintainable, readable code. We all know many developers who follow these rules. And we all know many who know them, but don't use them. And finally, plenty of programmers have heard something about SOLID, but don't bother to learn anything about it. However well we use it, we can agree that sticking to SOLID is a good practice. But there are always compromises.
In fact, in the real world, we have to know that each letter in SOLID has own shades and gradients — they are not simply white or black. In this article, I want to tell you something about the Single Responsibility Principle (SRP), which covers the first letter in our acronym. What is it?
With the introduction of Java 8, we got the long-awaited Stream library. One of the advantages with streams is that it is very easy to make streams parallel. Basically, we could take any stream and then just apply the method parallel() and we get a parallel stream instead of a sequential one. By default, parallel streams are executed by the common ForkJoinPool.
Parallel streams are good if the work items to be performed in the parallel stream pipelines are largely uncoupled and when the effort of dividing up the work in several threads is relatively low. Equally, the effort of combining the parallel results must also be relatively low.
This article introduces the JTemplate framework and provides an overview of its key features.
For a recent project requiring WebSockets and JMS, I needed to make use of IBM’s WAS Liberty Profile server, as WAS 8.5 ND only supports JEE 6. I want to share some of my learnings with you, starting with the basics: a short intro on what to expect and setting up a server.Highlights
Some highlights of WAS Liberty are:
Let's say we're dealing with a number of input fields that require validation. The validation logic might be simple or complex, involving many different factors or parameters to validate a single field. Normally, we use a number of if...else blocks to validate each and every input field. This approach will lead to concerns regarding maintainability, readability, and extensibility. Hence, I would like to discuss the best approach using the Strategy pattern, but using Enum for the implementation. This approach was already used in one of my previous projects and proved to be useful. Let's start our discussion.Problem Statement
Let's assume that we ask the user to provide some of his personal and bank details when he applies for a loan. Once we receive the details, we might want to validate those. In real life, it might be many more fields and more complex validations. But, for our simple example, we will take around 10 fields and will perform simple validations — like whether the fields are empty.
Groovy adds a lot of useful methods to the Java JDK classes. One of them is the sleep method that is added to all objects. With the sleep method, we can add a pause to our code. The sleep method accepts a sleep time in milliseconds. The implementation of the method will always wait for the given amount of milliseconds, even if interrupted. But we can add a closure as an extra argument, which is invoked when the sleep method is interrupted. We should return true for the closure to really interrupt, otherwise we use false.
In the following example, we use the sleep method to pause the bedtime method of the User class. We run the bedtime method in a thread, and after 2000 milliseconds, we intercept the thread. The sleep method still waits for 5 seconds, before ending:
I often get questions about the LGPL license used for Kentor.AuthServices. I also often find it confused with GPL, which is something you should never, ever even consider to use in any closed source software that you intend to distribute. So this post is an effort to explain and answer common questions about the LGPL. Unfortunately, I have to add the disclaimer: I’m not a lawyer and the content of this post is only meant as an overview and introduction to the license. I might have got things wrong, so please read the real license yourself and involve appropriate legal counsel to be sure.Intention of GPL and LGPL
The intention of the GPL (General Public License) is to promote free open source software. You can use the software under GPL, redistribute it, and modify it. But the result is always bound to be under the GPL license too. You can also combine GPL software with other software — as long as the combined work is licensed and distributed under GPL. This means that the GPL is “contagious” — if you use a GPL component in a system, the entire system has to be released under the GPL. The reasoning behind this is to promote open source. If a great library is only available under GPL it will force software that wants to use the library to be free and open source, too.
While developing Spring Boot Applications using Intellij IDEA, it was so annoying to restart the Spring Boot app after each and every change. Spring Boot provides live reload (hot swap) of application out of the box using the following dependency.<dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-devtools</artifactid> </dependency>
We are proud to announce the general availability of the new release of the CUBA Platform and Studio!
Perhaps this is one of the most feature-rich platform releases ever - there are important changes on all levels: architecture, extensibility, API usability, and performance.
This article covers major enhancements of the platform. The full list of changes is available in release notes:
This step by step guide shows you how to implement a Spring-based web application that connects to a MySQL server in order to query data that can be filtered from the UI. This guide assumes you know the very basics of Maven and Spring Framework (particularly the concept of dependency injection).
I spend most of my time with Java writing stand-alone applications to support testing or code that we run as part of CI. I haven’t had to create a library that I make accessible to other people through Maven central.
I thought it was about time I did so.
I've worked on multiple teams that have successfully used Apache Karaf as an OSGi container. In addition to the usual need to understand OSGi bundles and class resolution in the context of multiple class loaders (which deserves at least one article all by itself), Karaf adds the concept of a "feature" on top of OSGi bundles. While there is detailed documentation on features, I've found that they can be confusing for new users, especially when they are resolved from Maven, since there seems to be so much behind the scenes magic involved.Base OSGi
For everything that Karaf adds to OSGi, the basic unit of installation in the OSGi container is still the bundle. A bundle is a Java Archive (JAR) with some special information in its manifest that identifies it, gives a version, and specifies dependencies. When an OSGi container adds a bundle, it goes through a resolution process to make sure that the bundle's dependencies are met (and that it does not conflict with other installed bundles). However, that resolution process does not include any ability to obtain any dependencies; it just checks to see if they are available and delays or prevents the bundle from starting if a required dependency is missing.
Spring Cloud Sleuth is an awesome project that provides a way to trace requests that span multiple systems. Spring Cloud sleuth can optionally export this trace data to Zipkin where it can be visualized in a neat way. I especially love the fact that Spring Cloud Sleuth integrates deeply with Spring Integration and can nicely trace out the flow of a message.Consider the following:
I have been contributing to the open-source project Speedment (which is a Stream ORM Java Toolkit and Runtime) and a new major version called 3.0.1 “Forest” was just released. Releases are named after the avenues in Palo Alto, California where most of the contributors work. Each new major release gets a new name by following Middlefield Road southwards. The new version is now modularized which helps developers keep up the good pace. There are also a large number of new features for Speedment users and in this article we will look into some of the things to discover!Persistence
People used to older ORMs can now use Speedment in the same way when creating, updating or removing entities from a database. For example, we can create entities in a database “JPA-style” like this:
There is no doubt that Java is one of the programming languages that is most in demand these days. Here, we have scooped a handful of good info about trending frameworks that ease everyday lives of software developers around the globe.
As per a survey conducted by RebelLabs, the media ally for the online Java User Group (Virtual JUG), the lineup of best java frameworks for 2016 is the following:
So… quick but powerful question: What's the future of software development?
A lot of people ask me about the future of software development. What the future holds for software development and for new and old programmers? Are there going to be new programming jobs in the future? Are there going to be new and exciting job creations when it comes to software development?