Giter VIP home page Giter VIP logo

vaadin-fluent-api's Introduction

Fluent API for Vaadin 8

This library is a Vaadin 8 server side complement to code components fluently (like builder pattern).

Download release

Official releases of this add-on are available at Vaadin Directory. For Maven instructions, download and reviews, go to https://vaadin.com/directory#!addon/fluent-api-for-vaadin

Development with Eclipse IDE

For further development of this add-on, the following tool-chain is recommended:

  • Eclipse IDE
  • m2e wtp plug-in (install it from Eclipse Marketplace)
  • Vaadin Eclipse plug-in (install it from Eclipse Marketplace)
  • Chrome browser

Importing project

Choose File > Import... > Existing Maven Projects

Note that Eclipse may give "Plugin execution not covered by lifecycle configuration" errors for pom.xml. Use "Permanently mark goal resources in pom.xml as ignored in Eclipse build" quick-fix to mark these errors as permanently ignored in your project. Do not worry, the project still works fine.

Release notes

Version 1.0

  • FTextField
  • FTextArea
  • FComboBox
  • FFormLayout
  • FVerticalLayout
  • FHorizontalLayout
  • FCssLayout
  • FGridLayout
  • FPanel
  • FCheckBoxGroup
  • FListSelect
  • FTwinColSelect
  • FAction

Version 1.1

  • FButton
  • FNativeButton
  • FNativeSelect
  • FRadionButtonGroup
  • FLabel
  • FLink
  • FCheckBox
  • FTabSheet

Version 1.2

  • FMenuBar
  • FProgressBar
  • FPopupView
  • FHorizontalSplitPanel
  • FVerticalSplitPanel
  • FSlider
  • FRichTextArea
  • FDateField
  • FInlineDateField
  • FDateTimeField

Version 1.3

  • FGrid
  • FTree
  • FTreeGrid
  • FAudio
  • FVideo
  • FPasswordField
  • FAccordion
  • FWindow
  • FUpload
  • FNotification
  • FCustomLayout
  • FColorPicker
  • FColorPickerArea

Roadmap

This component is developed as a hobby with no public roadmap or any guarantees of upcoming releases. That said, the following features are planned for upcoming releases:

  • All fluent components are implemented. If new components or new setter methods are available in newer Vaadin releases, they will be implemented. In any case, you can write an issue for missing methods or components.

Issue tracking

The issues for this add-on are tracked on its github.com page. All bug reports and feature requests are appreciated.

Contributions

Contributions are welcome, but there are no guarantees that they are accepted as such. Process for contributing is the following:

  • Fork this project
  • Create an issue to this project about the contribution (bug or feature) if there is no such issue about it already. Try to keep the scope minimal.
  • Develop and test the fix or functionality carefully. Only include minimum amount of code needed to fix the issue.
  • Refer to the fixed issue in commit
  • Send a pull request for the original project
  • Comment on the original issue that you have implemented a fix for it

License & Author

Add-on is distributed under Apache License 2.0. For license terms, see LICENSE.txt.

This library is written by Jean-Christophe Fortier. Thanks to the viritin add-on which have inspired me greatly.

Developer Guide

Getting started

Each ui component class is available with their fluent counter part working out-of-the-box.

Ex : TextField => FTextField

Each setter has also its fluent version prefixed with the word "with" instead of "set".

Ex: new FTextField().withCaption("test").withRequiredIndicatorVisible(true).withWidth("100px").withPlaceholder("enter text");

Each fluent class implements a fluent interface which adds the fluent methods. Therefore, it's easy to add fluent functionality to an existing component : just implement the right interface.

Lets say you have a custom ComboBox doing fancy stuff in your project and you want to add fluent way to code it. Implement the FluentComboBox interface.

Ex :

public class MyComboBox<T> extends ComboBox<T> implements FluentComboBox<MyComboBox<T>, T> {
 
}

Limitations

When using a component using a listing (with T generic type) like FComboBox for example, the generic type must be specified with the constructor when using fluent methods.

Ex: FComboBox<MyPojo> myComboBox = new FComboBox<MyPojo>().withCaption("My combo box");

API

Fluent API for Vaadin JavaDoc is available online at https://viydaag.github.io/vaadin-fluent-api/docs/javadoc

vaadin-fluent-api's People

Contributors

viydaag1 avatar viydaag avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.