Java Lobby Announcements

Subscribe to Java Lobby Announcements feed
Recent posts in Java on
Updated: 8 hours 52 min ago

Oracle Finally Kills the Java Web Plugin

Thu, 2016-01-28 19:25

Come March 2017 with the release of JDK 9, Oracle's Java Web Plugin will be deprecated, Oracle announced on their blog. Other companies have been working on killing the plugin for a while. Microsoft's Edge was shipped without support for it, Chrome recently removed support, and Mozilla has plans to remove both Silverlight and Java support by the end of 2016. 

The plugin began life as a way to introduce app-like features to web pages, but over time, the sheer number of security flaws frustrated so many users and IT departments that it's reputation fell in the toilet. In 2013, it was responsible for 91% of all computer attacks. Heimdal Security has an interesting report on several of the security vulnerabilities as well.

Categories: Java

A New JavaFX App Framework for Kotlin — TornadoFX

Thu, 2016-01-28 10:06
TornadoFX is a JavaFX application framework for Kotlin, the new statically typed JVM language from JetBrains.Why Yet Another Framework?

Kotlin interoperates perfectly with Java, so writing JavaFX apps with Kotlin is already a pleasure. However, TornadoFX makes use of some very interesting language features of Kotlin that enables even more concise and beautiful code without hiding any features of the JavaFX API.

Quick Overview

TornadoFX is an MVC framework. A View contains the root node of the UI as well as the view logic. Controllers contain the business logic. Elegant async support ensures that long running tasks run in a background thread and that the result is applied on the UI thread.

Categories: Java

Thrift API Gateway — Part 2: Spring Domination

Thu, 2016-01-28 08:01

In the first part of this series, we investigated how to prepare thrift packets for exchanging security token by user information. Library was written and its time to move forward.

One Annotation to Rule Them All

Annotation-driven development is the Spring-way. Spring can be configured by many annotations that incapsulate tons of logic from your eyes. The first step consists of annotation creation that loads configuration with beans and properties.

Categories: Java

Common Questions in Java: Insights from Stack Overflow

Wed, 2016-01-27 14:31

There are common questions which come up repeatedly in Java. Even if you know the answer it is worth getting a more thorough understanding of what is happening in these cases.

How Do I Compare Strings?

The more general questions are how do I compare the contents of an Object. What is surprising when you use Java for the first time is that if you have a variable like String str that is a reference to an object, not the object itself. This means when you use == you are only comparing references. Java has no syntactic sugar to hide this fact so == only compares references, not the contents of references.

Categories: Java

JavaDoc Source Samples That Aren't Terrible

Wed, 2016-01-27 12:31

JavaDoc source code embeds are pretty terrible!

I love JavaDoc but it didn't age well. When you work with other tools (e.g. in the Microsoft world) suddenly the embedded samples look amazing and "search" functionality is just built in!

Categories: Java

4 Reasons Why Java is Still #1

Wed, 2016-01-27 09:01

It’s the start of 2016, which means that we’ve now finished the “20 Years of Java” celebrations. Actually, although the announcement about Java (and the HotJava browser, which did not enjoy quite the same success) was made publicly on May 23rd, 1995, the first official release of the JDK was on January 23rd, 1996. You could justifiably claim that Java is only now turning twenty. There have been numerous retrospectives on Java, but I thought what would be interesting to look at is the success of Java in its twentieth year.

It’s difficult to accurately measure the popularity of programming languages, but one of the generally accepted surveys is the TIOBE index. This tracks language references through a variety of search engines as well as Google Blogs, Wikipedia and even YouTube. (In writing this entry I learnt something new, which is that TIOBE is actually an acronym for “The Importance Of Being Ernest,” the play by Oscar Wilde. Not sure what that has to do with programming languages, but there you go).

Categories: Java

Value Types in Java: Why Should They Be Immutable?

Tue, 2016-01-26 12:31
Value types need not be immutable. But they are.

In the previous post, I discussed the difference between pointers and references in Java and how the method parameters are passed (passed-by-value or passed-by-reference). These are strongly related to value types that do not exist in Java (yet).

There is a proposal from John Rose, Brian Goetz, and Guy Steele detailing how value types will/may work in Java and also there are some good articles about it. I have read “Value Types: Revamping Java’s Type System” that I liked a lot and I recommend to read. If the proposal is too dense for you to follow the topic you can read that article first. It summarizes very much the background, what value types are, advantages, why it is a problem that Java does not implement value types and why it is not trivial. Even though the terminology “value type” may also be used to denote something different I will use it as it is used in the proposal and in the article.

