Giter Site home page Giter Site logo

kbtaniguchi / vaadin-ddd-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 0.0 6.03 MB

demo application with DDD and MVP by Spring Boot and Vaadin Framework8.

Java 99.86% Shell 0.14%
vaadin8 springboot mvp-architecture ddd-architecture selenide jgiven mybatis gradle lombok

vaadin-ddd-demo's Introduction

vaadin-ddd-demo

Demo application with DDD and MVP by Spring Boot and Vaadin Framework8.

Description

frameworks

supported database

tools

Usage

setup database

  • install PostgreSql.
  • create user + database, and grant all to the user.
postgres=# CREATE USER vaadin_demo_app_user WITH PASSWORD 'abcdefg';
CREATE ROLE
postgres=# CREATE DATABASE vaadin_demo_app;
CREATE DATABASE
postgres=# GRANT ALL ON DATABASE vaadin_demo_app TO vaadin_demo_app_user;
GRANT

start application

./bootRun.sh

access http://localhost:8080/

Wiki

more information refer to https://github.com/bububu10/vaadin-ddd-demo/wiki

vaadin-ddd-demo's People

Contributors

kbtaniguchi avatar

Stargazers

 avatar

vaadin-ddd-demo's Issues

テスティングフレームワークについてのメモ

Geb+Spockが割と一般的なんだろうけど、せっかくVaadinを使って「UIまで全部Javaで書ける」感じなので、groovyを導入せずに済むSelenide+JGivenを使ってみている。
testの本体+PageObjectの間にStageという概念が入ることで割とすっきりするので、なかなかいい感じがしている。ただ、細かいデータバリエーションまで検証するテストを書くと煩雑になりそう。EndToEndのシナリオテストでは正常系+主要な異常系に留めるのがコストに見合う感じがする。

データバリエーションのテストについてはJGivenではspockの書きやすさにはかなわない感じがする。アプリケーション側のサービスレベルのテストはspockがよさげ。

how to reactive?

  • ApplicationUI: side menu

  • UserAdminVIew's: control button set and search panel

  • Now ↓
    2017-10-15 12 26 42

バックエンド側のエラーのハンドリング

ui側でvalidationした結果は明示的にハンドリングしてviewにラベルとして表示しているが、
バックエンド側で発生したエラーは現状特にハンドリングしておらず、Vaadin任せ。

Vaadinのデフォルトだと↓みたいになる。(UserIdの一意key制約違反)
2017-10-15 12 38 55

予期しないエラーはこれでいい気がするが、予め想定できるエラー(一意key制約違反とか、楽観ロックエラーとか)はちゃんとハンドリングすべき。どうやるのが一番良さそうか。

JGivenのHtmlレポートをgradleのtaskで出力する

http://jgiven.org/jgiven-report/html5/
↑みたいなレポートが出せるので出したい。

公式ドキュメント( http://jgiven.org/userguide/#_html_report )によるとcom.tngtech.jgiven.gradle-pluginを使えば出せるらしいがよくわからない。とりあえずpluginを入れてはある。
https://github.com/bububu10/vaadin-ddd-demo/blob/8cbb99d3f0b2294f54f54ec8949691ca198ba4eb/demo-ui/build.gradle#L19-L23

実行すると↓のようになる。sourceになるjsonは出てるので、そのjsonが入っているディレクトリへの参照をどこかで設定すればいいんだろうが、どうやって設定すればいいのかが分からない。(build.gradleかapplication-test.propertiesのどちらかで設定できるといいな)

13:00:07: Executing external task 'jgivenTestReport'...
Using Gradle Vaadin Plugin 1.2.5
:demo-ui:jgivenTestReport NO-SOURCE

BUILD SUCCESSFUL in 13s
13:00:20: External task execution finished 'jgivenTestReport'.

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.