B4J Question What about web development in 2026 under B4J?

Giu

Member
Licensed User
Longtime User
Hi all,

Just curious. If I need to create some API with a web interface, what's the idiomatic/mature/standard way to do it in B4J? If possible would like to avoid to create a "normal" UI with HTML and JS files, would like to do it all from B4 project.
 

aeric

Expert
Licensed User
Longtime User
I suggest you take a look on my Pakai Server project template.

or Pakai Casual
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Hi all,

Just curious. If I need to create some API with a web interface, what's the idiomatic/mature/standard way to do it in B4J? If possible would like to avoid to create a "normal" UI with HTML and JS files, would like to do it all from B4 project.

APIs are handled by handlers. F.e. if you post a JSON string of a map to a handler then you can get it back in the handler with the following code:

B4X:
Dim b() As Byte = Bit.InputStreamToBytes(req.InputStream)
Dim sJSON As String = BytesToString(b, 0, b.Length, "UTF-8")
Dim mMap As Map = sJSON.As(JSON).ToMap
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
BANano is not the successor of ABMaterial. It is a complete different framework. ABMaterial is jserver based, BANano is a B4J to html/css/Javascript transpiler. ABMaterial is very mature and doesn't need updates for quite some time. It was made open source so anyone can make changes if they think they are needed. It is still within our company used a lot. Together with our BANano transpiler to make PWAs.
 
Upvote 0

deliriousw

New Member
I suggest you take a look on my Pakai Server project template.

or Pakai Casual
hollow knight
Thanks for sharing these templates. Pakai Server looks particularly useful for building web apps
 
Upvote 0
Top