Spring 5.0 Projects
eBook - ePub

Spring 5.0 Projects

Build seven web development projects with Spring MVC, Angular 6, JHipster, WebFlux, and Spring Boot 2

Nilang Patel

Condividi libro
  1. 442 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Spring 5.0 Projects

Build seven web development projects with Spring MVC, Angular 6, JHipster, WebFlux, and Spring Boot 2

Nilang Patel

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Discover the latest features of Spring framework by building robust, fast, and reactive web applications

Key Features

  • Take advantage of all the features of Spring 5.0 with third party tools to build a robust back end
  • Secure Spring based web application using Spring Security framework with LDAP and OAuth protocol
  • Develop robust and scalable microservice based applications on Spring Cloud, using Spring Boot

Book Description

Spring makes it easy to create RESTful applications, merge with social services, communicate with modern databases, secure your system, and make your code modular and easy to test. With the arrival of Spring Boot, developers can really focus on the code and deliver great value, with minimal contour.

This book will show you how to build various projects in Spring 5.0, using its features and third party tools. We'll start by creating a web application using Spring MVC, Spring Data, the World Bank API for some statistics on different countries, and MySQL database. Moving ahead, you'll build a RESTful web services application using Spring WebFlux framework. You'll be then taken through creating a Spring Boot-based simple blog management system, which uses Elasticsearch as the data store. Then, you'll use Spring Security with the LDAP libraries for authenticating users and create a central authentication and authorization server using OAuth 2 protocol. Further, you'll understand how to create Spring Boot-based monolithic application using JHipster. Toward the end, we'll create an online book store with microservice architecture using Spring Cloud and Netflix OSS components, and a task management system using Spring and Kotlin.

By the end of the book, you'll be able to create coherent and flexible real-time web applications using Spring Framework.

What you will learn

  • Build Spring based application using Bootstrap template and JQuery
  • Understand the Spring WebFlux framework and how it uses Reactor library
  • Interact with Elasticsearch for indexing, querying, and aggregating data
  • Create a simple monolithic application using JHipster
  • Use Spring Security and Spring Security LDAP and OAuth libraries for Authentication
  • Develop a microservice-based application with Spring Cloud and Netflix
  • Work on Spring Framework with Kotlin

Who this book is for

This book is for competent Spring developers who wish to understand how to develop complex yet flexible applications with Spring. You must have a good knowledge of Java programming and be familiar with the basics of Spring.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Spring 5.0 Projects è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Spring 5.0 Projects di Nilang Patel in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatik e Programmierung in Java. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2019
ISBN
9781788391979
Edizione
1
Argomento
Informatik

Task Management System Using Spring and Kotlin

In the chapters so far, we have explored various topics and concepts in depth. Starting with the pure Spring Framework and moving onto Spring Boot, we learned how quickly and easily we can create an enterprise-grade application with Spring Boot.
We also learned about the integration of the Spring Framework with other tools and technologies, such as Elasticsearch, LDAP, and OAuth, within the purview of the Spring Boot context. We then learned a new way of creating an application with Spring as a backend and Angular as a frontend with a tool called JHipster.
Then, we discovered how to create an application with modern architecture in the dimension of the distributed environment called microservice. In this chapter, we go further and explore a completely different dimension of the Spring Framework, looking at how it is supported by a new programming language called Kotlin.
As a programming language, Kotlin has quickly become popular among developers and companies. The first stable version of Kotlin was released officially in 2016. The very next year Google officially declared Kotlin as a supported language for mobile development on an Android platform. This greatly increased the popularity and adoption rate of Kotlin.
Starting with version 5, Spring announced support for Kotlin to develop enterprise applications on a Spring Framework. In this chapter, we will explore how to develop a Spring-based application with Kotlin. We will build an application called Task Management with Spring Boot and Kotlin, and will cover the following:
  • Introduction to Kotlin
  • Basic features of Kotlin as a programming language
  • Kotlin versus Java
  • Spring support for Kotlin
  • Developing a Task Management application in Spring with Kotlin

Technical requirements

All the code used in this chapter can be downloaded from the following GitHub link: https://github.com/PacktPublishing/Spring-5.0-Projects/tree/master/chapter07. The code can be executed on any operating system, although it has only been tested on Windows.

Introducing Kotlin

Kotlin is a language for Java Virtual Machine (JVM) and hence can be used in place of Java. Be it server side, mobile, or web, you can use Kotlin everywhere Java is used at present. It is sponsored by a company called JetBrains; it is open source, and you can download the source code from GitHub (https://github.com/jetbrains/kotlin). They plan to roll out Kotlin for embedded and iOS platforms in the near future.
Kotlin provides good support as a functional programming language. The term functional programming is used to describe a declarative paradigm where the program is created by an expression or declaration rather than by the execution of commands. The functional programming model inherently brings certain qualities to the application, such as more compressed and predicted code, easy testing ability, reusability, and so on. Kotlin brings a functional paradigm in the form of inbuilt features.
There are many similarities between Java and Kotlin, and so the question arises, why do we need another programming language when Java has been widely used and very popular for more than two decades. The answer lies in some of the cool features Kotlin has, which make it the better choice for developing JVM-based applications.

Interoperability

One of the most promising features of Kotlin is its interoperable capabilities. Kotlin is 100% interoperable with Java. The application can combine both the languages. The call to Java libraries can be made from Kotlin without any conversion or fuss. Similarly, code written in Kotlin can also be called from Java with ease. This greatly helps Java developers to migrate from Java to Kotlin without any difficulty.
Migrating a code from one programming language to another is a quite tedious and time-consuming task, especially when those programming languages are incompatible, in terms of rules, syntax, features, and so on. Although there are a bunch of features available in Kotlin that are not present directly or indirectly in Java, it is the interoperability of Kotlin that allows running the code with both programming languages simultaneously. You do not have to migrate all Java code to Kotlin. Kotlin's Interoperability is shown in the following diagram:
On top of this, the Kotlin standard library is dependent on the Java Class Library, which enables reusing the dependencies, and no code refactoring is required in any of the places. For example: Kotlin's collection framework is built on top of Java's collection API.

Concise yet powerful

While working with Kotlin, you will find another good quality is how concise it is. The Kotlin syntax is easy to read and interpret even without prior knowledge of any programming language. Kotlin has certain features that make it a truly concise language, such as type interface, data classes, properties, smart casts, and a lot more. We will see more detail about each of them later in this chapter.
With these features, the code written with Kotlin is compact without losing its capabilities. Kotlin is more concise than Java in many aspects, and because of this we can implement the same functionality with fewer lines of code. This greatly improves legibility and ease of use. Developers can easily read, code, and update the program, even when it h...

Indice dei contenuti