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.15 - for jServer 4.00 (open source, library only):

ALWAYS TAKE A BACKUP BEFORE USING A NEW VERSION!


ABMaterial 5.15 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.15:

1. Download https://github.com/RealAlwaysbusy/A...eleases/download/v5.15/ABMaterial5.15-bin.zip
2. Download https://github.com/RealAlwaysbusy/A...r4.00/releases/download/v5.15-www/www5.15.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.

ALTERNATIVE DOWNLOAD: Download the ABMMini project where everything is included (Library, www and a Template project):

Additional Resources:

Demo source code (for v4.51, not yet updated for 5.15, 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:

Harris

Expert
Licensed User
Longtime User
Hummm, something for AB to address it seems.
 

mindful

Active Member
Licensed User
Hi Alain, are you going to make a quick fix for this ? I encounter the same problem ... I can't compile. I have a standard class and a code module that I use in my project and since the 2.0 upgrade I can't compile.

B4X:
Waiting for debugger to connect...
Program started.
Collecting data from B4J source files... (1/2)
Error occurred on line: 97 (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 b4j.example.abmapplication._addpage(abmapplication.java:85)
    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 b4j.example.main.main(main.java:29)

If I run the template app (that came with the library) it compiles, but when I add my files to it (a code and class module) the above error is thrown!
 

alwaysbusy

Expert
Licensed User
Longtime User
Seeing Mihai's project, it seems ABMaterials analysing code has some problems when the methods are defined without using brackets:

The problem:

You may have a couple of methods written like this (no brackets):

Private Sub GetNewUniqueID As Long
End Sub

When you change them to (with brackets):

Private Sub GetNewUniqueID() As Long
End Sub

the compilation will continue.

I'll try to catch these in 2.01, but for now, adding the brackets could solve your problem.
 

stanmiller

Active Member
Licensed User
Longtime User
This will be first priority. Would you mind mailing me (alain.bailleul@pandora.be) your project? It would be useful to actually have a project that has this problem. Thanks in advance!

@alwaysbusy

Copy EXTRA.BAS or EXTRA2.BAS (attached) into any project. The Demo... the Template.... All will crash with it present.

Unlike EXTRA.BAS, EXTRA2.BAS is a valid, compilable module. Add it to the project and you get the same result. The web app throws an exception on startup.

So this is more about what the analyser is tripping over. What is in conflict?

For example, if I change Sub RootFolder to Sub xRootFolder in EXTRA2.BAS, the webapp will startup.

B4X:
Public Sub xRootFolder As String

    Return  ( sRootFolder ) 

End Sub
 

Attachments

  • extra2.bas
    234 bytes · Views: 299

stanmiller

Active Member
Licensed User
Longtime User
Seeing Mihai's project, it seems ABMaterials analysing code has some problems when the methods are defined without using brackets:

The problem:

You may have a couple of methods written like this (no brackets):

Private Sub GetNewUniqueID As Long
End Sub

When you change them to (with brackets):

Private Sub GetNewUniqueID() As Long
End Sub

the compilation will continue.

I'll try to catch these in 2.01, but for now, adding the brackets could solve your problem.

I see. Suffixing with empty parens worked. It now compiles.

B4X:
Public Sub RootFolder() As String
Return ( sRootFolder ) End Sub

In other words, every method without arguments should be given this treatment. I suppose one could write a RegEx expression and run across the project.
 

PCastagnetti

Member
Licensed User
Longtime User
I have the same problem too:
I have tried to insert the brackets in all sub but the problem is still present.

The line that blocks the compilation is this:
B4X:
PageNeedsUpload.Add(ABM.WritePageToDisk(Page, File.DirApp & "/www/" & AppName & "/" & Page.Name & "/", Page.PageHTMLName, ABMShared.NeedsAuthorization))

I also have a project that contains subs without brackets and everything works properly.

I look forward to the Ver. 2.01, but if you need I can provide a simplified project with the problem.

Thank you
 
Last edited:

PCastagnetti

Member
Licensed User
Longtime User
Thank @alwaysbusy you for your availability

I think I understand my problem:

it seems that ABMaterial verifies all .bas files, even those excluded from the project (I had a backup .bas where I had not added the brackets).

Thank you
 

incendio

Well-Known Member
Licensed User
Longtime User
Is online demo still available?
I tried, but only got running orange, blue & red circle.
 

Harris

Expert
Licensed User
Longtime User
Just tied it on several devices and seems to work. Press F5 (refresh).
I tried several hours ago from a site that never would connect (sat internet connection) - AND NOW IT DOES! Thanks to site re-factoring. Feedback also worked from this slow connection.
 

incendio

Well-Known Member
Licensed User
Longtime User
Just tried on-line demo on computer, it works.

Wow, Really impressed with its UI & functions, thanks for this framework.

I am a newbie in Java and web app, my main programming is in traditional client server database area with RDBMS database, connected via LAN/WAN using windows desktop application.

Currently, with the help from Remote Database Connector (RDC/Java RDC), I am able to expand database application with smartphone & tablet.

Can I use this framework to build web app that connect to RDBMS database via LAN or internet?
 

Harris

Expert
Licensed User
Longtime User
Just tried on-line demo on computer, it works.

Wow, Really impressed with its UI & functions, thanks for this framework.

I am a newbie in Java and web app, my main programming is in traditional client server database area with RDBMS database, connected via LAN/WAN using windows desktop application.

Currently, with the help from Remote Database Connector (RDC/Java RDC), I am able to expand database application with smartphone & tablet.

Can I use this framework to build web app that connect to RDBMS database via LAN or internet?

My short answer is - I don't know (not sure).

I use RDC with my B4A apps to connect (post new data and get system updates) with my MySQL backend.
I do this because I require a (local device) store and forward approach. Without local storage, you would demand full time internet connection to update your DB (which cannot be relied upon in my situation). Many others try this approach and fail more often than not.

Frankly, I don't see why, what you propose, could not be accomplished. B4J supports jRDC and ABM is built on top of B4J. Very interesting.

However, without a full time internet connection - one could not run (execute) the mobile application (ABM server app - in this case) to collect data / whatever it needs to do. Web-apps need a server to provide content / the entire app (HTML / JS). Hence, B4A / B4i that is stored / executed on device will do so (live on device) - and forward info upon internet service available (RDC).

Other knowledgeable members - please correct my erroneous statements for clarity, since all is my clouded interpretation.

(When ever we get sats up to provide ubiquitous cell service throughout the planet - this may be very possible - but don't hold your breath on this - you may expire long before it happens. That's what the EXPENSIVE sats are currently for (so you can buy additional hardware and services - with extremely low bandwidth!) ).

Thanks
 

Bladimir Carrillo

Member
Licensed User
Longtime User
Other knowledgeable members - please correct my erroneous statements for clarity, since all is my clouded interpretation...

I am using the scenario that you explain, and I think it is the only way for now in the world not to depend on a connection that can fail. ABM / B4J will always be on the server side and B4A / B4i will always be client side (mobile). It is necessary to work offline, store data locally (mobile) and make a subsequent synchronization step to the server. However in a scenario where you always have WiFi or data available, other options such as messaging (WebSocket, GCM, FireBase) are very useful.

Regards
 

Harris

Expert
Licensed User
Longtime User
However in a scenario where you always have WiFi or data available
Canada - A big (beautiful) country that lacks coverage everywhere. Provincial governments are now installing wifi in selected campgrounds (that are off the beaten track) so campers can stay connected. Venture outside these sites, you have no cell, no wifi, no F-all... (many say as it should be).

The mobile work force also has the same issue. Store and forward is the option.

I agree, when connection is available, use it. Otherwise, keep searching for a connection and update when found.
I live 15 km from a cell tower, yet have NO service.
City folks have this advantage over us country bumpkins... Mountains get in the way of cell signal.
 
Top