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

Buch teilen
  1. 442 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Spring 5.0 Projects

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

Nilang Patel

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Spring 5.0 Projects als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Spring 5.0 Projects von Nilang Patel im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatik & Programmierung in Java. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2019
ISBN
9781788391979

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...

Inhaltsverzeichnis