The Baeldung Weekly Review 22 – Baeldung周报》22

最后修改: 2014年 6月 6日

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

1. Java and Spring

1.Java和Spring

>> Java 8 Friday: Most Internal DSLs are Outdated

A interesting take on deprecating existing DSLs in favor of using Java 8 and lambdas. I think that as a language evolves and incorporates more powerful construct, it makes a lot of sense to let go of some of the cruft. These libraries and quite a lot of patterns as well are – simply put – created to work around the limitations of the language. Most of them don’t exist in other languages, and it’s a good idea to move away from them in Java as well, now that we no longer have these limitations.
That being said, I like hamcrest – it’s going to be unfortunate to let it go.

关于删减现有的DSL,转而使用Java 8和lambdas的一个有趣的观点。我认为,随着语言的发展和更强大的构造的加入,抛开一些繁琐的东西是非常有意义的。这些库和相当多的模式都是–简单地说–为了绕过语言的限制而创建的。它们中的大多数在其他语言中并不存在,而且在Java中远离它们也是一个好主意,因为现在我们不再有这些限制。
也就是说,我喜欢 hamcrest – 放弃它将是很不幸的。

>> Writing Clean Tests – Replace Assertions with a Domain-Specific Language

Petri’s series about clean code and good testing practices is going strong. This one is about moving away from the standard, data-centric assertions and towards a custom assertion DLS that makes your code a lot of readable.

Petri关于干净的代码和良好的测试实践的系列正在继续。这篇是关于远离标准的、以数据为中心的断言,转向自定义断言DLS,使你的代码更容易阅读。

>> Using new when.js 3.2.2 to build a front end for Spring Data REST

Building a front end for a REST API is a non-trivial task, and this article looks like a solid effort of doing just that.

为REST API构建前端是一项非同小可的任务,而这篇文章看起来是在做这方面的坚实努力。

>> Producing a SOAP web service

The first community written guide over on spring.io – Maciej wrote a solid and detailed article on building a SOAP service with the Spring web service support.

Spring.io上的第一个社区指南–Maciej写了一篇关于利用Spring网络服务支持构建SOAP服务的坚实而详细的文章。

>> The minimal configuration for testing Hibernate

This is an intro to a simple Hibernate setup, and probably a first post in what is going to become a Hibernate centric series – and a course.

这是一个关于简单的Hibernate设置的介绍,也可能是即将成为以Hibernate为中心的系列的第一篇文章–以及一个课程。

2. Technical

2.技术

>> Chrome and Stale-While-Revalidate

Good read on where the HTTP protocol is going and how performance on the web should really improve once these mechanism will actually start getting used. It looks to me going first (once Chrome support is done) can be a competitive advantage shaving a few requests off your page load.

很好地解读了HTTP协议的发展方向,以及一旦这些机制真正开始被使用,网络的性能应该如何真正改善。在我看来,率先使用(一旦Chrome支持完成)可以成为竞争优势,从你的页面加载中减少一些请求。

3. Musings

3.思索

>> There is more to it than code

Part of growing up as a developer involves intuitively, doing things other than development. If this is obvious to you – no need to read the article, but if this is news, go on and have a read.

作为一个开发者,成长的一部分涉及到直觉,做开发以外的事情。如果这对你来说是显而易见的–不需要阅读这篇文章,但如果这是个新闻,就继续阅读吧。

>> Armchair Tour Guides and Presenters

This isn’t going to be news to a lot of people – do think before you speak, especially in a public venue – but it was something I enjoyed reading, so here it is.

这对很多人来说并不是什么新闻–说话前先想一想,尤其是在公共场合–但这是我喜欢读的东西,所以就在这里。

>> Starting to Unit Test: Not as Hard as You’d Think

An way into unit testing – if you’re a reader here and you’re not doing unit testing, this looks like a good way to finally get into it.

进入单元测试的方法 – 如果你是这里的读者,而你没有做单元测试,这看起来是一个最终进入单元测试的好方法