万本电子书0元读

万本电子书0元读

顶部广告

Java 9: Building Robust Modular Applications电子书

售       价:¥

3人正在读 | 0人评论 9.8

作       者:Dr. Edward Lavieri,Peter Verhas,Jason Lee

出  版  社:Packt Publishing

出版时间:2018-04-13

字       数:104.6万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Mastering advanced features of Java and implement them to build amazing projects About This Book ? Take advantage of Java's new modularity features to write real-world applications that solve a variety of problems ? Explore the major concepts introduced with Java 9, including modular programming, HTTP 2.0, API changes, and more ? Get to grips with tools, techniques and best practices to enhance application development Who This Book Is For This learning path is for Java developers who are looking to move a level up and learn how to build robust applications in the latest version of Java. What You Will Learn ? Package Java applications as modules using the Java Platform Module System ? Implement process management in Java using the all-new process handling API ? Integrate your applications with third-party services in the cloud ? Interact with mail servers, using JavaMail to build an application that filters spam messages ? Use JavaFX to build rich GUI-based applications, which are an essential element of application development ? Leverage the possibilities provided by the newly introduced Java shell ? Test your application's effectiveness with the JVM harness ? See how Java 9 provides support for the HTTP 2.0 standard In Detail Java 9 and its new features add to the richness of the language; Java is one of the languages most used by developers to build robust software applications. Java 9 comes with a special emphasis on modularity with its integration with Jigsaw. This course is your one-stop guide to mastering the language. You'll be provided with an overview and explanation of the new features introduced in Java 9 and the importance of the new APIs and enhancements. Some new features of Java 9 are ground-breaking; if you are an experienced programmer, you will be able to make your enterprise applications leaner by learning these new features. You'll be provided with practical guidance in applying your newly acquired knowledge of Java 9 and further information on future developments of the Java platform. This course will improve your productivity, making your applications faster. Next, you'll go on to implement everything you've learned by building 10 cool projects. You will learn to build an email filter that separates spam messages from all your inboxes, a social media aggregator app that will help you efficiently track various feeds, and a microservice for a client/server note application, to name just a few. By the end of this course, you will be well acquainted with Java 9 features and able to build your own applications and projects. This Learning Path contains the best content from the following two recently published Packt products: ? Mastering Java 9 ? Java 9 Programming Blueprints Style and approach This practical guide is filled with real-world examples. Its projects will help you get acquainted with concepts in depth.
目录展开

Title Page - Courses

Copyright and Credits - Courses

Java 9: Building Robust Modular Applications

Packt Upsell - Courses

Why subscribe?

PacktPub.com

Preface

Who this learning path is for

What this learning path covers

To get the most out of this learning path

Download the example code files

Conventions used

Get in touch

Reviews

Mastering Java 9

The Java 9 Landscape

Java 9 at 20,000 feet

Breaking the monolith

Playing around with the Java Shell

Taking control of external processes

Boosting performance with G1

Measuring performance with JMH

Getting started with HTTP 2.0

Encompassing reactive programming

Expanding the wish list

Summary

Discovering Java 9

Improved Contended Locking [JEP 143]

Improvement goals

Segmented code cache [JEP 197]

Memory allocation

Smart Java compilation, phase two [JEP 199]

Resolving Lint and Doclint warnings [JEP 212]

Tiered attribution for javac [JEP 215]

Annotations pipeline 2.0 [JEP 217]

New version-string scheme [JEP 223]

Generating run-time compiler tests automatically [JEP 233]

Testing class-file attributes generated by Javac [JEP 235]

Storing interned strings in CDS archives [JEP 250]

The problem

The solution

Preparing JavaFX UI controls and CSS APIs for modularization [JEP 253]

JavaFX overview

Implications for Java 9

Compact strings [JEP 254]

Pre-Java 9 status

New with Java 9

Merging selected Xerces 2.11.0 updates into JAXP [JEP 255]

Updating JavaFX/Media to newer version of GStreamer [JEP 257]

HarfBuzz Font-Layout Engine [JEP 258]

HiDPI graphics on Windows and Linux [JEP 263]

Marlin graphics renderer [JEP 265]

Unicode 8.0.0 [JEP 267]

New in Unicode 8.0.0

Updated Classes in Java 9

Reserved stack areas for critical sections [JEP 270]

The pre-Java 9 situation

New in Java 9

Dynamic linking of language-defined object models [JEP 276]

Proof of concept

Additional tests for humongous objects in G1 [JEP 278]

Improving test-failure troubleshooting [JEP 279]

Environmental information

Java process information

Optimizing string concatenation [JEP 280]

HotSpot C++ unit-test framework [JEP 281]

