All Projects → hakandilek → Play2 Crud

hakandilek / Play2 Crud

Licence: other
Simple CRUD & DAO implementation for play2

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Play2 Crud

Play Redis
Play framework 2 cache plugin as an adapter to redis-server
Stars: ✭ 152 (+4.11%)
Mutual labels:  playframework, play-framework
play-ebean
Play Ebean module
Stars: ✭ 29 (-80.14%)
Mutual labels:  play-framework, playframework
Play Mailer
Play mailer plugin
Stars: ✭ 243 (+66.44%)
Mutual labels:  playframework, play-framework
Play26 Swagger Reactivemongo
A fully featured CRUD app built with Play 2.6, Swagger and ReactiveMongo
Stars: ✭ 36 (-75.34%)
Mutual labels:  crud, play-framework
sbt-sass
A fork of the sbt-sass repository which seems to be abandoned.
Stars: ✭ 32 (-78.08%)
Mutual labels:  play-framework, playframework
Play Pdf
A PDF module for the Play framework
Stars: ✭ 108 (-26.03%)
Mutual labels:  playframework, play-framework
Crudapi
Go implementation of a RESTful JSON API exposing CRUD functionality relying on a custom storage.
Stars: ✭ 121 (-17.12%)
Mutual labels:  crud
Play Monadic Actions
A simple scala DSL to allow clean and monadic style for Play! Actions
Stars: ✭ 129 (-11.64%)
Mutual labels:  playframework
Django Crud Ajax Login Register Fileupload
Django Crud, Django Crud Application, Django ajax CRUD,Django Boilerplate application, Django Register, Django Login,Django fileupload, CRUD, Bootstrap, AJAX, sample App
Stars: ✭ 118 (-19.18%)
Mutual labels:  crud
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+1119.18%)
Mutual labels:  crud
Vaadin On Kotlin
Writing full-stack statically-typed web apps on JVM at its simplest
Stars: ✭ 141 (-3.42%)
Mutual labels:  crud
Api First Hand
API-First bootstrapping tool for building RESTful web services from a Swagger/OpenAPI spec
Stars: ✭ 138 (-5.48%)
Mutual labels:  play-framework
Avue
Avue.js2.0是基于现有的element-ui库进行的二次封装,简化一些繁琐的操作,核心理念为数据驱动视图,主要的组件库针对table表格和form表单场景,同时衍生出更多企业常用的组件,达到高复用,容易维护和扩展的框架,同时内置了丰富了数据展示组件,让开发变得更加容易
Stars: ✭ 1,789 (+1125.34%)
Mutual labels:  crud
Lowcode
Low-code platform design rule
Stars: ✭ 118 (-19.18%)
Mutual labels:  crud
Izanami
Izanami is a shared configuration, feature flipping and A/B testing server well-suited for micro-service architecture implementation.
Stars: ✭ 133 (-8.9%)
Mutual labels:  playframework
Slick Repo
CRUD Repositories for Slick based persistence Scala projects.
Stars: ✭ 120 (-17.81%)
Mutual labels:  crud
Typegraphql Prisma
Prisma 2 generator to emit TypeGraphQL types and CRUD resolvers from your Prisma 2 schema
Stars: ✭ 137 (-6.16%)
Mutual labels:  crud
Model2app
Turn your Swift data model into a working CRUD app.
Stars: ✭ 118 (-19.18%)
Mutual labels:  crud
Play Jsmessages
Library to compute localized messages of your Play application on client side
Stars: ✭ 125 (-14.38%)
Mutual labels:  playframework
Play Mockws
Mock WS client for Play Framework
Stars: ✭ 134 (-8.22%)
Mutual labels:  playframework

play2-crud

Join the chat at https://gitter.im/hakandilek/play2-crud

Powerful CRUD & DAO implementation with REST interface for play framework 2.x

For the Typesafe Activator check play2-crud-activator.

Some screenshots

  • index page crud-index page

  • create page create page

  • list page list page

Quick Start

Follow these steps to use play2-crud. You can also use it partially just for DAO or CRUD controllers. If you think any part needs further explanation, please report a new issue.

Add play2-crud dependency

You can begin with adding play2-crud dependency inside conf/Build.scala file.

  • Add app dependency:
    val appDependencies = Seq(
        javaCore, javaJdbc, javaEbean,
        "play2-crud" % "play2-crud_2.10" % "0.7.0"
    )

  • Dependency version is for version 0.7.0 defined, but you can use the latest version.

  • Add custom maven repositories:

    val main = play.Project(appName, appVersion, appDependencies).settings(
        //maven repository
        resolvers += "release repository" at  "http://hakandilek.github.com/maven-repo/releases/",
        resolvers += "snapshot repository" at "http://hakandilek.github.com/maven-repo/snapshots/"
    )

Associate Global settings

Direct reference

If you don't want to override the play application launcher, you just have to notice to play that the class to use as launcher is now GlobalCRUDSettings. Change the application.global configuration key in the conf/application.conf file, and use play.utils.crud.GlobalCRUDSettings:

...
application.global=play.utils.crud.GlobalCRUDSettings
...

Define routes

# CRUD Controllers
->     /app             play.crud.Routes

# REST API
->     /api             play.rest.Routes

Define model

  • Model class has to implement play.utils.dao.BasicModel with the type parameter indicating the type of the @Id field.
@Entity
public class Sample extends Model implements BasicModel<Long> {

   @Id
   private Long key;

   @Basic
   @Required
   private String name;

   public Long getKey() {
      return key;
   }

   public void setKey(Long key) {
      this.key = key;
   }

   public String getName() {
      return name;
   }

   public void setName(String name) {
      this.name = name;
   }
}
  • Here the Sample model class implements BasicModel<Long> where key field indicated with @Id is Long.

... call http://localhost:9000/app and voila!

Samples

HOW-TO

Here you can find some HOW-TO documents introducing some powerful functionality:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].