We’re drawing closer to the release of Java 9, so expect to see more and more Java 9 news as we get nearer to July. We should start to hear more too about what’s coming after Java 9, so now we have a dedicated section just for Java Future news. As usual, we’ve got a good selection of general Java tips, tricks and news, and this month’s design section is very specifically aimed at Java/OO developers. To finish up, we’ve introduced a new Events section, so if we’re in your neighbourhood you can drop in and see us.
Java 9 is obviously going to be big news all year. By now we should know that although the big ticket item is modularity, there are lots of small and interesting changes that it would be nice to understand before the release in July.
- Advanced Modular Development (Presentation)
- Support for Java 9 Modules in IntelliJ IDEA 2017.1
- Reflection vs Encapsulation – Stand Off in the Java Module System
- Using sun.misc.Unsafe in Java 9 (but you really shouldn’t, that’s kinda the point)
- Convenience Factory Methods to create immutable Collections (plus nice use of the REPL to demo)
- Deep Dive into Java 9’s Stack-Walking API
Some of the most eagerly awaited features for Java-the-language are well in the future, maybe even beyond Java 10, but we can keep an eye on them and cheer them on.
- How Project Amber Will Revolutionize Java (contains a whole bundle of interesting language changes)
- Faster Java: Do We Really Want It? (or: Do we want more frequent releases of Java?)
Java In General
There’s still plenty to understand in Java 8, and as we become more familiar with the basic concepts we can level up to use more advanced features.
- Exploring Compact Profiles (Java 8’s compromise approach pre-Project Jigsaw)
- Using Java 8 Collectors
- Optional Method Parameters (controversial… suggests different ideas to Optional, a pragmatic approach)
- Java Streams groupingBy Examples
It’s always valuable to revisit fundamentals.
- Java’s Binary Search API in Five Minutes
- Java regular expressions cheat sheet (probably the most useful cheat sheet ZT have ever produced)
- Troubleshooting Memory Issues in Java Applications
The libraries and frameworks that are available to us are constantly evolving to help us become more productive.
- Gradle’s Java Library Management (worth learning about Gradle’s approach as there are topics here that are helpful for understanding Project Jigsaw. Also gives a high level view of composite builds)
- Composite Builds with Gradle and IntelliJ IDEA 2017.1 (blog and video)
- JUnit 5: Dynamic Tests
- Using Vert.x to Connect the Browser to a Message Queue (more Vert.x below in the Design & Architecture section)
- Reactive Spring (live webinar from ZeroTurnaround)
It’s difficult to know where to draw the line that separates what interests Android developers and “other” Java developers. Firstly, let’s look at some Android specific news and articles.
- O-h yeah! What we look forward to in Android O
- Random Musings on the O Developer Preview 1
- Future of Java 8 Language Feature Support on Android
- Things I wish I knew when I started building Android SDK/Libraries
- What Unit Tests are Trying to Tell us About Activities Pt 2
- Some Resources for Learning how to Test Android Apps
- Flying Solo with Android Development
And then there’s always information that, while aimed at Android developers, may be equally interesting to those who aren’t specifically doing mobile development.
Design and Architecture
Usually this section lets us pop our head up above language-specific concerns, but this month most of the design and architecture articles are specific to Java.
- Object-Oriented Solutions: Accounts and Currencies
- Object-Oriented Solutions: Avoiding Getters
- When Is Self-Encapsulation Worth It? (almost the opposite pattern to the previous article)
- A Nice API Design Gem: Strategy Pattern With Lambdas
- The Open-Closed Principle is Often Not What You Think it Is
- Clean Architecture is Screaming – (Note: if working with pervasive frameworks like Android (for example), Clean Architecture and Hexagonal Architecture can make automated testing easier and run faster)
- Reactive Clean Architecture with Vert.x
- Modules vs. microservices (with a nod to Java 9 modularity)
- Writing good code: how to reduce the cognitive load of your code
- The Dark Path (or: Uncle Bob Argues Tests Are Mightier Than Types)
- Types Are Mightier than Tests (“Believing that more tests will make the program better is like believing that weighing yourself more often will make you lose weight.”)
JetBrains is going to be at a number of events in April that may be relevant to Java and/or enterprise developers, come and say hello, ask us questions or give feedback at our booth:
- 3-6 April: JAX DevOps, London
- 17-20 April: DockerCon, Austin, TX
- 18-21 April: Scala Days, Chicago
- 25-28 April: CraftConf, Budapest
- 28 April: ProgSCon, London (no booth, but IntelliJ IDEA advocate Trisha Gee is giving the keynote)
- IntelliJ IDEA 2017.1 is out! Including support for Java 9 modules, loads of improvements and additions for Spring Data support, better support for Spring testing, and lots more.
- The recording of our webinar Composite Builds with Gradle and IntelliJ IDEA 2017.1 is now available, that link also contains a breakdown of the IntelliJ IDEA support in written/screenshot form for those who prefer not to watch videos.
- Announcing KotlinConf – registration is opening soon, and the Call for Papers is open.
Complete this form and get Java Annotated Monthly delivered fresh to your email.