The Baeldung Weekly Review 37 – Baeldung周报》 37

最后修改: 2014年 9月 19日

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

At the very beginning of 2014 I decided to start to track my reading habits and share the best stuff here, on Baeldung.

在2014年年初,我决定开始追踪我的阅读习惯,并在这里分享最好的东西,在Baeldung

Curating my reading has made it more purposeful and diverse – and I’m hopefully providing value to you as well by allowing the best content of the week to raise to the top.

策划我的阅读使其更有目的性和多样性–我希望通过让一周中最好的内容提升到顶端,也能为你提供价值。

Now – this week is a bit out of the ordinary just because of the sheer number of good articles that came out in the last few days. Not sure what it is – maybe it’s the after-vacation burst of creativity or maybe it’s just the end of summer but the up-tick in volume is quite something.

现在–本周有点不寻常,只是因为过去几天里出现了大量的好文章。不知道是什么原因–也许是假期过后创造力的爆发,也许只是夏天的结束,但数量的上升是相当重要的。

Here we go…

我们来了……

1. Java

1.Java

>> A beginner’s guide to database locking and the lost update phenomena

Let’s start the review with a strong and well researched article on database locking and “Lost Update” – lots to take in.

让我们以一篇关于数据库锁定和 “丢失的更新”的强有力的研究文章开始审查–有很多东西需要吸收。

I’ve personally followed this series and learned a lot – and we’ve been tracking the entire progress here, in the weekly reviews as well. While they’re all good, this one is one of the best of the entire series.

我个人一直在关注这个系列,学到了很多东西–我们在这里也一直在跟踪整个进展,在每周的评论中。虽然它们都很好,但这一次是整个系列中最好的一次。

>> Why You Should NOT Implement Layered Architectures

This piece will be controversial (it probably already has been by now). Personally – having seen a lot of systems architected with a lot of unnecessary complexity (why don’t we put a message queue in there?) – I can certainly get behind the idea of the article.

