Skip to content

pyhoon/pakai-server-b4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pakai Server - Web Application framework

Version: 6.00

Create Web Application using B4J project template

Preview

Index


Templates

  • Pakai Server (6.00) starter.b4xtemplate recommended
  • Pakai Server (6.00) bundle.b4xtemplate (local css/js)
  • Pakai Server (6.00) min.b4xtemplate (assets excluded)

Depends on

Features

  • Frontend using HTMX v2.0.8, Bootstrap v5.3.8, Bootstrap Icons v1.13.1
  • Responsive design with modal dialog and toast
  • SQLite and MySQL/MariaDB backend
  • Built-in CRUD/REST examples

Improvement

  • Better UI/UX/DX compared to version 5.x
  • More flexible to generate new models
  • HTML generated using B4X
  • No JavaScript module
  • No jQuery AJAX parsing
  • JSON/XML API is optional
  • WebApiUtils is optional

Code Example

Private Sub CreateCategoriesTable As Tag
	Dim table1 As Tag = HtmlTable.cls("table table-bordered table-hover rounded small")
	Dim thead1 As Tag = Thead.cls("table-light").up(table1)
	thead1.add(Th.sty("text-align: right; width: 50px").text("#"))
	thead1.add(Th.text("Name"))
	thead1.add(Th.sty("text-align: center; width: 120px").text("Actions"))
	Dim tbody1 As Tag = Tbody.init.up(table1)
	
	DB.SQL = Main.DBOpen
	DB.Table = "tbl_categories"
	DB.Columns = Array("id", "category_name AS name")
	DB.OrderBy = CreateMap("id": "")
	DB.Query
	For Each row As Map In DB.Results
		Dim tr1 As Tag = CreateCategoriesRow(row)
		tr1.up(tbody1)
	Next
	DB.Close
	Return table1
End Sub

Support this project