Giter Site home page Giter Site logo

rwtwithspringboot's Introduction

Eclipse RWT with Spring Boot

This is a small example, which demonstrates how to integrate Eclipse RWT (the UI technology of Eclipse RAP) as a String Boot web application using Gradle as the build tool.

This example shows:

  • how to declare the RWT and JFace dependencies in a Gradle build,
  • how to integrate the moving parts of RWT with a Spring Boot web application (Spring MVC),
  • how to leverage Spring managed beans, dependency injection and a pure programmatic way of configuring and wiring together an RWT application (no need for a web.xml),
  • how to provide a menu,
  • how to provide support to login (sample very simple using only one account with username "user" and password "user"),
  • how to use buttons,
  • how to use clickable Labels, i.e. links

This APP is compose of two main views the menu side on the left and the data side on the right. The menu side is compose of three distinctive areas a top one with the name of the APP, middle side with the menu, and a button side (footer) with the login/logout.

The menu provides five views, which are:

  • Home: starting page, which does not require to be logged in to see it.
  • First view: the first customised view, which requires to be logged in to see it.
  • Second view: the second customised view, which requires to be logged in to see it.
  • Third view: the third customised view, which requires to be logged in to see it.
  • About: Some data about the application, which does not require to be logged in to see it.

If a view that requires to be logged in before it can be seen is selected/clicked and it is not already logged in then the login page is displayed. On successful logged in the previously selected/clicked view is displayed.

The login time out is set in the messages.properties file together with the text used in the UI. This timeout is in milliseconds, which indicate the maximum period of time the views requiring login will be visible and after which the application will logout and a new login will be required for those pages that require login.

Below is presented an screenshot of one of the pages of the UI.

The example is not sophisticated, but you should give an idea on using Eclipse RAP and String Boot.

Getting Started

Requirements

Java 11 (or later)

Running locally

You can use the Gradle wrapper that comes with the project to run the commands. If you are on Windows, use gradlew.bat instead.

gradlew bootRun

This Gradle command will build and run the application in an embedded Tomcat container. After the app has fully started, open a browser and visit http://localhost:8080/ or http://localhost:8080/main

Alternatively, you can use bootJar to create a runnable standalone jar file with an embedded Tomcat container and run it like this:

gradlew bootJar

java -jar build/libs/rwtwithspringboot-0.0.1-SNAPSHOT.jar

Deploying as a WAR file

To build a WAR file that you can deploy to a Tomcat container installation or run in a Docker image, simply use war:

gradlew war

The resulting WAR file will be located in build/libs.

Backlog

  • Fix the Home view when it's shown for first time.
  • Implement the footer with button(s) part of the Card element.
  • Add functionality to the Cards elements in the HomeView so when clicked the corresponding view is displayed.
  • Add to other views some content.
  • Add proper login authentication and authorisation.
  • Add progress bar when logging in.

Additional Links

These additional references should also help you:

rwtwithspringboot's People

Contributors

amadeoas avatar

Watchers

 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.