sábado, 27 de mayo de 2017

Revista Mayo/junio JAVA MAGAZINE


Ready the May/June issue of Java Magazine, in which we cover interesting libraries you'll find useful.
In an age of frameworks, there still remains a great need for libraries. For all the words spilled on the reusability of object orientation (OO), it's clear that code reuse has been consistently successful only at the library level. It's hard to say whether that's a failure of the promises of OO or whether those promises were unlikely to ever deliver the hoped-for reusability. 

In Stephen Colebourne's article, he gives best practices for writing libraries of your own. Colebourne is the author of the celebrated Joda-Time library, which was the standard non-JDK time and date library prior to Java SE 8. In the article, he gives best practices for architecting the library and shares guidelines he has learned along the way that sometimes fly in the face of generally accepted programming precepts. Writing your own library? Then start here.

We also examine three well-designed libraries that provide useful functionality but might not be widely known. The first of these is Project Lombok, which uses annotations to greatly reduce the writing of boilerplate code--leading to fewer keystrokes and much more-readable code.

Andrés Almiray's article on the JDeferred library is a deep dive into the concepts of futures and promises, which are techniques for defining, invoking, and getting results from asynchronous operations. The built-in Java classes for futures and promises work well but can be difficult to program. JDeferred removes the difficulty and, like Lombok, leads to considerably cleaner, more readable code.
Finally, we revisit an article we ran a year ago on jsoup, which is one of the finest ways of handling HTML: parsing, scraping, manipulating, and even generating it.

If libraries are not your favorite topic, we have you covered with a detailed discussion of how to use streaming syntax rather than SQL when accessing databases. In addition, we offer our usual quiz (this time with the inclusion of questions from the entry-level exam) our calendar of events, and other goodness.

Note that our next issue will be a jumbo special issue on Java 9.

Andrew Binstock
Editor in Chief
Java Magazine