enterstudio / flow-1

Flow is a Java framework for building modern web sites that look great and perform well.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gitter

Flow

Flow is a Java framework for building modern web sites that look great, perform well and make you and your users happy.

For instructions about using Flow to develop applications, please refer to the documentation.

To contribute, first refer to Contribution Guide for general instructions and requirements for contributing code to Flow.

Flow EAP discussion in Gitter IM at https://gitter.im/vaadin-flow/Lobby

Instructions on how to set up a working environment for developing the Flow project follow below.

Quick Setup

To create your own application using Flow, use https://github.com/vaadin/skeleton-starter-flow as a starting point.

To quickly get started with contributing, follow these simple steps.

  1. git clone https://github.com/vaadin/flow.git
  2. make sure you have a TestBench license (get it otherwise on https://vaadin.com/pro/licenses)
  3. mvn install

For more details, see below

Setting up Eclipse to Develop Flow

Import the Project into the Workspace

  1. Do File -> Import -> General -> Existing Maven Project
  2. Select the flow folder (where you cloned the project)
  3. Ensure all projects are checked
  4. Click “finish” to complete the import
  5. Disable HTML and XML validation in the workspace to avoid validating Bower dependencies
  6. Eclipse preferences -> Validation
  7. Uncheck Build for HTML Syntax Validator
  8. Uncheck Build for XML Validator

Note that the first compilation takes a while to finish as Maven downloads dependencies used in the projects.

Compiling the Client Engine

Compile the client engine by executing the Eclipse build configuration Compile ClientEngine in flow-client/eclipse

Set up extra workspace preferences

The following preferences need to be set to keep the project consistent. You need to do this especially to be able to contribute changes to the project.

  1. Open Window -> Preferences (Windows) or Eclipse -> Preferences (Mac)
  2. Go to General -> Workspace
  3. Set Text file encoding to UTF-8
  4. Set New text file line delimiter to Unix
  5. Go to XML -> XML Files -> Editor
  6. Ensure the settings are follows:
Line width: 72
Format comments: true
Join lines: true
Insert whitespace before closing empty end-tags: true
Indent-using spaces: true
Indentation size: 4

Running tests

The unit tests for the projects can be run using

mvn test

IT tests can be run with

mvn verify

To run IT tests locally, you'll need a Testbench license and a Chrome browser installed (currently this is the only browser that IT tests are run in). If you don't have the license, it's ok, our CI system will run those tests for you after you create a pull request. Refer to the contribution guide for details.

When running IT tests locally, by default, local Chrome is used to run tests, make sure it's installed.

Building a package

The distribution package is built and installed into the local Maven repository by doing

  1. mvn install

Running SuperDevMode

Some flow internals use GWT in the client code. superDevMode allows to reload GWT changes on the fly, but it requires some setup first.

To start superDevMode do the following:

  1. Get flow source code
  2. If you are planning to launch the mode for the external application based on flow, first make sure that flow source code is of the same version as the application uses. If it's not true, either update the application dependencies or check out the corresponding flow tag and rebuild both flow and the application.
  3. Navigate to flow-client package in flow project
  4. Run mvn -Psdm clean install gwt:compile gwt:run-codeserver -DskipTests
  5. Start the application server
  6. Open the application page and use the bookmarks to control dev mode If you have no bookmarks, navigate to http://localhost:9876 to setup them.

In eclipse run .launch files from flow-client/eclipse in the order:

  1. Compile ClientEngine.launch
  2. Super Dev Mode.launch

NOTE! SuperDevMode should be compiled before the application server is launched, also, flow version should match with the application one as else the application won't be able to run SDM and you will receive the exception Can't find any GWT Modules on this page.

More info about SuperDevMode: http://www.gwtproject.org/articles/superdevmode.html

About

Flow is a Java framework for building modern web sites that look great and perform well.

License:Other


Languages

Language:Java 96.0%Language:JavaScript 2.6%Language:HTML 1.2%Language:CSS 0.1%Language:Shell 0.1%Language:Scala 0.0%