GithubHelp home page GithubHelp logo

rtillawork / vaadin-rest-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vaadin/vaadin-rest-example

0.0 0.0 0.0 396 KB

Example of using REST services in a Vaadin application

Home Page: https://vaadin.com/start

License: The Unlicense

CSS 1.95% Java 94.21% TypeScript 0.11% JavaScript 3.73%

vaadin-rest-example's Introduction

Example app for using REST services with Vaadin and Spring Boot

Vaadin 14 REST Example

This example application demonstrates three ways of connecting your Vaadin and Spring Boot application to a REST backend. The examples are

  1. Using a DTO class to fetch and display all results from a REST API
  2. Using dynamic JSON to fetch and display all results from a REST API
  3. Calling REST services asynchronously
  4. Using a DTO class to lazily fetch and display data from REST on demand

The main class of this app is com.vaadin.example.rest.ui.MainView, where we create our three demos. The UI class uses DTOs and a Spring service located in the com.vaadin.example.rest.data package.

The backend.restprovider package is not part of the demo; it is an implementation of a 3rd party REST API so that we don't need to depend on an actual one. The classes provide a REST API running on localhost, with two API methods, 'count' and 'data'.

Running the Application

Import the project to the IDE of your choosing as a Maven project.

Run the application using mvn spring-boot:run or by running the Application class directly from your IDE.

Open http://localhost:8080/ in your browser.

If you want to run the application locally in the production mode, run mvn spring-boot:run -Pproduction.

More Information

vaadin-rest-example's People

Contributors

anasmi avatar anezthes avatar tarekoraby avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.