官术网_书友最值得收藏!

  • Kotlin Blueprints
  • Ashish Belagali Hardik Trivedi Akshay Chordiya
  • 198字
  • 2021-07-02 21:50:13

Project structure

The project contains two modules:

  • main module: This contains the development code
  • test module: This contains tests for the application

The main module contains:

  • Kotlin directory (similar to Java) where all the Kotlin is placed (note that it is not enforced that the Kotlin code goes into the Kotlin directory, but it is a good convention to follow. In case you place it under another directory, then make sure to make appropriate changes to build.gradle).
  • Resources directory contains static resources such as HTML, CSS, JS, and images for the web application.

Here is the package structure with the base package as com.book that we follow. Feel free to follow a similar structure in your projects:

  • db: This contains database related code (Exposed library code)
  • domain: This contains our data classes or model classes
  • repository: This contains our repository classes which abstract the database interaction
  • utils: This contains Extensions functions and some utility functions
  • web: This contains the URL controllers

The following screenshot shows the project structure:

For this project, we are going to use Kotlin v1.1.50, which is the latest version at the time of writing and IntelliJ IDEA to build the application.

主站蜘蛛池模板: 凯里市| 新乡县| 崇文区| 布拖县| 沧州市| 花莲市| 门源| 弥勒县| 淳化县| 黄浦区| 利津县| 德化县| 肥西县| 科技| 平山县| 陆河县| 东阳市| 开原市| 东乡族自治县| 陕西省| 田东县| 四子王旗| 井研县| 西乡县| 平武县| 鄂托克旗| 邛崃市| 怀柔区| 如东县| 汉川市| 平乐县| 保山市| 淮南市| 文水县| 肇源县| 嘉荫县| 平遥县| 阿勒泰市| 蛟河市| 织金县| 襄汾县|