万本电子书0元读

万本电子书0元读

顶部广告

Architecting Modern Java EE Applications电子书

售       价:¥

6人正在读 | 0人评论 9.8

作       者:Sebastian Daschner

出  版  社:Packt Publishing

出版时间:2017-10-09

字       数:68.1万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Find out how to craft effective, business-oriented Java EE 8 applications that target customer’s demands in the age of Cloud platforms and container technology. About This Book ? Understand the principles of modern Java EE and how to realize effective architectures ? Gain knowledge of how to design enterprise software in the age of automation, Continuous Delivery and Cloud platforms ? Learn about the reasoning and motivations behind state-of-the-art enterprise Java technology, that focuses on business Who This Book Is For This book is for experienced Java EE developers who are aspiring to become the architects of enterprise-grade applications, or software architects who would like to leverage Java EE to create effective blueprints of applications. What You Will Learn ? What enterprise software engineers should focus on ? Implement applications, packages, and components in a modern way ? Design and structure application architectures ? Discover how to realize technical and cross-cutting aspects ? Get to grips with containers and container orchestration technology ? Realize zero-dependency, 12-factor, and Cloud-native applications ? Implement automated, fast, reliable, and maintainable software tests ? Discover distributed system architectures and their requirements In Detail Java EE 8 brings with it a load of features, mainly targeting newer architectures such as microservices, modernized security APIs, and cloud deployments. This book will teach you to design and develop modern, business-oriented applications using Java EE 8. It shows how to structure systems and applications, and how design patterns and Domain Driven Design aspects are realized in the age of Java EE 8. You will learn about the concepts and principles behind Java EE applications, and how to effect communication, persistence, technical and cross-cutting concerns, and asynchronous behavior. This book covers Continuous Delivery, DevOps, infrastructure-as-code, containers, container orchestration technologies, such as Docker and Kubernetes, and why and especially how Java EE fits into this world. It also covers the requirements behind containerized, zero-dependency applications and how modern Java EE application servers support these approaches. You will also learn about automated, fast, and reliable software tests, in different test levels, scopes, and test technologies. This book covers the prerequisites and challenges of distributed systems that lead to microservice, shared-nothing architectures. The challenges and solutions of consistency versus scalability will further lead us to event sourcing, event-driven architectures, and the CQRS principle. This book also includes the nuts and bolts of application performance as well as how to realize resilience, logging, monitoring and tracing in a modern enterprise world. Last but not least the demands of securing enterprise systems are covered. By the end, you will understand the ins and outs of Java EE so that you can make critical design decisions that not only live up to, but also surpass your clients' expectations. Style and approach This book focuses on solving business problems and meeting customer demands in the enterprise world. It covers how to create enterprise applications with reasonable technology choices, free of cargo-cult and over-engineering. The aspects shown in this book not only demonstrate how to realize a certain solution, but also explain its motivations and reasoning.
目录展开

Title Page

Copyright

Architecting Modern Java EE Applications

Credits

Foreword

About the Author

Acknowledgments

About the Reviewer

www.PacktPub.com

Why subscribe?

Customer Feedback

Dedication

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

Introduction

New demands in enterprise systems

Modern way of realizing enterprise systems

Relevance of Java EE in modern systems

Java EE 8 update and roadmap

Java Community Process

What to expect in the book

Designing and Structuring Java Enterprise Applications

The purpose of enterprise applications

What developers should focus on

Meeting customer's demands

Outer enterprise project structure

Business and team structures

Software projects contents

Application source code

Software structures

Version control systems

Binaries

Build systems

Single versus multi-module projects

Illusion of reusability

Technical dependencies

Organizational challenges

Reusability considerations

Project artifacts

One project per artifact

Build systems for Java EE

Apache Maven

Gradle

Structuring for modern frontend technologies

Enter JavaScript frameworks

Organizing modern frontends

Enterprise project code structure

Situation in enterprise projects

Horizontal versus vertical layering

Business-driven structure

Designing reasonable modules

Realizing package structures

Package contents

Horizontal package layering

Flat module package

Entity Control Boundary

Packages

Package access

Don't over-enforce architecture

Summary

Implementing Modern Java Enterprise Applications

Use case boundaries

Core domain components of modern Java EE

EJB and CDI - differentiation and integration

CDI producers

Emitting domain events

Scopes

Patterns in Java EE

Design patterns revisited

Singleton

Abstract factory

Factory method

Object pool

Decorator

Facade

Proxy

Observer

Strategy

Further patterns

Domain-Driven Design

Services

Entities

Value objects

Aggregates

Repositories

Factories

Domain event

External and cross-cutting concerns in enterprise applications

Communication with external systems

How to choose communication technology

Synchronous HTTP communication

Representational State Transfer

Java API for RESTful web services

Mapping HTTP content types

Validating requests

Mapping errors

Accessing external systems

Stability when consuming HTTP

Accessing Hypermedia REST services

Asynchronous communication and messaging

Asynchronous HTTP communication

Message-oriented communication

Server-sent events

WebSocket

Connecting enterprise technology

Database systems

Integrating RDBMS systems

Mapping domain models

Integrating database systems

Transactions

Relational databases versus NoSQL

Cross-cutting concerns

Configuring applications

Caching

Flow of execution

Synchronous execution

Asynchronous execution

Asynchronous EJB methods

Managed Executor Service

Asynchronous CDI events

Scopes in asynchronicity

Timed execution

Asynchronous and reactive JAX-RS

Concepts and design principles of modern Java EE

Preserving maintainable code with high quality

Summary

Lightweight Java EE

Lightweight enterprise technology

Why Java EE standards?

Convention over configuration

Dependency management of Java EE projects

Lightweight way of packaging applications

