derive CRUD pages

You can quickly generate basic pages for creating, reading, updating and deleting entities using derive CRUD -entityname-. It will create pages that allows creating and deleting such entities, and editing of all entities of this type in the database.

Example:

application test

entity User {
  username    :: String
}

derive CRUD User

//application global var
var u_1 := User{username:= "test"}

define page root(){
  navigate(createUser()){ "create" } " "
  navigate(user(u_1)){ "view" } " "
  navigate(editUser(u_1)){ "edit" } " "
  navigate(manageUser()){ "manage" }
}

As the navigates indicate, the pages that are created are:

view:

define page entity(arg:Entity){...}

create:

define page createEntity(){...}

edit:

define page editEntity(arg:Entity){...}

manage (delete):

define page manageEntity(){...}

These pages are particularly useful when you're just constructing the domain model, because the generated pages are usually too generic for a real application.