Posts

Showing posts with the label Build Reactive CRUD REST API

React Native Spring Boot: Full-stack CRUD example

Image
Here's a full-stack CRUD example using React Native as the front-end and Spring Boot 3 as the back-end. This example covers the setup and integration to manage tasks in a simple to-do list application. 1. Spring Boot Back-End Add Dependencies to pom.xml <dependencies> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-web </artifactId> </dependency> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-data-jpa </artifactId> </dependency> <dependency> <groupId> com.h2database </groupId> <artifactId> h2 </artifactId> <scope> runtime </scope> </dependency> </dependencies> Configure H2 Database in application.properties spring .datasource .url =jdbc: h2 :mem:tasksdb spring .datasourc...

Google Cloud Firestore + Spring Boot + Spring WebFlux - Build Reactive CRUD REST APIs

Image
In this section, we will learn  how to build reactive REST CRUD APIs with Spring Boot, Spring WebFlux, and Google Cloud Datastore. 1.  A little bit of Background Reactive APIs Reactive APIs are non-blocking and tend to be more efficient because they’re not tying up processing while waiting for stuff to happen. Reactive systems adopt asynchronous I/O. Reactive apps allow us to scale better if we are dealing with lots of streaming data. If we are going to build a reactive app, we need it to be reactive all the way down to your database.  Google Cloud Firestore Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Firestore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.   More Info - click here! Spring WebFlux The reactive-stack web framework, Spring WebFlux, was added later...