Categories: Java

Be Lazy With Java 8

Tue, 2016-01-26 12:31

One of the most distinguished features of us programmers is that we are inherently lazy. Not in a bad way that we do not want to work, but in a better way: We do not want to do the same thing twice and we do not want to do it at all if we do not have to. In fact, not writing code is often the better alternative in the cases you can reuse something else instead.

The same thing is true for our applications. Often, we want them to be lazy so that they only do what is absolutely necessary and nothing more.

Categories: Java

Java EE 8 MVC: Working with query parameters (JSR-371)

Tue, 2016-01-26 09:01

In the previous post about the new Java EE MVC Framework, we had a detailed look on Controllers. In this and the following posts, we will see how to access various types of request data in MVC Controllers.

Java EE MVC makes heavy use of JAX-RS and most of the things we will see in this and the next posts are JAX-RS features. So, if you are familiar with JAX-RS you probably will not learn much new in this post.

Categories: Java

OCI and DZone Present: A Grails Quickcast #1

Mon, 2016-01-25 16:03

Got a [g|G]roovy 17 minutes? Watch a quarter-hour of pure coding by Grails co-founder Jeff Scott Brown. Grin as Grails lets you build a JVM web app as fast as those Ruby on Rails developers do it -- with all the muscle of the Java platform.

DZone is proud to partner with OCI to launch a new series: the Grails Quickcasts, led by Jeff Brown, principal software engineer and Grails practice lead at OCI. 

Categories: Java

If Java Were Designed Today - The Synchronizable Interface

Mon, 2016-01-25 14:31

Java has come a long way. A very long way. And it carries with it all the “junk” from early day design decisions.

One thing that has been regretted time and again is the fact that every object (potentially) contains a monitor. This is hardly ever necessary and this flaw was corrected, finally, in Java 5, when new concurrency APIs were introduced, such as the java.util.concurrent.locks.Lock and its subtypes. Since then, writing synchronized, concurrent code has become a lot easier than before when we only had the synchronized keyword and the hard-to-understand wait() and notify() mechanism:

Categories: Java

Java2Days Trip Report

Mon, 2016-01-25 12:31

Java2Days 2015 was held on November 2-4 in Sofia, Bulgaria. It is far and away the largest Java conference in the Balkans region and now perhaps one of the most important conferences in Europe as a whole. Far beyond the modest borders of Bulgaria, it seemed to increasingly attract audiences from as far as Serbia, Bosnia/Herzegovina, Romania, Albania, and Macedonia. This was another great year for this rapidly growing, vibrant event. It attracted a host of international and local speakers including Patrick Curran, Geertjan Wielenga, Ivan St. Ivanov, Vladimir Pavlov, and Andrew Lombardi. Topics included Java SE, Java EE, HTML5/JavaScript, mobile, and the cloud. If the conference is not on your map already, it should be. It is inspiring to see a youthful, energetic Java community rise in this once very tumultuous, repressed part of our world.

One of the most unique things about Java2Days that one should appreciate is that it is an event run entirely by women - the capable trio of Yoana Ivanova, Iva Abadjieva and Nadia Kostova. It is the only Java conference that I know of for which this is true. Iva's husband Emo Abadjiev also contributes many hours of hard work into the conference. I am very proud to be able to call all these passionate, down-to-earth, genuinely good people my friends and gracious hosts in Bulgaria. Other than now Java Champion Yara Senger of The Developer Conference (TDC) Brazil, Java2Days was the first international conference to invite me as a speaker while I was still an independent. In fact I feel very honored to say that I was the first and last speaker of the very first Java2Days a few years ago. They have been very kind to invite me back every year since. Though I have not always been able to accept the invitation largely due to personal scheduling reasons, I am very glad I was able to speak at Java2Days one more time this year.

Categories: Java

Scala Days New York 2016

Mon, 2016-01-25 09:01

Scala Days will be in NYC on May 9th through May 11th, 2016.  It will be conveniently located mid-town at AMA Executive Conference Center.   If you are a Scala developer, Spark developer, a Java developer looking to learn or a Big Data enthusiast this will be the place to be in May. More than a few presentations from the last few Scala Days have entered my rotation of must read.

I will be providing in-depth coverage of the event. This along with Spark Summit will be on my must-do list for 2016.

Categories: Java

Java EE in Practice at Lufthansa Industry Solutions (The Aquarium)

