Java Web Weekly, Issue 169 – Java网络周刊》第169期

最后修改: 2017年 3月 23日

中文/混合/英文(键盘快捷键:t)

Lots of interesting writeups on Java 9 this week.

本周有很多关于Java 9的有趣文章。

Here we go…

我们来了……

1. Spring and Java

1.Spring和Java

>> A Nice API Design Gem: Strategy Pattern With Lambdas [jooq.org]

The introduction of lambda expressions and functional interfaces allows us to rethink the design and simplify the Strategy Design Pattern (and many other).

lambda表达式和功能接口的引入使我们能够重新思考设计并简化策略设计模式(以及许多其他的)。

>> Spring Boot and Security Events with Actuator [codeleak.pl]

Spring Boot Actuator comes with user-friendly support for handling audit and security events.

Spring Boot Actuator对处理审计和安全事件提供了用户友好的支持。

Simply put, all we need to do is to define a listener for the predefined events.

简单地说,我们所需要做的就是为预定义的事件定义一个监听器。

>> Project Amber will revolutionize Java [sitepoint.com]

A lot of new changes are finally coming to Java. These include Local Variable Type Inference, Generic Enums, Data Classes and Pattern Matching.

很多新的变化最终将出现在Java中。这些变化包括局部变量类型推理、通用枚举、数据类和模式匹配。

“We’ve had those in other languages ten years ago” posts are coming.

“我们在十年前就有了其他语言的这些东西 “的帖子正在到来。

>> Fully configurable mappings for Spring MVC [frankel.ch]

With a little bit of effort, we can bring the features of Boot Actuators to non-Boot applications as well.

只要稍加努力,我们也可以把Boot Actuators的功能带到非Boot应用中。

>> Spring Data Improvements in IntelliJ IDEA 2017.1 [jetbrains.com]

IntelliJ IDEA is getting, even more, Spring-oriented features.

IntelliJ IDEA正在获得,甚至更多,面向Spring的功能。

>> The Open-Closed Principle is Often Not What You Think it Is [jooq.org]

The pragmatic approach to the Open-Closed Principle does not involve aiming for openness at any costs.

对 “开放-封闭 “原则的务实态度并不包括不惜一切代价地追求开放性。

>> JDK 9 Rampdown Phase 2: Process proposal [mail.openjdk.java.net]

The 2nd phase of JDK 9 rampdown just started.

JDK 9第二阶段的缩减工作刚刚开始。

>> Better tools for adjusting to strong encapsulation [mail.openjdk.java.net]

The internal APIs in the JDK should not have been used but they were by multiple frameworks which are experiencing errors now.

JDK中的内部API不应该被使用,但它们被多个框架使用了,这些框架现在正在经历错误。

JDK 9 will feature a special workaround for these situations.

JDK 9将针对这些情况提供特殊的解决方法

Also worth reading:

Webinars and presentations:

网络研讨会和演讲:

Time to upgrade:

升级的时间:

2. Technical

2.技术

>> Acing the technical interview [aphyr.com]

That’s how you make interviewers hate you 🙂

这就是你如何让面试官讨厌你的方法 🙂

>> Taking a Pragmatic View of Isolated Tests [thecodewhisperer.com]

Writing isolated tests can greatly influence the design of your system by exposing excessive coupling and insufficient cohesion.

编写孤立的测试可以通过暴露出过度的耦合和不充分的内聚力而大大影响你的系统设计

>> “Infinity” is a Bad Default Timeout [techblog.bozho.net]

Yeah, setting your timeouts to infinity or ignoring them is very likely not a good idea.

是的,将你的超时设置为无限大或忽略它们,很可能不是一个好主意。

>> Don’t forget about value objects! [plainoldobjects.com]

Value Objects are a great way of dealing with the String type abuse. Working in a strongly typed language, it makes a lot of sense to leverage these.

Value Objects是处理String类型滥用的一个好方法。在一个强类型的语言中工作,利用这些类型是非常有意义的。

Also worth reading:

3. Musings

3.思索

>> The product Is – Is not – Does – Does not [martinfowler.com]

Sometimes it’s easier to explore and explain an idea by first clarifying what it’s not 🙂

有时,首先澄清一个想法不是什么,会更容易探索和解释这个想法 🙂。

>> Does software performance still matter? [lemire.me]

Software performance is critical and should not be neglected, but at the end of the day, it is the absolute value of the code that counts.

软件性能至关重要,不应忽视,但在一天结束时,重要的是代码的绝对价值。

>> Don’t Just Flag It — Fix It! [daedtech.com]

Information about problems, without an actual solution – it is not a good way to go.

关于问题的信息,没有实际的解决方案–这不是一个好办法。

Also worth reading:

还值得一读的是:

4. Comics

4.漫画

And my favorite Dilberts of the week:

还有本周我最喜欢的Dilberts。

>> How’d you get the black eye [dilbert.com]

>> My mom raised me by putting a thermos of coffee in my crib [dilbert.com]

>> An aggressive recruiter looking for passive job seekers [dilbert.com]

5. Pick of the Week

5 本周精选

>> Open Source (Almost) Everything [tom.preston-werner.com]