B4J Library [Web][ABMaterial] Framework for WebApps

TIP: For absolute beginners with ABM, Get started with the Mini Template
TIP: Get started with 'ABMaterial For Dummies' by Harris here! (lessons)
TIP:
My mini course on Youtube by MichalK73

ABMaterial is a framework combining a tuned Materialize CSS with the free programming tool B4J. It allows creating WebApps that not only look great thanks to Googles Material Design, but can be programmed with the powerful free tool from Anywhere Software without any knowledge of HTML, CSS or Javascript.

ABMDragonfly4.00.png


ABMaterial has over 45 themeable controls and some useful helpers.

Components:

  • ABMActionButton
  • ABMAudioPlayer (1.08)
  • ABMBadge
  • ABMButton
  • ABMCanvas
  • ABMCalendar
  • ABMCard
  • ABMChart (Plugin support 2.00)
  • ABMChat (2.50)
  • ABMCheckbox
  • ABMChronologyList (2.00)
  • ABMCombo
  • ABMCustomControl (1.05)
  • ABMChip
  • ABMCodeLabel
  • ABMDivider
  • ABMDateTimeScroller (1.06)
  • ABMDateTimePicker (1.06)
  • ABMEditor (1.07)
  • ABMFileInput (1.20+)
  • ABMGoogleMap
  • ABMLabel
  • ABMList
  • ABMImage
  • ABMImageSlider
  • ABMInputField
  • ABMRadioGroup
  • ABMPagination (1.04)
  • ABMPatternLock (1.20+)
  • ABMPDFViewer (1.08)
  • ABMPercentSlider (2.50)
  • ABMPlanner (2.50)
  • ABMPivotTable (1.08)
  • ABMRange (1.05)
  • ABMSignaturePad
  • ABMTimeLine (1.10, depreciated in 4.00)
  • ABMSlider (1.05)
  • ABMSmartWizard (3.00)
  • ABMSocialShare (1.07)
  • ABMSocialOAuth
  • ABMSVGSurface (1.20+)
  • ABMSwitch
  • ABMTabs
  • ABMTreeTable (1.04)
  • ABMUpload
  • ABMVideo

Helpers:
  • ABMContainer
  • ABMFlexWall (1.10)
  • ABMGenerator (1.07)
  • ABMModalSheet
  • ABMNavigationBar
  • ABMPage
  • ABMParallax
  • ABMSideBar (2.00)
  • ABMTable
  • ABMTableMutable (1.20+)
Other:
  • Firebase Auth (1.20+)
  • Firebase Storage (1.20+)
  • Configurable App and Content folders (2.00)
  • Lorem Ipsum Generator (2.00)
  • Grid Builder (2.00+)
The Grid Builder:
With the Grid Builder you can build the responsive framework very easy. This has been the most difficult part for beginners to understand. But now with the builder, you have no reason to not use ABMaterial :)

gridbuilder1.png


There is an online demo at http://abmaterial.com
Alternative url: http://prd.one-two.com:51042/demo/

NEW: You can now support BANano and ABMaterial here too: https://www.patreon.com/alwaysbusy


This means it is free to use, but consider this: it took me already thousands of hours to program ABMaterial, all done in my free time early in the morning and deep into the night. Not only will a donation push me to continue developing ABMaterial , remember, you'll get a warm and fuzzy feeling doing it!

Download version 5.14 - for jServer 4.00 (open source, library only):

ALWAYS TAKE A BACKUP BEFORE USING A NEW VERSION!


ABMaterial 5.12 is now available on github and is open sourced :cool: (AS IS)! This version has been in heavy use (development and production) within our company for over a year now without major alterations, so I consider it very stable and ready to be open sourced.

I trust no one here will publish a clone or take credit for my work and I would consider it common courtesy if you find a bug/fix/new feature, you report back to me so I can make the same changes in the official library and everyone can benefit from it.


Note: next to downloading the library, you need also to download the accompanying www zip files from the same github (releases) containing the latest javascript/css/font files.

The procedure from Github for 5.14:

1. Download https://github.com/RealAlwaysbusy/A...eleases/download/v5.14/ABMaterial5.14-bin.zip
2. Download https://github.com/RealAlwaysbusy/A...r4.00/releases/download/v5.14-www/www5.14.zip
3. Unzip ABMaterial5.14-bin.zip and copy all .xml and .jar files to you B4J Libraries folder
4. Unzip www5.14.zip
5. In the projects you are working on (e.g. a for Dummies project) delete the following folders in \www
  • css
  • font
  • js
6. Copy from the unzipped www5.12.zip the 3 folder (css/font/js) to the \www folder where you just deleted these 3 folders.

