Skalholt

Scala code generator for Play Framework and Slick

View the Project on GitHub tishub/skalholt.g8

What is Skalholt?

Skalholt is a source code generator which improves efficiency of web application development in Scala. It can generate source codes based on Play framework and Slick from database schema, and also it can add some additional information that is not be captured from the database schema to the source codes.

Once you prepare DB schema and execute Skalholt, then you can get simple CRUD application. Skalholt works as Web application, so you can browse and edit generated design information in design repository. With this feature, you can make the application more suitable for your needs than Scaffold.

We aim to improve the efficiency of web application development that uses Play framework and Slick, which are going to be de facto standard. Additionally, we aim to help developers who feel difficult to learn these frameworks.

Main feature

  1. Generate source codes based on Play Framework and Slick
  2. Scaffolding: i.e. generate source codes from DB schema
  3. Improve application by editing design information in the repository which describe application structure
  4. If you have installed sbt, you can use from "sbt new"

Release Note

Skalholt Architecture

Skalholt is a web application template base on Play Framework. template.

The directory structure of the project cloned by github is as follows:

 Skalholt-Template
    +---app
    |     (application source codes to be developed; generated automatically by Skalholt)
    +---conf
    |     (settings)
    +---skalholt/lib
    |     (Skalholt libraries)
    +---skalholt.h2.db
    |     (design repository data file; H2 Database)
    \---skalholt.bat
          (batch file to invoke Skalholt)

You can use Skalholt in the following steps:

1. Invoke Skalholt code generator. It will gather necessary information to generate application from business database, insert them into design repository, and generate source codes.

(1) Create design information tables in design repository
(2) Generate source codes from business (application) database
(3) Generate source codes from design repository

2. Edit contents of design repository using Skalholt web UI, and then re-generate source codes

(4) Edit the contents of design repository
(5) Re-generate source codes

Generate flow

The architecture of web application to be built is based on Play Framework. "Controller"s and "View"s are generated based on the contents of design repository, and "Model"s are generated base on business database schema's structure. The structure of Design repository is as follows.

Design Repository

Skalholt is tested with the following DBMS.

How to install

All you need is sbt to use Skalholt. No other tools are needed. Please refer to "Installing sbt" about required environment and setup procedure for sbt.

How to use

Preparation

1. Create blank project

2. Prepare and invoke Database

* When you use the other schema than that is already prepared, Please prepare DB schema used by application, and configure "application.conf" to connect the database.

3. Execute application

Generate source codes

1. Execute Skalholt. It will gather necessary information to generate application from business database, insert them into design repository, and generate source codes.

2. Edit contents of design repository, and then re-generate source codes.

Edit Screen Detail

License

Skalholt is released under the Apache License version2.0.