Do a little demo based on angular and spring Webflux

Source: Internet
Author: User

Objective

With spring Boot2.0 officially released, Spring Webflux formally came to the spring boot big family. I am interested in this because spring Webflux can achieve higher concurrency with fewer threads and use less hardware resources to implement extensions. At the same time Angular6 also released, also want to try their own angular foundation, then based on angular and spring Webflux do a simple Gift management system demo. As for angular and spring boot integration, you can refer to the blog angular and spring boot to do a project

Responsive programming

Responsive programming is a programming paradigm for data flow and change propagation. This means that static or dynamic data flows can be easily expressed in a programming language, and the associated calculation model automatically propagates the changed values through the data stream. An individual's popular understanding is that the act of generating data is placed within a data stream, where the data in the stream is transformed appropriately by some operators, and the data in that data stream is finally fetched and processed. My earliest contact-responsive programming was to learn Angular2 when learning about RXJS, which is the implementation version of Reactivexz on JS, and its Java version is Rxjava.

Learning Advice
    1. Since spring Webflux is based on the reactor library, it is recommended to first learn about reactor and understand the concept of responsive programming, which distinguishes between mono and flux. Its website link is http://projectreactor.io.
    2. If you can spare force, you can consider learning RxJava2.
    3. Use event-based programming thinking as much as possible, and write less synchronous code.
The view of Spring Webflux
    1. If spring MVC has been able to meet the requirements in real-world development, do not use spring Webflux unless you are simply wrapping the service's return interface into mono or flux in the controller layer.
    2. If you use spring Webflux, try to use Java annotations as much as possible, especially when request parameters are complicated, the functional programming model of a lambda expression based on Java 8 is really bad!!!
Code sharing

Code has been placed on GitHub and the code cloud, I hope you can more guidance.

Do a little demo based on angular and spring Webflux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.