Enabling GTK 3 on Linux [JEP 283]

New HotSpot build system [JEP 284]

Summary

Java 9 Language Enhancements

Working with variable handlers [JEP 193]

Working with the AtoMiC Toolkit

Using the sun.misc.Unsafe class

Eliding depreciation warnings on import statements [JEP 211]

Milling Project Coin [JEP 213]

Using the @SafeVarargs annotation

The try-with-resource statement

Using the diamond operator

Discontinuing use of the underscore

Making use of private interface methods

Processing import statements correctly [JEP 216]

Summary

Building Modular Applications with Java 9

A modular primer

Reviewing Java's platform module system [JEP-200]

Modularizing JDK source code [JEP-201]

Pre-Java 9 JDK source code organization

Development tools

Deployment

Internationalization

Monitoring

RMI

Security

Troubleshooting

Web services

JavaFX tools

Java runtime environment

Source code

Libraries

C header files

Database

JDK source code reorganized

Understanding modular run-time images [JEP-220]

Runtime format adoption

Runtime image restructure

Supporting common operations

De-privileging JDK classes

Preserving existing behaviors

Getting to know the module system [JEP-261]

Module paths

Access-control boundary violations

Runtime

Modular Java application packaging [JEP-275]

Advanced look at the Java Linker

Java Packager options

JLink - The Java Linker [JEP-282]

Encapsulating most internal APIs [JEP-260]

Summary

Migrating Applications to Java 9

Quick review of Project Jigsaw

Classpath

The monolithic nature of the JDK

How modules fit into the Java landscape

Base module

Reliable configuration

Strong encapsulation

Migration planning

Testing a simple Java application

Potential migration issues

The JRE

Access to internal APIs

Accessing internal JARs

JAR URL depreciation

Extension mechanism

The JDK's modularization

Advice from Oracle

Preparatory steps

Getting the JDK 9 early access build

Running your program before recompiling

Updating third-party libraries and tools

Compiling your application

Pre-Java 9 -source and -target options

Java 9 -source and -target options

Running jdeps on your code

Breaking encapsulation

The --add-opens option

The --add-exports option

The --permit-illegal-access option

Runtime image changes

Java version schema

JDK and JRE layout

What has been removed

Updated garbage collection

Deployment

JRE version selection

Serialized applets

JNLP update

Nested resources

FX XML extension

JNLP file syntax

Numeric version comparison

Useful tools

Java environment - jEnv

Maven

Obtaining the M2Eclipse IDE

Summary

Experimenting with the Java Shell

What is JShell?

Getting Started with JShell

Practical uses of JShell

Feedback modes

Creating a custom feedback mode

Listing your assets

Editing in the JShell

Modifying text

Basic navigation

Historical navigation

Advanced editing commands

Working with scripts

Start up scripts

Loading scripts

Saving scripts

Advanced scripting with JShell

Summary

Leveraging the New Default G1 Garbage Collector

Overview of garbage collection

Object life cycle

Object creation

Object mid-life

Object destruction

Garbage collection algorithms

Mark and sweep

Concurrent mark sweep (CMS) garbage collection

Serial garbage collection

Parallel garbage collection

G1 garbage collection

Garbage collection options

Java methods relevant to garbage collection

The System.gc() method

The finalize() method

Pre-Java 9 garbage collection

Visualizing garbage collection

Garbage collection upgrades in Java 8

Case study - Games written with Java

Collecting garbage with the new Java platform

Default garbage collection

Depreciated garbage collection combinations

Unified garbage collection logging

Unified JVM logging (JEP-158)

Tags

Levels

Decorations

Output

Command-line options

Unified GC logging (JEP-271)

Garbage collection logging options

The gc tag

Macros

Additional considerations

Persistent issues

Making objects eligible for garbage collection

Summary

Microbenchmarking Applications with JMH

Microbenchmarking overview

Approach to using JMH

Installing Java 9 and Eclipse with Java 9 support

Hands-on experiment

Microbenchmarking with Maven

Benchmarking options

Modes

Time units

Techniques for avoiding microbenchmarking pitfalls

Power management

OS schedulers

Time sharing

Eliminating dead-code and constant folding

Run-to-run variance

Cache capacity

Summary

Making Use of the ProcessHandle API

What are processes?

The new ProcessHandle interface

Getting the PID of the current process

Getting information about a process

Listing processes

Listing children

Listing descendants

Listing all processes

Waiting for processes

Terminating processes

A small process controller application

Main class

Parameters class

The ParamsAndHandle class

The ControlDaemon class

Summary

Fine-Grained Stack Tracing

Overview of the Java Stack

The importance of stack information

Example - Restricting callers

Example - Getting logger for caller

Working with StackWalker

