GithubHelp home page GithubHelp logo

hello-kotlin-server's Introduction

使用ライブラリ

JetBrains 製の Web フレームワーク。

coroutine を使用した非同期処理がベースになっている。

Web のみをカバーするシンプルなもの (実際は Client もカバーするようであるが)。

Netty, Jetty 等を使用して動く(servlet としても動く)。

ORM 等は別途選定する必要がある。

JSON ライブラリ。

Jackson よりパフォーマンスが良さそう。

こちらはリフレクションベース。

Dagger はコード生成ベース。

どちらにするかは要検討。

ORM

TODO

  • jOOQ
    タイプセーフ SQL。 join したものを POJO にマッピングする等がすこし手間がかかりそう。
  • Exposed JetBrains が作っているが、まだ "Exposed is a prototype for a lightweight SQL library" って書いてあって怖い。 JOOQ を kotlin に特化したような感じ?
  • JPA + Querydsl
    JPA の query builder が使いづらい部分を補える。
  • Spring Data JPA Spring 導入するなら。
  • Doma 日本で比較的使われていそう。

LSF4J は logging ライブラリの facade。
裏で動く実際の logging ライブラリが Logback。

開発環境構築

Docker (つまり gradle) で動かす場合、 Continuous Build (watch) がまだ incubating feature であり、 いろいろと問題 があるので、 IDE で動かすほうが良さそう。

Web サーバ を IDE 上で動かす

日常の操作

auto reload

http://ktor.io/servers/autoreload.html

.class ファイルが更新されると自動で load する。 対象となる .class は out という名前のフォルダにあるもの。

  • ソースを IDEA の Build > Build Project でコンパイルすると再読込される

デバッグ

IDE から Run > Debugio.ktor.server.netty.DevelopmentEngine を実行する

テストの実行

依存関係の追加

build.gradle を編集する

hello-kotlin-server's People

Contributors

rinunu 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.