Java Annotated Monthly – May 2015
When we talk about Java programming, we are often reminded of classes with formidable names like AbstractSingletonProxyFactoryBean and legacy code filled with enterprise integration patterns and layers of indirection. But despite some cynicism for its enterprise traditions, Java is teeming with good ideas, if you look in the right places. From languages on the JVM, to open source tools and libraries, each month we find fresh sources of insight and new ways solve problems with Java. Join us on The Java Annotated, and so will you.
Proposed schedule for JDK 9 – A preliminary schedule for Java 9 has been announced, following Chief Architect Mark Reinhold’s recent talk on Java 9 and beyond. Targeted for release in September 2016, Java 9 focuses on performance improvements such as modular dependencies, runtime images and JVM optimizations. In contrast with Java 8, there have not been any new language features announced for Java 9.
Project Panama: Interconnecting JVM and native code – One area where Java has lagged behind languages like Python and Ruby is a solid foreign function interface. Attempting to bridge the gap between Java and C/C++, once complete Project Panama will include new tools for generating wrappers and improved support for interacting with native libraries, promising a number of interesting benefits for IDEs.
Getting started with Java 9 REPL – One of the newest features expected to arrive in Java 9 is a Read-Eval-Print-Loop, a helpful tool for interactive programming. There is already an independent REPL for Java, but Project Kulla offers an official implementation, coming to JDKs near you. How does this work you may ask? What are the benefits of using a REPL? Download the latest build today and see for yourself!
Java EE Security API (JSR 375) – Java EE has faced increasing pressure to adapt to the demands of Web 2.0 applications and provide flexible solutions for authorization and authentication, password encryption, and enterprise security features on the cloud. JSR 375 aims to close the distance between Spring Security and others, working towards a number similar features within Java EE.
How to Contribute to the Java Platform – Unlike Java the language, Java’s platform is considerably more open to contributions, and by contributing, your code has the chance to reach millions of developers and billions of devices around the world. You can help by adopting a JSR, or contributing to AdoptOpenJDK, which forms the basis for Oracle JDK and many other open (and closed) source projects.
Java SE 7 End of Life – If you have not yet begun migrating to Java 8, Java is mostly backwards compatible, so your legacy code will continue to run on Java SE 8 with little migration required. However, in order to take full advantage of Java 8, you should consider adopting some of the new features in the latest editions of Java. Users are currently prompted to automatically update to Java SE 8.
Project Astoria – One of the most noteworthy developments this month was Android for Windows at Microsoft Build 2015. The Universal Windows Platform Bridge will allow your Android, iOS and web applications to be published on the Windows Store and run directly on any Windows 10 device, with minor API changes. Debugging is fully supported from IntelliJ IDEA, Android Studio and Eclipse.
Android Performance Patterns – If you are an Android developer who has not seen the Android Performance Patterns series, these tutorials offer an excellent resource for learning the dark arts of performance optimization on Android. You will learn best practices for saving battery life, managing memory, optimizing rendering performance, and pick up useful tips and tricks from other Android developers at Google.
Android Support Library 22.1 – The Android Support Library is more than just AppCompat! In addition to providing a consistent look and feel for your application across hundreds of potential devices, this library offers a set of utilities classes and common functionality for applications across all Android’s platforms. Each release brings support for new widgets, bug fixes and performance improvements.
Espresso 2.1 Released – Since last year, Android tools have undergone a major overhaul in testing support. Developers on the Android Testing Support library have made major improvements to the SDK, including the main UI testing framework, Espresso. You can learn all about Espresso and Android Testing in this great episode of the Android Backstage podcast on Espresso and UI Testing.
Cross-Platform Development in Visual Studio – Not only will it be possible to build native Windows apps in Java, Objective-C and Swift, Microsoft now offers solutions for building cross-platform apps from within the .NET framework for iOS and Android, using Apache Cordova, Visual Studio, and the Visual Studio Emulator for Android. You’ll even be able to write Java on Visual Studio, thanks to some neat VS extensions. As Java developers, this is only good news. Give these tools a try and let us know what you think!
Android Studio 1.2 Available – Following the introduction of proper unit testing in the Android Build System, Android Studio 1.2 has just been released, complete with full testing support, new profiling tools, lint checks, bug fixes, and all the latest features from IntelliJ IDEA 14.1, including inline debugging, editor improvements, HiDPI support, annotation inference and much more.
Android Code Samples – Now available in Android Studio (File | Import Sample), you can find a number of official Google code samples to get up and running with Android development. Don’t miss the latest samples for Android testing, which include full samples for all three testing libraries: a fast IDE-local AndroidJUnitRunner, and instrumentation tests for Espresso and UIAutomator.
java-design-patterns – Many readers will be familiar with the Gang of Four book. Toss the book. For a comprehensive guide to design patterns in Java, every new developer should have a project like this one. The true value of reading code may often be understated: if you have trouble modeling a tricky problem, clone this repository, lock yourself in a room and study. The answer you seek lies somewhere within.
IntelliJ Platform SDK Docs – If you’re interested in writing IDE plugins, our colleague Anna Bulenkova has published a series of tutorials and documentation for the IntelliJ Platform. Inside, you will find code samples and detailed reference materials covering many aspects of plugin development for IntelliJ IDEA, Android Studio and the IntelliJ family of IDEs. If you have experience writing plugins or would like to help, your contributions are welcome!
Reactive Streams 1.0.0 is here – The Reactive Streams specification offers a language-agnostic pattern for doing fully asynchronous stream processing with non-blocking backpressure. Reactive Streams was designed to alleviate congestion and prevent buffer overflows by providing a pull-based mechanism to signal consumption. For a good introduction, read this summary and check out the RxJava documentation.
ND4J – Java may not be your first choice for data science applications, but there is no reason why it cannot be a viable platform for mathematics and scientific computing, when it is a suitable candidate for distributed computing and big data tools like Spark and Hadoop. ND4J has a set of common APIs for doing matrix math, linear algebra and signal processing. This screencast will show you how to get started.