Getting an instance of StackWalker

RETAIN_CLASS_REFERENCE

SHOW_REFLECT_FRAMES

SHOW_HIDDEN_FRAMES

Final thoughts on enum constants

Accessing classes

Walking methods

StackFrame

Performance

Summary

New Tools and Tool Enhancements

The new HTTP client [JEP-110]

The HTTP client before Java 9

Java 9's new HTTP client

New API limitations

Simplified Doclet API [JEP-221]

The pre-Java 9 Doclet API

API enums

API classes

API interfaces

Problems with the pre-existing Doclet API

Java 9's Doclet API

Compiler tree API

Language model API

The AnnotatedConstruct interface

The SourceVersion enum

The UnknownEntityException exception

HTML5 Javadoc [JEP-224]

Javadoc search [JEP-225]

Introducing camel case search

Remove launch-time JRE version selection [JEP-231]

Parser API for Nashorn [JEP-236]

Nashorn

Using Nashorn as a command-line tool

Using Nashorn as an embedded interpreter

EMCAScript

Parser API

Multi-release JAR files [JEP-238]

Identifying multi-release JAR files

Related JDK changes

Java-level JVM compiler interface [JEP-243]

BeanInfo annotations [JEP-256]

JavaBean

BeanProperty

SwingContainer

BeanInfo classes

TIFF image input/output [JEP-262]

Platform logging API and service [JEP-264]

The java.util.logging package

Logging in Java 9

XML Catalogs [JEP-268]

The OASIS XML Catalog standard

JAXP processors

XML Catalogs prior to Java 9

Java 9 platform changes

Convenience factory methods for collections [JEP-269]

Using collections before Java 9

Using new collection literals

Platform-specific desktop features [JEP-272]

Enhanced method handles [JEP-274]

Reason for the enhancement

Lookup functions

Argument handling

Additional combinations

Enhanced deprecation [JEP-277]

What the @Deprecated annotation really means

Summary

Concurrency and Reactive Programming

Reactive Programming

Reactive programming standardization

The New Flow API

The Flow.Publisher interface

The Flow.Subscriber interface

The Flow.Subscription interface

The Flow.Processor interface

Sample implementation

Additional Concurrency Updates

Java concurrency

Concurrency explained

System configurations

Java threads

Concurrency improvements

CompletableFuture API enhancements

Class details

Enhancements

Spin-Wait Hints

Summary

Security Enhancements

Datagram Transport Layer Security

DTLS protocol version 1.0

DTLS protocol version 1.2

DTLS support in Java 9

Creating PKCS12 keystores

Keystore primer

Java Keystore (JKS)

Builder

The CallbackHandlerProtection class

The PasswordProtection class

The PrivateKeyEntry class

The SecretKeyEntry class

The TrustedCertificateEntry class

PKCS12 default in Java 9

Improving security application performance

Security policy enforcement

Permission evaluation

The java.Security.CodeSource package

Package checking algorithm

TLS application-layer protocol negotiation extension

TLS ALPN extension

The javax.net.ssl package

The java.net.ssl package extension

Leveraging CPU instructions for GHASH and RSA

Hashing

OCSP stapling for TLS

OCSP stapling primer

Changes for the Java 9 platform

DRBG-based SecureRandom implementations

Summary

Command Line Flags

Unified JVM Logging [JEP 158]

Command-line options

Decorations

Levels

Output

Tags

Compiler control [JEP 165]

Compilation modes

C1 compilation mode

C2 compilation mode

Tiered compilation

Compiler control in Java 9

Diagnostic commands [JEP 228]

Heap profiling agent [JEP 240]

Removing your JHAT [JEP 241]

JVM command-line flag argument validation [JEP 245]

Compile for older platform versions [JEP 247]

Summary

Best Practices In Java 9

Support for UTF-8

The ResourceBundle class

The nested class

Fields and constructors

Methods

Changes in Java 9

Unicode 7.0.0

The java.lang package

The java.text package

Additional significance

The Linux/AArch64 port

Multi-resolution Images

Common Locale Data Repository (CLDR)

Summary

Future Directions

Future Changes to the JDK

JDK changes targeted for Java 10

Repository consolidation

Native-header tool removal

JDK-related submitted proposals

Parallelize the Full GC Phase in CMS

REST APIs for JMX

Support heap allocation

JDK-related drafted proposals

Finalization promptness

Java memory model

Foreign Function Interfaces

Isolated methods

Reducing metaspace waste

Improving IPv6 support

Unboxed argument lists for method handles

Enhanced MandelblotSet demo using value types

Efficient array comparison intrinsics

Future changes to the Java Compiler

Policy for retiring javac -source and -target options

