Giter Site home page Giter Site logo

vaadinspringshiromongodb's Introduction

VaadinSpringShiroMongoDB

This is an example project based on the vaadin application example archetype to show how to integrate vaadin with spring using SpringVaadinIntegration addon with pure java config, Apache shiro security fine grain access and MongoDB Container Addon

Project Structure

The project consists of the following three modules:

  • parent project: common metadata and configuration
  • jwild-widgetset: widgetset, custom client side code and dependencies to widget add-ons
  • jwild-ui: main application module, development time
  • jwild-production: module that produces a production mode WAR for deployment

The production mode module recompiles the widgetset (obfuscated, not draft), activates production mode for Vaadin with a context parameter in web.xml and contains a precompiled theme. The ui module WAR contains an unobfuscated widgetset, and is meant to be used at development time only.

Workflow

To compile the entire project, run "mvn install" in the parent project.

Other basic workflow steps:

  • getting started
  • compiling the whole project
    • run "mvn install" in parent project
  • developing the application
  • developing the theme
    • run the application as above
    • edit the theme in the ui module
    • optional: see below for precompiling the theme
    • reload the application page
  • client side changes or add-ons
    • edit code/POM in widgetset module
    • run "mvn install" in widgetset module
    • if a new add-on has an embedded theme, run "mvn vaadin:update-theme" in the ui module
  • debugging client side code
    • run "mvn vaadin:run-codeserver" in widgetset module
    • activate Super Dev Mode in the debug window of the application
  • creating a production mode war
    • run "mvn -Pproduction package" in the production mode module or in the parent module
  • testing the production mode war
    • run "mvn -Pproduction jetty:run-war" in the production mode module

Using a precompiled theme

When developing the UI module, Vaadin can compile the theme on the fly on every application reload, or the theme can be precompiled to speed up page loads.

To precompile the theme run "mvn vaadin:compile-theme" in the ui module. Note, though, that once the theme has been precompiled, any theme changes will not be visible until the next theme compilation or running the "mvn clean" target.

When developing the theme, running the application in the "run" mode (rather than in "debug") in the IDE can speed up consecutive on-the-fly theme compilations significantly.

The production module always automatically precompiles the theme for the production WAR.

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.