Simple application demonstrating Spring Rest, Spring Data JPA and H2 in Spring Boot



A word about RESTful Web Services:

REST stands for REpresentational State Transfer. REST is web standards based architecture and uses HTTP Protocol. It revolves around resource where every component is a resource and a resource is accessed by a common interface using HTTP standard methods. REST was first introduced by Roy Fielding in 2000.
In REST architecture, a REST Server simply provides access to resources and REST client accesses and modifies the resources. Here each resource is identified by URIs/ global IDs. REST uses various representation to represent a resource like text, JSON, XML. JSON is the most popular one.
HTTP methods
Following four HTTP methods are commonly used in REST based architecture.
  • GET − Provides a read only access to a resource.
  • POST − Used to create a new resource.
  • DELETE − Used to remove a resource.
  • PUT − Used to update a existing resource or create a new resource.

A word about Java Persistence API (JPA):
Java Persistence API is a collection of classes and methods to persistently store the vast amounts of data into a database. 


Any enterprise application performs database operations by storing and retrieving vast amounts of data. Despite all the available technologies for storage management, application developers normally struggle to perform database operations efficiently.

Generally, Java developers use lots of code, or use the proprietary framework to interact with the database, whereas using JPA, the burden of interacting with the database reduces significantly. It forms a bridge between object models (Java program) and relational models (database program).

A word about H2 Database: 

H2 is an open-source lightweight Java database. It can be embedded in Java applications or run in the client-server mode. H2 database can be configured to run as in-memory database, which means that data will not persist on the disk.

A word about Spring Boot:


Spring Boot is an open source Java-based framework used to create a micro Service. It is developed by Pivotal Team and is used to build stand-alone and production ready spring applications.
 
What is Micro Service?
Micro Service is an architecture that allows the developers to develop and deploy services independently. Each service running has its own process and this achieves the lightweight model to support business applications.
Advantages
Micro services offers the following advantages to its developers −
  • Easy deployment
  • Simple scalability
  • Compatible with Containers
  • Minimum configuration
  • Lesser production time
What is Spring Boot?
Spring Boot provides a good platform for Java developers to develop a stand-alone and production-grade spring application that you can just run. You can get started with minimum configurations without the need for an entire Spring configuration setup.
Advantages
Spring Boot offers the following advantages to its developers −
  • Easy to understand and develop spring applications
  • Increases productivity
  • Reduces the development time
Goals
Spring Boot is designed with the following goals −
  • To avoid complex XML configuration in Spring
  • To develop a production ready Spring applications in an easier way
  • To reduce the development time and run the application independently
  • Offer an easier way of getting started with the application

A word about Maven:


Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information. Using maven we can build and manage any Java based project

Useful links:
1. Tutorialspoint.com
2. https://www.javacodegeeks.com/2018/08/restful-api-spring-rest-data-jpa-h2.html

Simple project developed in the link "https://www.javacodegeeks.com/2018/08/restful-api-spring-rest-data-jpa-h2.html" is available for downloading here:

https://drive.google.com/open?id=1Au-m8kSGQZ1UrhATLT48Jd4yiPgT8szI

No comments:

Post a Comment