Modern Java in Action - Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft

Modern Java in Action

Raoul-Gabriel Urma, Mario Fusco, Alan Mycroft

出版时间

2018-11-15

ISBN

9781617293566

评分

★★★★★
书籍介绍
Manning's bestselling Java 8 book has been revised for Java 9! In Java 8 and 9 in Action, you'll build on your existing Java language skills with the newest features and techniques. After a practical introduction to lambdas using real-world Java code, you'll dive into the Streams API. Next, you'll discover event-driven reactive programming and see how the Java Module System (aka Jigsaw) will help change how you structure your code. This book also explains functional programming in Java, working with collections, and more. "This is an excellent introduction to the newest features in Java 8 and 9. It provides clear and concise examples to help clarify how to use Java's newest features such as streams, lambda functions, and reactive streams." ~ Meredith Godar "Hands on Java 8 and 9, simple and elegantly explained." ~ Deepak Bhaskaran
AI导读
核心看点
  • 系统梳理Java 8至9新特性,涵盖Lambda与Stream API
  • 深入讲解函数式编程思维及响应式编程在Java中的应用
  • 提供大量实战代码示例,指导如何重构传统Java代码
适合谁读
  • 希望掌握Java 8及后续版本现代化特性的Java开发者
  • 有意从命令式编程转向函数式编程思维的程序员
  • 需要快速了解Java Stream及并发新特性的技术人员
读前提醒
  • 本书内容偏向语言特性介绍,适合快速通读以建立知识框架
  • 若已精通Scala等函数式语言,部分基础内容可快速略过
  • 建议结合书中代码示例动手实践,以加深对新API的理解
读者共识
  • 内容通俗易懂,由浅入深,是学习Java新特性的优秀入门书
  • 部分读者认为内容略显啰嗦,信息密度对资深开发者稍低
  • 框架完整思路清晰,能显著提升代码可读性与开发效率

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "In fact, using synchronized across multiple processing cores is far more expensive than we often expect, because synchronization forces code to execute sequentially, which works against the goal of parallelism."
  • "同步API与异步API 同步API其实只是对传统方法调用的另一种称呼:你调用了某个方法,调用方在被调用方 运行的过程中会等待,被调用方运行结束返回,调用方取得被调用方的返回值并继续运行。即 使调用方和被调用方在不同的线程中运行,调用方还是需要等待被调用方结束运行,这就是阻 塞式调用这个名词的由来。 与此相反, 异步API会直接返回,或者至少在被调用方计算完成之前,将它剩余的计算任 务交给另一个线程去做,该线程和调用方是异步的——这就是非阻塞式调用的由来。执行剩余 计算任务的线程会将它的计算结果返回给调用方。返回的方式要么是通过回调函数,要么是由 调用方再次执行一个“等待,直到计算完成”的方法调"
  • "并行——使用流还是CompletableFutures? 目前为止,你已经知道对集合进行并行计算有两种方式:要么将其转化为并行流,利用map 这样的操作开展工作,要么枚举出集合中的每一个元素,创建新的线程,在CompletableFuture内对其进行操作。后者提供了更多的灵活性,你可以调整线程池的大小,而这能帮助 你确保整体的计算不会因为线程都在等待I/O而发生阻塞。 我们对使用这些API的建议如下。 ❑如果你进行的是计算密集型的操作,并且没有I/O,那么推荐使用Stream接口,因为实 现简单,同时效率也可能是最高的(如果所有的线程都是计算密集型的,那就没有必要 创建比处理器核数更多的线程"
  • "第二,要求它是 Predicate<Apple>(目标类型)对象的第二个正式参数"
  • "名叫开放服务网关协议(open service gateway initiative, OGSi)"
作者简介
Raoul-Gabriel Urma is CEO and co-founder of Cambridge Spark, a leading learning community for data scientists and developers in UK. In addition, he is also Chairman and co-founder of Cambridge Coding Academy, a growing community of young coders and pre-university students. Raoul is author of the bestselling programming book "Java 8 in Action" which sold over 20,000 copies globally. Raoul completed a PhD in Computer Science at the University of Cambridge. In addition, he holds a MEng in Computer Science from Imperial College London and graduated with first class honours having won several prizes for technical innovation. Raoul has delivered over 100 technical talks at international conferences. He has worked for Google, eBay, Oracle, and Goldman Sachs. He is also a Fellow of the Royal Society of Arts. Mario Fusco is a senior software engineer at Red Hat working on Drools, the JBoss rule engine. He created the open source library lambdaj, an internal Java DSL for manipulating collections in a functional way. Alan Mycroft is Professor of Computer Science at the University of Cambridge, where he researches programming languages, their semantics, optimization and implementation. He is a co-founder and Trustee of the Raspberry Pi Foundation.
用户评论
info density is so low and language is not engaging. almost a waste of time.
这个读的挺快的
写得很好,由浅入深,例子生动,探讨比较多种思路。Java确实在变得更好用,与时俱进。
函数式编程讲得很透彻,不过讲scala的部分有点过时了。基本上还是依靠java8的stream和functional展开了书的内容。侧重点在语言规范,其他的诸如concurrenthashmap重写这种细节根本就没找到……
写得很细,也比较简单和全面,值得读
英文,,,有中文还是读中文吧
Java程序员必读。
3.5 星,是很通俗易懂,但信息量实在不多,尤其是接触过其它语言中类似的Stream和FP实现之后。
收藏