这篇文章会引起争议(现在可能已经有争议了)。就我个人而言,我见过很多系统在架构上有很多不必要的复杂性(为什么我们不在里面放一个消息队列?

That being said – it’s not a black and white type of thing – and you can lean to far towards over-simplification as wel. To use an example from the article – you probably don’t need a dozen types of insurance, but it’s still a good idea to insure your house and your health.

也就是说,这不是一件黑白分明的事情–而且你也可以倾向于过度简化。用文章中的一个例子来说–你可能不需要十几种保险,但为你的房子和健康投保仍然是个好主意。

>> This is the Final Discussion!

A good discussion on final (the keyword). If only final was the default – oh how the woes of man would have been lessened. Joking aside – if you aren’t already giving final a lot of though when coding, go read this one.

关于final(关键词)的良好讨论。如果final是默认的就好了–哦,人类的苦难就会减少。撇开玩笑不谈–如果你在编码时还没有对final给予足够的重视,那就去读读这篇文章。

>> lambdas and side effects

A handful of interesting corner cases with lambdas.

少数有趣的角落案例与lambdas。

Finally – all videos of the JavaZone conference are out – and there’s some great one in there:

最后–JavaZone会议的所有视频都出来了–其中有一些很棒的视频。

>> JavaZone 2014 – 90 presentations, 60 lightning talks

2. Spring

2.Spring

>> Preview Spring Security WebSocket Support & Sessions

I wasn’t aware of the Spring Session effort until I read this post – it’s a broad effort to basically replace the container managed sessions entirely with a new session implementation. That’s some goal – and it looks like it has some very interesting practical advantages, at least for one class of problems.

在看到这篇帖子之前,我并不知道Spring Session的努力–这是一项广泛的努力,基本上用一个新的会话实现完全取代容器管理的会话。这是一个很好的目标–而且看起来它有一些非常有趣的实际优势,至少对于一类问题来说。

>> Using @ConfigurationProperties in Spring Boot

Very cool alternative to the standard way of doing properties in Spring – I can definitely see how this Spring Boot option might come in handy.

非常酷的在Spring中做属性的标准方式的替代方案–我绝对可以看到这个Spring Boot选项如何派上用场。

>> Testing mail code in Spring Boot application

A Spring Boot exploration, specifically how to set up your email logic and test it with some interesting looking mail tools that look to facilitate isolated unit testing quite a bit – nice one.

一个Spring Boot的探索,特别是如何设置你的邮件逻辑并测试它,使用一些有趣的邮件工具,看起来相当有利于孤立的单元测试 – 不错。

>> Customizing HttpMessageConverters with Spring Boot and Spring MVC

Yet another way that Spring Boot makes things easier – configuring the Http Message Converters in the system. I’ve been wanting to do this in Spring for a long time – it’s great that it’s now actually possible.

这是Spring Boot让事情变得更简单的另一种方式–配置系统中的Http消息转换器。我想在Spring中这样做已经很久了–现在能做到这一点真是太好了。

>> Juergen Hoeller Gets Personal on Spring 4, Java 8, Spring XD, and all things Spring

An good interview with Juergen Hoeller (co-founder of Spring) going through a lot of engaging questions, some that you might not expect. An interesting explanation of conditional configuration to look forward to if you decide to watch the interview.

对Juergen Hoeller(Spring的联合创始人)的采访很不错,通过很多吸引人的问题,有些是你可能想不到的。如果你决定观看采访,可以期待一下对条件配置的有趣解释。

>> Webinar Replay: Building “Bootiful” Microservices with Spring Boot

Finally a webminar on microservices that I’m going to watch over the weekend. If you’ve been following my weekly reviews, you already know that microservices aren’t easy to pull off – there are a lot of potential pitfalls when the system is no longer trivial.

最后一个关于微服务的webminar,我准备在周末观看。如果你一直关注我的周评,你已经知道微服务并不容易完成–当系统不再琐碎时,有很多潜在的陷阱。

3. Technical and Musings

3.技术和思考

>> Load-Testing Guidelines

Fantastic article on load testing practices and considerations. Even if you’ve been doing this for a while – it’s a good idea to read this one.

关于负载测试实践和注意事项的精彩文章。即使你已经做了一段时间了–读一读这篇文章也是个好主意。

>> “I Like Mocks, but I Distrust Spies”

A deep dive into how spies are used by novice developers and how these practices change and should change with the experience level of the developer. Some useful insights I’m planning to work into my own practice from this article.

深入探讨了新手开发者是如何使用间谍的,以及这些做法是如何随着开发者的经验水平而改变和应该改变。我打算将这篇文章中的一些有用的见解运用到我自己的实践中。

>> Rapid Fire Craftsmanship Tips

Captain Obvious here – improving your craft is an ongoing thing – there’s no “Arrival”. Here’s a good set of tips on how to do that.

这里是明显的队长–提高你的技艺是一件持续的事情–没有 “到达”。这里有一套关于如何做到这一点的好提示。

>> One-Phase-Commit – Fast Transactions For In-Memory Caches

Going for a “Two Phase Commit” to a light “One Phase Commit” operation – which of course comes with a good speed advantage – another interesting read if you’re doing work with in-memory caches.

从 “两阶段提交 “到轻量级的 “单阶段提交 “操作–这当然会带来很好的速度优势–如果你在做内存缓存的工作,这是另一个有趣的阅读

I’m personally not doing that right now, but I have in the past and they’re super helpful if set up correctly, and entirely annoying if they’re not.

我个人现在没有这样做,但我过去曾这样做,如果设置正确,它们是超级有用的,如果不正确,则完全令人讨厌。

4. Comics

4.漫画

Can one grow tired of XKCD goodness:

一个人可以对XKCD的好东西感到厌倦。

>> Campfire

>> Traveling Salesman Problem

>> Password Reuse

I say “Nay“.

我说”Nay“。

5. Pick of the Week

5 本周精选

This week I though we’d try something new – am introducing a new “Pick of the Week” section in my “Weekly Review”. The interesting part is that I’m going to make this exclusive to my email list subscribers.

本周我想尝试一些新东西–在我的 “每周回顾 “中引入一个新的 “每周精选 “部分。有趣的是,我打算让我的电子邮件列表订阅者独享这个栏目。

So – if you came to this article from my email list, you have the pick already – hope you enjoyed it 🙂

所以–如果你从我的邮件列表中看到这篇文章,你已经有了选题–希望你喜欢它 🙂。

If not – you can of course subscribe to the list to get the next one.

如果没有–你当然可以订阅该名单,以获得下一个。

Cheers.

干杯。