Java Weekly, Issue 185 – Java周刊》第185期

最后修改: 2017年 7月 13日

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

Lots of interesting writeups on Java 9 this week.

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

Here we go…

我们来了……

1. Spring and Java

1.Spring和Java

>> Introducing Spring Cloud Function [spring.io]

Spring has always adopted POJO-based approaches, now it’s time to focus on functional approaches. Spring Cloud is getting enhanced with a possibility of defining beans from function implementations – everything well integrated with Reactor.

Spring一直采用基于POJO的方法,现在是时候关注功能方法了。Spring Cloud正在得到增强,可以从函数实现中定义Bean–一切都与Reactor很好地整合。

>> How much projections can help? [blog.arnoldgalovics.com]

Using projection instead of entity-based fetching can significantly improve overall performance – which is not a surprise.

使用投影而不是基于实体的获取可以显著提高整体性能–这并不令人惊讶。

>> From Microservices to Service Blocks using Spring Cloud Function and AWS Lambda [kennybastani.com]

A practical look at Service Blocks using Spring Cloud Function and AWS Lambda. If you’re interested in seeing Spring Cloud Function in action – definitely have a look.

使用Spring Cloud Function和AWS Lambda对服务块进行了实际考察。如果你有兴趣看到Spring Cloud Function的实际应用–一定要看一看。

>> Scala vs Kotlin: Multiple Inheritance and the Diamond problem [blog.frankel.ch]

Scala and Kotlin have their own solutions to problems caused by multiple inheritance – worth having a look.

Scala和Kotlin对多继承引起的问题有自己的解决方案,值得一看。

>> Mocking HTTP, Mockito style [specto.io]

When working with microservices, we often need to mock/stub HTTP endpoints – Hoverfly is one of the better tools for doing that.

在处理微服务时,我们经常需要模拟/存贮HTTP端点–Hoverfly是一个更好的工具。

>> Support for Java 9 in IntelliJ IDEA 2017.2 [jetbrains.com]

Java 9 will be (hopefully) released soon and IDE providers are coming up with new features for their tools – this time, we can have a look at new support in Intellij IDEA.

Java 9即将发布(希望如此),IDE供应商正在为他们的工具提供新的功能–这一次,我们可以看看Intellij IDEA的新支持。

>> 5 Things You Need to Know When Using Hibernate with Mysql [thoughts-on-java.org]

Hibernate already supports most of the MySql’s features, but there are still a few things to remember that are not entirely abstracted away.

Hibernate已经支持MySql的大部分功能,但仍有一些需要记住的东西没有完全被抽象出来。

Also worth reading:

Webinars and presentations:

网络研讨会和演讲:

Time to upgrade:

升级的时间:

2. Technical

2.技术

>> Project Package Organization [dolszewski.com]

Package structure in Java projects is often neglected or applied mindlessly – here we can see a comparison of the two most popular approaches: package-by-layer vs. package-by-feature.

Java项目中的包结构经常被忽视或被无意识地应用 – 在这里我们可以看到两种最流行的方法的比较。按层打包与按特性打包

>> Converting Queries to Commands [michaelfeathers.silvrback.com]

Raising the abstraction level and passing commands to objects can result in better decoupling – and Java 8 Lambda Expressions make it much easier and concise.

提高抽象级别并将命令传递给对象可以带来更好的解耦–而Java 8的Lambda表达式让它变得更加简单和简洁。

Also worth reading:

还值得一读的是:

3. Musings

3.思索

>> How to Write Test Cases [daedtech.com]

There is no universal answer to this problem – pick one of the scientific methods, follow it, and use the best tools possible.

这个问题没有通用的答案–选择其中一种科学方法,遵循它,并尽可能使用最好的工具。

>> Why Expert Developers Still Make Mistakes [daedtech.com]

We should make mistakes – those expose lacks in our knowledge that we can eventually fix.

我们应该犯错–这些错误暴露了我们知识上的不足,我们最终可以解决。

Also worth reading:

还值得一读的是:

4. Comics

4.漫画

And my favorite Dilberts of the week:

还有本周我最喜欢的Dilberts。

>> Working sixty hours a week [dilbert.com]

>> You don’t take pride in your work [dilbert.com]

>> Leave early today [dilbert.com]

5. Pick of the Week

5 本周精选

>> A Look at JUnit 5’s Core Features & New Testing Functionality [stackify.com]