Java EE application servers

One application per application server

Summary

Container and Cloud Environments with Java EE

Motivations and goals

Infrastructure as code

Stability and production readiness

Containers

Java EE in the container

Container orchestration frameworks

Realizing container orchestration

Java EE in orchestrated containers

Connecting external services

Configuring orchestrated applications

12-factor applications and Java EE

Have one codebase tracked in revision control, many deploys

Explicitly declare and isolate dependencies

Store config in the environment

Treat backing services as attached resources

Strictly separate build and run stages

Execute the app as one or more stateless processes

Export services via port binding

Scale out via the process model

Maximize robustness with fast startup and graceful shutdown

Keep development, staging, and production as similar as possible

Treat logs as event streams

Run admin/management tasks as one-off processes

Cloud, Cloud native, and their benefits

Cloud native

Summary

Application Development Workflows

Motivation and goals of productive development workflows

Realizing development workflows

Version control everything

Building binaries

Java artifacts

Artifact versions

Building containers

Quality assurance

Deployment

Configuration

Credentials

Data migration

Adding database structures

Changing database structures

Removing database structures

Implementing migration

Testing

Build metadata

Going to production

Branching models

Technology

Pipeline-as-code

Workflows with Java EE

Continuous Delivery culture and team habits

Responsibility

Check in early and often

Immediately fixing issues

Visibility

Improve continuously

Summary

Testing

The necessity of tests

Requirements of well-crafted tests

Predictability

Isolation

Reliability

Fast execution

Automation

Maintainability

What to test

Definition of test scopes

Unit tests

Component tests

Integration tests

System tests

Performance tests

Stress tests

Implementing tests

Unit tests

Implementation

Technology

Component tests

Motivation

Implementation

Delegating test components

Technology

Integration tests

Embedded containers

Embedded databases

Running integration tests

Code level integration tests versus system tests

Shortcomings of integration tests

Shortcomings of system tests

Conclusion

System tests

Managing test scenarios

Simulating external concerns

Designing system tests

Deploying and controlling external mocks

Performance tests

Motivation

Key performance indicators

Developing performance tests

Insights

Running tests locally

Maintaining test data and scenarios

Importance of maintainable tests

Signs of lack of test quality

Test code quality

Test technology support

Summary

Microservices and System Architecture

Motivations behind distributed systems

Challenges of distribution

Communication overhead

Performance overhead

Organizational overhead

How to design systems landscapes

Context maps and bounded contexts

Separation of concerns

Teams

Project life cycles

How to design system interfaces

API considerations

Interface management

Change-resilient APIs

Breaking the business logic

Hypermedia REST and versioning

Documenting boundaries

Consistency versus scalability

Event sourcing, event-driven architectures, and CQRS

Shortcomings of CRUD-based systems

Scalability

Competing transactions

Reproducibility

Event sourcing

Benefits

Eventually consistent real world

Event-driven architectures

Eventual consistency in event-driven architectures

Enter CQRS

Principles

Design

Benefits

Shortcomings

Communication

Microservice architectures

Sharing data and technology in enterprises

Shared-nothing architectures

Interdependent systems

12-factor and cloud native applications

When to use and when not to use microservices

Implementing microservices with Java EE

Zero-dependency applications

Application servers

Implementing application boundaries

Implementing CQRS

System interfaces

Example scenario using Apache Kafka

Integrating Java EE

CDI events

Event handlers

State representation

Consuming Kafka messages

Producing Kafka messages

Application boundaries

Integrating further CQRS concepts

Java EE in the age of distribution

Discovering services

Communicating resiliently

Validating responses

Breaking timeouts and circuits

Bulkheads

Shaking hands and pushing back

More on being resilient

Summary

Monitoring, Performance, and Logging

Business metrics

Collecting business metrics

Emitting metrics

Enter Prometheus

Realization with Java EE

Integrating the environment

Meeting performance requirements in distributed systems

Service level agreements

Achieving SLAs in distributed systems

Tackling performance issues

Theory of constraints

Identifying performance regression with jPDM

Subsystems

Actors

Application

JVM

Operating system and hardware

jPDM instances - production situations

Analyzing the jPDM instances

Dominating consumer - OS

Dominating consumer - none

Dominating consumer - JVM

Dominating consumer - application

Conclusion

Technical metrics

Types of technical metrics

High frequency monitoring versus sampling

Collecting technical metrics

Boundary metrics

Logging and tracing

Shortcomings of traditional logging

Performance

Log levels

Log format

Amounts of data

Obfuscation

The concerns of applications

Wrong choice of technology

Logging in a containerized world

Journaling

Tracing

Tracing in a modern world

Typical performance issues

Logging and memory consumption

Premature optimization

Relational databases

Communication

Threading and pooling

Performance testing

Summary

Security

Lessons learned from the past

Security in a modern world

Security principles

Encrypt communication

Delegate security concerns

Treat user credentials properly

Avoid storing credentials in version control

Include tests

Possibilities and solutions

Encrypted communication

Protocol-based authentication

Decentralized security

Proxies

Integration in modern environments

Implementing security in Java EE applications

Transparent security

Servlets

Java principals and roles

JASPIC

Security API

Authentication mechanisms

Identity stores

Custom security

Accessing security information

Summary

Conclusion

Motivations in enterprise development

Cloud and Continuous Delivery

Relevance of Java EE

API updates introduced in Java EE 8

CDI 2.0

JAX-RS 2.1

JSON-B 1.0

JSON-P 1.1

Bean Validation 2.0

JPA 2.2

Security 1.0

Servlet 4.0

JSF 2.3

JCP and participation

MicroProfile

Eclipse Enterprise for Java

Appendix: Links and further resources

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部