Additional Resources:

Demo source code (for v4.51, not yet updated for 5.12, but still usefull to learn ABM): https://gorgeousapps.com/ABMExtras4.51.zip

I hope you enjoy it as much as I did creating it and I look forward to see the killer apps you will make with ABMaterial!

Also consider BANano if you are planning to write Websites/Apps in B4J!

Alain Bailleul
Alwaysbusy's Corner
 
Last edited:

stanmiller

Active Member
Licensed User
Longtime User
@stanmiller Please start a new thread for you question using [ABMaterial] in the subject. Thank you.

Yes, it is hardcoded in many cases. Does your solution work? Maybe I can add a parameter to ABMaterial where you specify the folder. Default "www", but you can change it to e.g. "public_html".

In you own B4J code, you would of course still need to replace the www's by public_html as you did now.

If this suits you, add it as a feature request to the ABMaterial feedback app, otherwise it will be forgotten as I'm working on another part of ABMaterial now.

I created a thread proposing two configurable paths. One path to the webapp.jar and a second to the content.

ABMaterial-Request for configurable App and Content folders
https://www.b4x.com/android/forum/t...r-configurable-app-and-content-folders.71018/

I'm heading out for an early weekend away. When I get back Monday, I'll add the request through the feedback app.
 
Last edited:

KingKing

Member
Licensed User
Longtime User
Hi, I sorry. I canot find 'Getting Started' page for ABMaterial. Could anyone please post the link. Thanks.
 

KingKing

Member
Licensed User
Longtime User
Thanks a lot. After I download the demoassets.zip, i try to unzip it. it says "Unexpected end of archive".
Do you still have alternative download link?
 

amminf

Active Member
Licensed User
Longtime User
Trying to migrate to ABM v2.00:

Compiling a project based on ABM demo sources, I updated the font folders, js and css. I also copied all the .jar (and .xml) to b4j libraries folder.

Nevertheless, I get the following compilation error. The source lines where they are produced are these:

Sub public AddPage (page As ABMPage)
Pages.Add (page.Name)
Log (page.Name & "- entering -" & File.DirApp & "/ www /" & AppName & "/" & page.Name & "/" & "-" & page.PageHTMLName)

'This line (#169) fired error:
PageNeedsUpload.Add (ABM.WritePageToDisk (page, File.DirApp & "/ www /" & AppName & "/" & page.Name & "/" page.PageHTMLName, ABMShared.NeedsAuthorization))

Log (page.Name & "- out")
End Sub





Waiting for debugger to connect ...
Program started.
init mysql
log4j: WARN No appenders Could be found for logger (com.mchange.v2.log.MLog).
log4j: WARN Please initialize the log4j system properly.

