Java Annotated Monthly – April 2015

Craftsmanship has a long tradition in other skilled trades, and as software developers, we are starting to recognize the importance of well-crafted code. A single piece of code can reach millions. A few hours of careful design can save days, or years. We may look back and think – how far we have come in these last hundred years! But if we compare ourselves just on the scale of our craft, we miss an important lesson. Craftsmanship is not about tools or products, or even ideas exactly. But a single, hard-earned lesson, passed on to another human being, and the continued pursuit of quality – this is craftsmanship.

jam_pic

Java

It starts with a language for expressing common ideas, a platform for sharing new designs and improving old ones. Something simple, that everyone can understand and apply. It doesn’t need to be perfect – languages seldom are. It just needs to work. Java is far from perfect, but as one of the first languages to commoditize these ingredients, Java is the most popular, high level programming language in the world.

Java 9 – Scheduled for release in early 2016, the details Java 9 are starting to become clearer. Java 9 will focus on repaying an internal technical debt, by modularizing JDK sources and run-time images, as well as introduce a number of new library features, including a currency API and HTTP 2 client. To learn about the latest changes in Java 9 and beyond, check out this presentation by Java Lead Architect, Mark Reinhold.

Frameworks

Most of today’s software stacks are not built from the ground up. We take some of these layers for granted, but they are an essential component in any software architecture. Learning how to isolate common functionality, modularize our code and test its results, gives today’s software developers an enormous amount of flexibility in the design and implementation of large applications, thanks to frameworks like these.

Dropwizard 0.8.0 Released – With the growth of microservice architectures and distributed services you may have been wondering if there is a single framework for building these sorts of applications in Java. Dropwizard is a little collection of libraries for building lightweight web services and dropping them into production with minimum lead time and maximum efficiency.

Spring Boot 1.2.3 Released – Spring Boot offers a more polished and conventional framework for developing web applications within the Spring framework. While it has certain tradeoffs, Spring is the more stable alternative and has some excellent tooling support to boot. To learn more, Dan Woods can help you get started building microservices with Spring Boot.

Spring Security 4.0.0 Released – Securing user facing code is an important area for many web developers, and one that requires an increasingly specialized skillset. Spring Security gives you tools for access control, protection from many common types of attacks, encryption and much more. But Spring or not, when it comes to security, rolling your own is rolling the dice.

Mobile

Miniaturization has been a trademark of our craft since the beginning. Today it is not surprising that in small devices, we are seeing some of the largest growth take place. Java runs on three billion mobile devices a day, and some estimate five billion more will connect to the internet over the next ten years. But last year, a fifth of newly installed apps were opened exactly once. This is where craftsmanship will be needed the most.

Android Studio 1.2 – Android tools have received a lot of attention with the recent introduction of unit testing support and new profiling tools to help fix memory leaks and identify other performance related issues. Android Studio picks up the latest features in IntelliJ IDEA 14.1 and introduces a number of specific features for Android developers, including new build variants for handling different testing configurations.

RoboVM 1.0 Released – Two years ago, RoboVM set out to bring Java and JVM languages to iOS. It accomplishes this differently from existing solutions like J2ObjC – instead of translating Java to Objective C directly, RoboVM uses a custom AOT compiler to transform JVM bytecode to iOS machine code. RoboVM comes with developer tooling and Gradle build system integration to help you get started.

Kotlin Android Extensions – One feature you may have missed in the latest release of Kotlin is improved support for Android development. You can now access views directly with compile-time type checking, completely eliminating the need for findViewById(R.id…). Download Kotlin today and give it a try!

Anko – Anko takes Kotlin’s Android support even further with a typesafe DSL for building layouts, and new library methods for concisely referring to dialogs, tasks, services and intents. Anko’s type safety and tooling support makes Kotlin a great language for your next Android project. Download the plugin and give Anko a try today!

Open Source

One area where software has lead by example is open source. By promoting open standards and enabling others to use the same tools and frameworks that power our own software, we gain a wealth of knowledge that would take years to amass in the dark. Open source practices build more robust and secure applications, and help teach a style of programming that would only be accessible to well-trained teams.

Bazel – Build automation often promises fast, reproducible builds, but occasionally falls short on large applications. Bazel powers all of Google’s internal software, and is well-suited for building code on large, shared repositories, where everything is built from the source. Bazel joins a bevy of open sourced build tools including Gradle, pants, and buck. There is a developer discussion on Hacker News.

Fresco – Android developers have historically struggled with displaying images quickly and managing memory consumption in an efficient way. Facebook’s Fresco gives us a solution to many of these problems, by exploiting some properties of Android’s heap architecture, with a new pipeline interface. Now open source, Fresco joins several other image loading libraries, including Picasso, UIL, Glide, and Volley.

Orbit – This month BioWare released their virtual actor framework for Java, drawing inspiration from Microsoft Orleans. Designed for multiplayer game services, it can also handle traditional web services. Orbit joins a number of similar frameworks already targeting the JVM, including Akka, Vert.x and Quasar. There is a developer discussion on /r/Programming.

Community

Community is the keystone of good craftsmanship. The community of developers and the tradition of building and sharing new ideas makes software an incredibly exciting place to work. At JetBrains, we are fortunate to be part of an extraordinary developer community. This community has built some incredible things, and each month, we look forward to learning and sharing a few of them with you.

Eddy – Eddy is like Clippy, but smarter. Autocompletion has never looked so good – Eddy handles spelling errors, typos, mismatched arguments and all manner of syntax errors in Java. It also has a helpful hint mode for suggestions actions, and can be configured to only display high-confidence suggestions in the editor. You can give Eddy a try today and provide your feedback on their discussion group.

jimu Mirror – For Android developers, Mirror is the perfect plugin for prototyping your next Android application – you can think of Mirror as Live Edit for Android layouts and custom views – it even works on Chrome with Steltho. With live previews and support for incremental hot-swapping, Mirror can speed up build times and greatly improve your team’s development productivity. Give Mirror a try and let us know what you think!

How Spring achieves compatibility with Java 6, 7 and 8 – Spring puts a lot of thought into maximizing the lifespan of its APIs. For years, Spring supported functional interfaces, and so very few API changes were needed to adapt to newer versions of Java. Spring also supports a number of Java 8 API features like Optional, but still maintains a Java 6 source code internally.

Getting started with Spark – The Spark Framework (unrelated to Apache Spark) is still a third alternative to frameworks like Dropwizard and Spring Boot, for creating simple web applications in pure Java. It provides a Java 8 enabled functional API and runs on an embedded Jetty webserver for a completely self-contained, standalone deployment. Federico Tomassetti will show you how to get started.

Develop with pleasure!

This entry was posted in News & Events and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *