万本电子书0元读

万本电子书0元读

顶部广告

Building Web Apps with Spring 5 and Angular电子书

售       价:¥

5人正在读 | 0人评论 6.2

作       者:Ajitesh Shukla

出  版  社:Packt Publishing

出版时间:2017-08-24

字       数:42.7万

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

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

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
A complete guide to build robust and scalable web applications with Spring and Angular. About This Book ? This hands on guide will teach you how to build an end-to-end modern web application using Spring and Angular. ? It is easy to read and will benefit Java developers who have been used to develop the back-end part of web application while front-end (UI) has been left for UI developers. ? Learn the core aspects involved in developing the backend and the UI, right from designing to integrating and deploying. Who This Book Is For This book is targeted towards Java Web Developers with a basic knowledge of Spring who want to build complete web applications in a fast and effective way. They will want to gain a stronghold on both frontend and backend development to advance in their careers. What You Will Learn ? Set up development environment for Spring Web App and Angular app. ? Process web request and response and build REST API endpoints. ? Create data access components using Spring Web MVC framework and Hibernate ? Use Junit 5 to test your application ? Learn the fundamental concepts around building Angular ? Configure and use Routes and Components. ? Protect Angular app content from common web vulnerabilities and attacks. ? Integrate Angular apps with Spring Boot Web API endpoints ? Deploy the web application based on CI and CD using Jenkins and Docker containers In Detail Spring is the most popular application development framework being adopted by millions of developers around the world to create high performing, easily testable, reusable code. Its lightweight nature and extensibility helps you write robust and highly-scalable server-side web applications. Coupled with the power and efficiency of Angular, creating web applications has never been easier. If you want build end-to-end modern web application using Spring and Angular, then this book is for you. The book directly heads to show you how to create the backend with Spring, showing you how to configure the Spring MVC and handle Web requests. It will take you through the key aspects such as building REST API endpoints, using Hibernate, working with Junit 5 etc. Once you have secured and tested the backend, we will go ahead and start working on the front end with Angular. You will learn about fundamentals of Angular and Type* and create an SPA using components, routing etc. Finally, you will see how to integrate both the applications with REST protocol and deploy the application using tools such as Jenkins and Docker. Style and approach This is a straightforward guide that shows how to build a complete web application in Angular and Spring.
目录展开

Title Page

Title Page

Copyright

Copyright

Building Web Apps with Spring 5 and Angular

Building Web Apps with Spring 5 and Angular

Credits

Credits

About the Author

About the Author

About the Reviewer

About the Reviewer

www.PacktPub.com

www.PacktPub.com

Why subscribe?

Why subscribe?

Customer Feedback

Customer Feedback

Preface

Preface

What this book covers

What this book covers

What you need for this book

What you need for this book

Who this book is for

Who this book is for

Conventions

Conventions

Reader feedback

Reader feedback

Customer support

Customer support

Downloading the example code

Downloading the example code

Downloading the color images of this book

Downloading the color images of this book

Errata

Errata

Piracy

Piracy

Questions

Questions

Introduction to Spring Web Framework

Introduction to Spring Web Framework

Introduction to the Spring IOC container

Introduction to the Spring IOC container

What is IOC?

What is IOC?

What is a Spring IOC container?

What is a Spring IOC container?

Introduction to Spring Web MVC

Introduction to Spring Web MVC

Key building blocks of a Spring Web MVC application

Key building blocks of a Spring Web MVC application

Introduction to the Dispatcher servlet

Introduction to the Dispatcher servlet

Building Hello World web application with Spring Boot

Building Hello World web application with Spring Boot

The Spring STS Setup in Eclipse IDE

The Spring STS Setup in Eclipse IDE

Introduction to Spring Boot

Introduction to Spring Boot

Building Hello World web app using Spring Boot

Building Hello World web app using Spring Boot

Implementing Controllers

Implementing Controllers

Handling request parameters

Handling request parameters

The RequestParam annotation

The RequestParam annotation

The RequestBody annotation

The RequestBody annotation

The PathVariable annotation

The PathVariable annotation

Handling Interceptors

Handling Interceptors

Handling Response

Handling Response

Response as an instance of ModelAndView

Response as an instance of ModelAndView

Using @ResponseBody annotation

Using @ResponseBody annotation

Creating a RESTful web service

Creating a RESTful web service

Dockerizing a Spring Boot application

Dockerizing a Spring Boot application

Summary

Summary

Preparing the Spring Web Development Environment

Preparing the Spring Web Development Environment

Installing the Java SDK

Installing the Java SDK

Installing/configuring Maven

Installing/configuring Maven

Installing the Eclipse IDE

Installing the Eclipse IDE

Import the existing Maven project in Eclipse

Import the existing Maven project in Eclipse

Creating a new Maven project in Eclipse

Creating a new Maven project in Eclipse

Installing/configuring the Apache Tomcat server

Installing/configuring the Apache Tomcat server

Adding/configuring Apache Tomcat in Eclipse

Adding/configuring Apache Tomcat in Eclipse

Installing/configuring the MySQL database

Installing/configuring the MySQL database

Installing/configuring the MySQL server

Installing/configuring the MySQL server

Using the MySQL connector

Using the MySQL connector

Connecting to the MySQL database from a Java class

Connecting to the MySQL database from a Java class

Introduction to Docker

Introduction to Docker

What are Docker containers?

What are Docker containers?

What are real-world containers good for?

What are real-world containers good for?

How do Docker containers relate to real-world containers?

How do Docker containers relate to real-world containers?

Docker containers

Docker containers

What are the key building blocks of Dockers containers?

What are the key building blocks of Dockers containers?

Installing Docker

Installing Docker

Setting up the development environment using Docker compose

Setting up the development environment using Docker compose

What is Docker compose?

What is Docker compose?

Docker Compose Script for setting up the Dev Environment

Docker Compose Script for setting up the Dev Environment

Setting up the Tomcat 8.x as a container service

Setting up the Tomcat 8.x as a container service

Setting up MySQL as a container service

Setting up MySQL as a container service

Docker compose script to set up the development environment

Docker compose script to set up the development environment

Summary

Summary

Data Access Layer with Spring and Hibernate

Data Access Layer with Spring and Hibernate

An introduction to Hibernate

An introduction to Hibernate

Setting up Hibernate with Spring

Setting up Hibernate with Spring

Setting up data source information in the application.properties file

Setting up data source information in the application.properties file

Using annotations to wire a SessionFactory bean

Using annotations to wire a SessionFactory bean

Configure bean definitions

Configure bean definitions

Autowire SessionFactory in DAOs

Autowire SessionFactory in DAOs

Design domain objects and database tables

Design domain objects and database tables

User

User

Introduction to NamedQuery and Criteria

Introduction to NamedQuery and Criteria

What is NamedQuery?

What is NamedQuery?

What is Criteria?

What is Criteria?

Common Hibernate operations

Common Hibernate operations

Data retrieval

Data retrieval

Save/persist operation

Save/persist operation

Update/merge operation

Update/merge operation

The saveOrUpdate operation

The saveOrUpdate operation

Transaction management

Transaction management

Declarative transaction management

Declarative transaction management

Summary

Summary

Testing and Running Spring Web App

Testing and Running Spring Web App

How to run the Spring Boot app

How to run the Spring Boot app

Introduction to unit testing fundamentals

Introduction to unit testing fundamentals

What is unit testing?

What is unit testing?

Why write unit tests?

Why write unit tests?

Unit testing naming conventions

Unit testing naming conventions

Introduction to JUnit 5

Introduction to JUnit 5

Architectural building blocks of JUnit 5

Architectural building blocks of JUnit 5

Setting up and running JUnit tests

Setting up and running JUnit tests

Mocking dependencies using Mockito

Mocking dependencies using Mockito

Getting set up with Mockito

Getting set up with Mockito

Introduction to mocking techniques

Introduction to mocking techniques

Unit testing controllers, services, and DAOs

Unit testing controllers, services, and DAOs

Unit tests for controllers

Unit tests for controllers

Unit tests for Services

Unit tests for Services

Unit tests for DAO components

Unit tests for DAO components

Summary

Summary

Securing Web App with Spring Security

Securing Web App with Spring Security

Introduction to Spring Security

Introduction to Spring Security

Spring Security high level architecture

Spring Security high level architecture

Spring Security architecture - core building blocks

Spring Security architecture - core building blocks

Spring Security architecture - authentication

Spring Security architecture - authentication

Spring Security architecture - authorization

Spring Security architecture - authorization

Setting up Spring Security

Setting up Spring Security

Handling the login authentication

Handling the login authentication

CSRF protection for API requests

CSRF protection for API requests

CSRF prevention technique for the Angular app

CSRF prevention technique for the Angular app

CSRF prevention technique for the Spring app

CSRF prevention technique for the Spring app

Handling the logout request

Handling the logout request

OAuth2 for authentication/authorization

OAuth2 for authentication/authorization

Introduction to OAuth2-based authentication & authorization

Introduction to OAuth2-based authentication & authorization

Spring Security and OAuth2 authentication

Spring Security and OAuth2 authentication

OAuth2 Implementation for Spring Web App

OAuth2 Implementation for Spring Web App

OAuth2 Implementation for Angular App

OAuth2 Implementation for Angular App

Acquiring access token

Acquiring access token

Accessing resources using access token

Accessing resources using access token

Summary

Summary

Getting Started with Angular

Getting Started with Angular

Introduction to Angular

Introduction to Angular

How is Angular different from AngularJS?

How is Angular different from AngularJS?

AngularJS - The MVC way of building UI apps

AngularJS - The MVC way of building UI apps

Angular - The Component Way of Building Web Apps

Angular - The Component Way of Building Web Apps

Setting up the Angular development environment

Setting up the Angular development environment

TypeScript fundamentals

TypeScript fundamentals

Forms

Forms

Template-driven forms

Template-driven forms

Reactive forms

Reactive forms

Pipes

Pipes

Directives

Directives

Structural directives

Structural directives

Attribute directives

Attribute directives

Server communication

Server communication

Bootstrapping an Angular app

Bootstrapping an Angular app

Best practices

Best practices

Summary

Summary

Creating SPA with Angular and Spring 5

Creating SPA with Angular and Spring 5

Introduction to routing

Introduction to routing

Configuring Route definitions

Configuring Route definitions

RouterLink for navigation

RouterLink for navigation

What is RouterLink?

What is RouterLink?

What is ActivatedRoute?

What is ActivatedRoute?

Route Guards for access control

Route Guards for access control

Routing configuration design patterns

Routing configuration design patterns

Routing within AppModule

Routing within AppModule

Routing as a separate module at the app root level

Routing as a separate module at the app root level

Routing within feature modules

Routing within feature modules

Creating a single page app (SPA)

Creating a single page app (SPA)

Lean root module

Lean root module

Features as separate modules

Features as separate modules

Auth module

Auth module

Doctor module

Doctor module

Route Guards for controlled access

Route Guards for controlled access

Debugging Angular app

Debugging Angular app

Debugging Angular app using Firefox and Chrome

Debugging Angular app using Firefox and Chrome

Debugging Angular app using Augury

Debugging Angular app using Augury

Summary

Summary

Unit Testing with Angular Apps

Unit Testing with Angular Apps

Introduction to unit testing

Introduction to unit testing

Unit testing tools for Angular apps

Unit testing tools for Angular apps

Jasmine

Jasmine

Karma

Karma

Protractor

Protractor

Angular testing utilities

Angular testing utilities

Setting up the unit test environment

Setting up the unit test environment

Angular unit testing building blocks

Angular unit testing building blocks

Unit testing strategies

Unit testing strategies

Unit testing the components

Unit testing the components

Unit testing a component with an external template

Unit testing a component with an external template

Unit testing a component with one or more dependencies

Unit testing a component with one or more dependencies

Unit testing a component with an async service

Unit testing a component with an async service

Component-under-test - DoctorListComponent

Component-under-test - DoctorListComponent

External service - DoctorService

External service - DoctorService

Unit test for DoctorListComponent

Unit test for DoctorListComponent

Unit testing a routed component

Unit testing a routed component

Test doubles for Router and ActivatedRoute

Test doubles for Router and ActivatedRoute

Unit test for a routed component

Unit test for a routed component

Unit testing the services

Unit testing the services

Service under test - DoctorService

Service under test - DoctorService

Unit test for DoctorService

Unit test for DoctorService

Summary

Summary

Securing an Angular App

Securing an Angular App

Common web application security vulnerabilities

Common web application security vulnerabilities

What is Cross-Site Scripting (XSS)?

What is Cross-Site Scripting (XSS)?

What is Cross-Site Script Inclusion (XSSI)?

What is Cross-Site Script Inclusion (XSSI)?

What is Cross-Site Request Forgery (CSRF/XSRF)?

What is Cross-Site Request Forgery (CSRF/XSRF)?

Securing an app from XSS

Securing an app from XSS

Displaying trusted HTML values

Displaying trusted HTML values

The Custom SecurityBypass pipe

The Custom SecurityBypass pipe

Securing an app from XSSI

Securing an app from XSSI

Securing app from CSRF/XSRF

Securing app from CSRF/XSRF

Best practices

Best practices

Summary

Summary

Integrating Angular App with Spring Web APIs

Integrating Angular App with Spring Web APIs

Building RESTful Spring web APIs

Building RESTful Spring web APIs

Configure Spring app for CORS

Configure Spring app for CORS

Key aspects of Angular data services

Key aspects of Angular data services

Promise and Observable responses

Promise and Observable responses

Promise for asynchronous data exchange

Promise for asynchronous data exchange

Observable for asynchronous data exchange

Observable for asynchronous data exchange

Building Angular services for RESTful integration

Building Angular services for RESTful integration

Invoking server APIs using the Angular HTTP service

Invoking server APIs using the Angular HTTP service

Consuming RESTful Spring APIs using the HTTP service

Consuming RESTful Spring APIs using the HTTP service

Posting to RESTful Spring APIs using the HTTP service

Posting to RESTful Spring APIs using the HTTP service

Invoking server APIs using the Angular HttpClient service

Invoking server APIs using the Angular HttpClient service

Example of consuming RESTful Spring web APIs

Example of consuming RESTful Spring web APIs

Spring RESTful API for user login

Spring RESTful API for user login

Custom Angular component for managing login view

Custom Angular component for managing login view

Custom Angular service for serving login functionality

Custom Angular service for serving login functionality

Summary

Summary

Deploying the Web Application

Deploying the Web Application

Introduction to CI and CD

Introduction to CI and CD

Setting up Jenkins and GitLab

Setting up Jenkins and GitLab

Setting up Jenkins

Setting up Jenkins

Setting up GitLab

Setting up GitLab

Setting up GitLab and Jenkins using Docker Compose

Setting up GitLab and Jenkins using Docker Compose

Configuring GitLab as a code repository

Configuring GitLab as a code repository

Creating Jenkins jobs for CI

Creating Jenkins jobs for CI

Configuring Jenkins and GitLab for CI/CD

Configuring Jenkins and GitLab for CI/CD

Configuring webhooks in GitLab

Configuring webhooks in GitLab

Configuring Jenkins for automated build triggers

Configuring Jenkins for automated build triggers

Configuring Jenkins jobs for CD

Configuring Jenkins jobs for CD

Deploying Angular app in production

Deploying Angular app in production

Angular app deployed on separate server

Angular app deployed on separate server

Angular app deployed on Spring app server

Angular app deployed on Spring app server

Summary

Summary

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

发表评论

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

买过这本书的人还买过

读了这本书的人还在读

回顶部