Pluggable static analyzers

Future Changes to the Java Virtual Machine

JVM-related submitted proposals

Container aware Java

Enable execution of Java methods on GPU

Epsilon GC - The arbitrarily low overhead garbage (non-) collector

JVM-related drafted proposals

Provide stable USDT probe points on JVM compiled methods

Concurrent monitor deflation

Provide a low-overhead way of sampling Java heap allocations

Diagnostic Command Framework

Enhanced Class Redefinition

Enable NUMA mode by default when appropriate

Value objects

Align JVM Access Checks

Future Changes to JavaX

JMX specific annotations for registration of managed resources

Modernize the GTK3 Look and Feel Implementation

Ongoing Special Projects

Annotations pipeline 2.0

Audio Synthesis Engine

Caciocavallo

Common VM Interface

Compiler Grammar

Da Vinci Machine

Device I/O

Graal

HarfBuzz Integration

Kona

OpenJFX

Panama

Shenandoah

Summary

Java 9 Programming Blueprints

Introduction

New features in Java 8

Lambdas

Streams

The new java.time package

Default methods

New features in Java 9

Java Platform Module System/Project Jigsaw

Process handling API

Concurrency changes

REPL

Projects

Process Viewer/Manager

Duplicate File Finder

Date Calculator

Social Media Aggregator

Email filter

JavaFX photo management

A client/server note application

Serverless Java

Android desktop synchronization client

Getting started

Summary

Managing Processes in Java

Creating a project

Bootstrapping the application

Defining the user interface

Initializing the user interface

Adding menus

Updating the process list

Summary

Duplicate File Finder

Getting started

Building the library

Concurrent Java with a Future interface

Modern database access with JPA

Building the command-line interface

Building the graphical user interface

Summary

Date Calculator

Getting started

Building the library

A timely interlude

Duration

Period

Clock

Instant

LocalDate

LocalTime

LocalDateTime

ZonedDateTime

Back to our code

A brief interlude on testing

Building the command-line interface

Summary

Sunago - A Social Media Aggregator

Getting started

Setting up the user interface

Setting up the controller

Writing the model class

Finishing up the controller

Adding an image for the item

Building the preferences user interface

Saving user preferences

Plugins and extensions with the Service Provider Interface

Resource handling with try-with-resources

Adding a network - Twitter

Registering as a Twitter developer

Adding Twitter preferences to Sunago

OAuth and logging on to Twitter

Adding a model for Twitter

Implementing a Twitter client

A brief look at internationalization and localization

Making our JAR file fat

Adding a refresh button

Adding another network - Instagram

Registering as an Instagram developer

Implementing the Instagram client

Loading our plugins in Sunago

Summary

Sunago - An Android Port

Getting started

Building the user interface

Android data access

Android services

Android tabs and fragments

Summary

Email and Spam Management with MailFilter

Getting started

A brief look at the history of email protocols

JavaMail, the Standard Java API for Email

Building the CLI

Building the GUI

Building the service

Summary

Photo Management with PhotoBeans

Getting started

Bootstrapping the project

Branding your application

NetBeans modules

TopComponent - the class for tabs and windows

Nodes, a NetBeans presentation object

Lookup, a NetBeans fundamental

Writing our own nodes

Performing Actions

Services - exposing decoupled functionality

PhotoViewerTopComponent

Integrating JavaFX with the NetBeans RCP

NetBeans preferences and the Options panel

Adding a primary panel

Adding a secondary panel

Loading and saving preferences

Reacting to changes in preferences

Summary

Taking Notes with Monumentum

Getting started

Microservice frameworks on the JVM

Creating the application

Creating REST Services

Adding MongoDB

Dependency injection with CDI

Finish the notes resource

Adding authentication

Building the user interface

Summary

Serverless Java

Getting started

Planning the application

Building your first function

DynamoDB

Simple Email Service

Simple Notification Service

Deploying the function

Creating a role

Creating a topic

Deploying the function

Testing the function

Configuring your AWS credentials

Summary

DeskDroid - A Desktop Client for Your Android Phone

Getting started

Creating the Android project

Requesting permissions

Creating the service

Server-sent events

Controlling the service state

Adding endpoints to the server

Getting conversations

Sending an SMS message

Creating the desktop application

Defining the user interface

Defining user interface behavior

Sending messages

Getting updates

Security

Securing the endpoints

Handling authorization requests

Authorizing the client

Summary

What is Next?

Looking back

Looking forward

Project Valhalla

Value types

Generic specialization

Reified generics

Project Panama

Project Amber

Local-Variable Type Inference

Enhanced enums

Lambda leftovers

Looking around

Ceylon

Kotlin

Summary

Bibliography

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部