Sun, 2016-01-24 12:31

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories at a regular cadence. We have been doing just that for a long time through our adoption stories blog, this humble blog as well as JavaOne. Indeed, JavaOne 2016 was particularly good in this regard. We had a number of solid adoption stories submitted that we could select from. We will highlight all of those stories here in the coming months. A nice JavaOne 2016 session to start with is the one from Lufthansa industry solutions.

Lufthansa industry solutions develops systems both internally at Lufthansa as well as for external customers. They chose to standardize on Java EE to ensure consistency throughout a large number of systems. The session explains what the organization does, it's architectural approach and why they chose Java EE. The session also dives into some interesting details on two different Java EE applications (one still using Java EE 6 and one already on Java EE 7) that Lufthansa industry solutions developed for clients. The session touches upon how Java EE applications can take advantage of most of the practical benefits of microservices without the added complexity. The applications use a mix of WildFly and JBoss EAP along with other JBoss ecosystem projects like Hibernate Envers, Hibernate Search, Drools. The applications also used ICEfaces and PrimeFaces (the older Java EE 6 application used ICEfaces while the newer Java EE 7 application uses PrimeFaces). You can view the session below (click here if you are having trouble seeing the embedded video).

Categories: Java

Let's Build a Bitbucket Add-on in Clojure! - Part 4: Talking to Bitbucket

Sat, 2016-01-23 12:31

In part 3 of this series we added REST and JSON capabilities to our add-on. However most Atlassian Connect add-ons will want to add some user-interface elements to the Bitbucket repository too, usually by working with data from the repository. To get this data, the add-on will need to talk to Bitbucket directly. In this installment, we'll look at a couple of ways to do this, including how to authenticate using the handshake information we received in the previous blog post.

Talking to Bitbucket

The real power of Atlassian Connect is the ability to modify Bitbucket's UI to expand its functionality. However for most add-ons this will entail communicating with Bitbucket via the API to interact with a user's repository and other information. This is why in the previous installment when we implemented the calls that Bitbucket will make back to our add-on we left out the /connect-example endpoint which serves up the HTML component that will be embedded into Bitbucket. Before we can fill out this endpoint we need to be able to fetch some metadata about the repository from Bitbucket.

Categories: Java

MVC 1.0 in Java EE 8: Getting Started Using Facelets

Sat, 2016-01-23 09:40

MVC 1.0 is an action-based Model-View-Controller web framework, which will be a part of the future of Java EE 8. This post summarizes what needs to be done in order to use Facelets instead of default JSP as a view technology for MVC framework.

How to Set Up Facelets With MVC

Although MVC is a fresh new framework, the default view technology used in most examples — JSP — is rather old and sometimes cumbersome. On the other hand, the older brother JSF already builds on more modern and flexible Facelets.

Categories: Java

Web Server Upgrade Training [comic]

Fri, 2016-01-22 14:34
Categories: Java

Why I Use OSX

Fri, 2016-01-22 14:31

One thing is for certain, the OS wars between developers is not a topic that is going away anytime soon. People can be very passionate about the OS they use. Windows has been the dominant OS for a long long time. I used to be a big Windows user. But not anymore.

Like the maid, I don’t do Windows – JT

Categories: Java

Let's Build a Bitbucket Add-on in Clojure! - Part 3: Creating Our API

Fri, 2016-01-22 12:31

In part 2 of this series we built upon the foundations we created in part 1 to generate a Connect descriptor. That descriptor specifies, among other things, the API that Bitbucket should call on key events in our repository and add-on lifecycle. In this installment we're going to look at how to specify and serve this API, and how to convert JSON sent to us by Bitbucket into Clojure data structures.

Serving Our API

If we take a closer look at our descriptor we can see we define the followinhcg API:

Categories: Java

SpringOne2GX 2015 Replay: Documenting RESTful APIs

Fri, 2016-01-22 09:01

An API’s documentation is a vital part of making it easy to understand and easy to use. RESTful APIs are no different. In this talk we’ll look at what should be included in your RESTful API’s documentation and, just as importantly, what should be omitted. Using real-word examples, both good and bad, we’ll discuss how the documentation should be structured so that it’s informative, succinct, and easy to read. Having identified what good documentation looks like, we’ll discuss some of the tools that are available for documenting services built using Spring. In particular, we’ll look at some of the problems and limitations of choosing a tool like Swagger and how some alternatives, including Spring REST Docs, avoid these shortcomings and help you to produce documentation that your users will love.

Recorded at SpringOne2GX 2015.
Track: Web/Javascript Track
Speaker: Andy Wilkinson

Categories: Java