The Baeldung Weekly Review 21 – 巴尔东周报》21

最后修改: 2014年 5月 30日

1. Java and Spring


>> Java 8 StampedLocks vs. ReadWriteLocks and Synchronized

A practical look and benchmark using four modes of locking – synchronized, RW Lock, Stamped RW lock and RW optimistic locking. Nice writeup, lots to learn from this one.

使用四种锁定模式的实际考察和基准测试–同步、RW Lock、Stamped RW lock和RW optimistic locking。写得不错,从这篇报道中可以学到很多东西。

>> Parsing a file with Stream API in Java 8

Short article on parsing a file using the new Java 8 Stream API – it’s a brave new world.

关于使用新的Java 8 Stream API解析文件的短文 – 这是一个勇敢的新世界。

>> Writing Clean Tests – New Considered Harmful

Ever since this great talk on Global State and Singletons (on youtube), new has been “persona non grata” for me – this article is a great primer for some of the reasons why that is the case.

自从这个关于全球状态和单子的伟大谈话(在youtube上)之后,new对我来说是 “不受欢迎的人”–这篇文章是一个很好的引子,说明了为什么会这样的一些原因。

>> Preview Spring Security Test: HtmlUnit

This series that started a few weeks ago by introducing Spring Security 4 – this article (and the next) build on that momentum by showing how to use HtmlUnit to test your Spring MVC logic.

这个系列在几周前以介绍Spring Security 4开始–本文(和下一篇)以这个势头为基础,展示了如何使用HtmlUnit来测试你的Spring MVC逻辑

>> Preview Spring Security Test: Web Security

The new testing support for Spring MVC coming down the pike in Spring Security 4.

新的对Spring MVC的测试支持即将在Spring Security 4中出现。

2. Technical


>> Is TDD Dead?

Home base for the TDD focused series of hangouts – I covered this in the last few weeks so I won’t harp on it here – the recordings are there if you want to take a look. Part 4 will be live in a few days (on the 4th of June).


>> Rest API best(?) practices reloaded

Some solid practices to pay attention to when designing your REST API; and the cool thing about this article is that it’s clearly based on practical experience building APIs for clients – and not the “It needs to be RESTful because it just does” school of though.

设计你的REST API时,需要注意一些可靠的做法;这篇文章最酷的地方在于,它显然是基于为客户构建API的实际经验–而不是 “它需要RESTful,因为它就是这样 “的流派。

3. Musings


>> Shame is good

And in the same vein, a though about moderation and how some negative aspects of development can have a positive effect on your work.