before opening falsefalse
looking here 1 false
looking here 2 truefalse
defects false true
watching Here 1
here in >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
watching Here 1
here in >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AboutPage - entering - C: \ DOCUME ~ 1 \ Antonio \ MYDOCU ~ 1 \ B4A-TO ~ 1 \ B4J \ ABMATE ~ 1 \ ABMV2 ~ 1.00 \ ABMV2 ~ 1.00T \ ONMATE ~ 1.08 \ Objects / www / onmaterial / AboutPage / - abmaterial-about.html
Collecting data from source files B4J ... (1/2)
Error occurred on line: 169 (ABMApplication)
java.lang.NullPointerException
at com.ab.abmaterial.ExtractResultModule.ExtractMethods (Unknown Source)
at com.ab.abmaterial.ExtractResultModule.PrepareModule (Unknown Source)
at com.ab.abmaterial.ABMaterial.CheckApp (Unknown Source)
at com.ab.abmaterial.ABMaterial.WritePageToDisk (Unknown Source)
at onmaterial.alcisoft.com.abmapplication._addpage (abmapplication.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod (Shell.java:612)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl (Shell.java:229)
at anywheresoftware.b4a.shell.Shell.raiseEvent (Shell.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2 (BA.java:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2 (ShellBA.java:90)
at anywheresoftware.b4a.BA.raiseEvent (BA.java:84)
at onmaterial.alcisoft.com.main.main (main.java:29)
 
Last edited:

stanmiller

Active Member
Licensed User
Longtime User
Waiting for debugger to connect ...
Program started.
init mysql
log4j: WARN No appenders Could be found for logger (com.mchange.v2.log.MLog).
log4j: WARN Please initialize the log4j system properly.

before opening falsefalse
looking here 1 false
looking here 2 truefalse
defects false true
watching Here 1
here in >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
watching Here 1
here in >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
AboutPage - entering - C: \ DOCUME ~ 1 \ Antonio \ MYDOCU ~ 1 \ B4A-TO ~ 1 \ B4J \ ABMATE ~ 1 \ ABMV2 ~ 1.00 \ ABMV2 ~ 1.00T \ ONMATE ~ 1.08 \ Objects / www / onmaterial / AboutPage / - abmaterial-about.html
Collecting data from source files B4J ... (1/2)
Error occurred on line: 169 (ABMApplication)
java.lang.NullPointerException
at com.ab.abmaterial.ExtractResultModule.ExtractMethods (Unknown Source)
at com.ab.abmaterial.ExtractResultModule.PrepareModule (Unknown Source)

I'm getting the same error with a very simple project based on the template example. The line number where the error is reported seems random. I get different line numbers when I compile in debug vs. release. And the reported line seems unrelated. Note the "Collecting data from sources files B4J ... (1/2)" should be followed by "Analysing data from BJ source files... (2/2)" on a successful build. That second line is missing.

See post here:
https://www.b4x.com/android/forum/threads/abmaterial-framework-for-webapps.60072/page-21#post-457751
 
Last edited:

Harris

Expert
Licensed User
Longtime User
1. Try deleting everything in www folder of your project.
2. Copy in the "css","font",and "js" folders from the www folder of the sample template project.
3. Rebuild your app and let ABM create the folders and initial pages.
4. Copy in the images back into your app/images folder.

Correction:
2. Copy in the "css","font",and "js" folders from the Library/www folder in the zip

Clear the cache as well. Update your version number, if you use one ( Public AppVersion As String = "2" ' - in ABMShared)

My version 2 update is working fine... although I have been miffed before... (using template folder (for js,font,css) was the initial problem way back when...)
 

stanmiller

Active Member
Licensed User
Longtime User
Correction:
2. Copy in the "css","font",and "js" folders from the Library/www folder in the zip

Clear the cache as well. Update your version number, if you use one ( Public AppVersion As String = "2" ' - in ABMShared)

My version 2 update is working fine... although I have been miffed before... (using template folder (for js,font,css) was the initial problem way back when...)


I think I found the glitch.

On startup ABM appears to be scanning the .BAS files in the source folder (regardless whether the .BAS file is a member of the project).

Attached is the file EXTRA.BAS. If you simply include this file in your project folder (not add to the project) the server will crash on startup with a Null pointer exception.

Contents of EXTRA.BAS:
B4X:
Sub Process_Globals

End Sub

Public Sub RootFolder As String

    Return  ( sRootFolder )

End Sub

If you change the Sub name to xRootFolder the server will start as normal.
B4X:
Sub Process_Globals

End Sub

Public Sub xRootFolder As String

    Return  ( sRootFolder )

End Sub

So it appears that ABM is looking for keywords in the source files and using that to build content. The challenge is finding which file in your sources is in conflict.
 

Attachments

  • extra.bas
    200 bytes · Views: 229
Last edited:

Harris

Expert
Licensed User
Longtime User
I think I found the glitch. On startup ABM appears to be scanning the .BAS files in the source folder (regardless to whether or not they are members of the project).

Attached is the file EXTRA.BAS. If you include this file in your project folder the server will crash on startup with a Null pointer exception.

Contents of EXTRA.BAS:
B4X:
Sub Process_Globals

End Sub

Public Sub RootFolder As String

    Return  ( sRootFolder )

End Sub

If you change the Sub name to xRootFolder the server will start as normal.
B4X:
Sub Process_Globals

End Sub

Public Sub xRootFolder As String

    Return  ( sRootFolder )

End Sub

So it appears that ABM is looking for keywords in the source files and using that to build content. The challenge is finding which file in your sources is causing the error.

That's weird? How did it ever work before? Something new in 2.0 ?
How the heck would you find such a .bas...? Did you ever call RootFolder and was there a sRootFolder to return?

Likely the issue: [regardless to whether or not they are members of the project]...
 

stanmiller

Active Member
Licensed User
Longtime User
That's weird? How did it ever work before? Something new in 2.0 ?
How the heck would you find such a .bas...? Did you ever call RootFolder and was there a sRootFolder to return?

Likely the issue: [regardless to whether or not they are members of the project]...

Sub RootFolder comes from WEBAPP.BAS I wrote about here:

https://www.b4x.com/android/forum/t...le-app-and-content-folders.71018/#post-452228

I found that adding WEBAPP.BAS to the project would cause the Null exception. Then it was a matter of trimming the code to find what triggered it.

What interesting is that EXTRA.BAS won't compile in B4J as sRootFolder is undefined. Nor is it a member of the project. It's simply a random file with a .BAS extension.
 
Top