B4J Question [BANano] [BVAD3] Simple Form Example with no need of php and running on Jetty ?

Magma

Expert
Licensed User
Longtime User
Hi there...

well i am trying to get understand the way of using better and simple the BANano (great tool) and BVAD3 (a great library for tool) but i am falling at deeper holes... well all examples and tutorials using laragon server (and not jetty)...

Can i have a simple example with

1. a contact form
2. table of some data (if it is possible to be editable)

with just the use of template and abstract designer and ofcourse running at Jetty (no need 3rd party applications or servers)

is it possible?
is there any ready example with all these ?
is there a tutorial of BVAD3 with no need of php/laragon... or all need the php ... :-( ???
 

Mashiane

Expert
Licensed User
Longtime User
Hi @Magma

Thank you for your kind words. Appreciated.

A1. Yes its possible, even outside of BVAD3 framework, if you visit, https://mashiane.github.io/BANanoVuetifyAD3/#/textfields

1621512804580.png


From the source code files, there are referenced with the name of the code modules as per provided source code.

B4X:
drwlist.AddItemParentChild("", "mforms", "mdi-cog", "", "Form Inputs", "")
    drwlist.AddItemParentChild("mforms", ViewDatePicker.name, "", "", "Date Picker", ViewDatePicker.path)
    drwlist.AddItemParentChild("mforms", ViewTextFields.name, "", "", "Text Fields", ViewTextFields.path)
    drwlist.AddItemParentChild("mforms", ViewSelects.name, "", "", "Selects", ViewSelects.path)
    drwlist.AddItemParentChild("mforms", ViewFormControls.name, "", "", "Form Controls", ViewFormControls.path)
    drwlist.AddItemParentChild("mforms", ViewRadioGroup.name, "", "", "Radio Groups", ViewRadioGroup.path)
    drwlist.AddItemParentChild("mforms", ViewSwitches.name, "", "", "Switches", ViewSwitches.path)
    drwlist.AddItemParentChild("mforms", ViewTextArea.name, "", "", "Text Area", ViewTextArea.path)
    drwlist.AddItemParentChild("mforms", ViewCheckBoxes.name, "", "", "Check Boxes", ViewCheckBoxes.path)
    drwlist.AddItemParentChild("mforms", ViewFileInput.name, "", "", "File Inputs", ViewFileInput.path)
    drwlist.AddItemParentChild("mforms", ViewSliders.name, "", "", "Sliders", ViewSliders.path)
    drwlist.AddItemParentChild("mforms", ViewRating.name, "", "", "Rating", ViewRating.path)

For example, if you want to see how the TextFields above were created, see the code in the ViewTextFields code module. If you also want to see how selects are created, open the ViewSelects code module.

To create layouts via the abstract designer, you will need to use the VueElement generic custom view. This will change in the future as we are working towards making available the generic components like TextFields, DatePickers as individual custom view. You can see the YT videos on how to do that. Here is the link to the YT Playlist,



A2. Sadly there is no BANano example that we can learn from that we can replicate to any other UX framework.
A3. A2 refers. With that said, BVAD3 has been explored with BANanoFireStore, BANanoSQL, BANanoLocalStorage, BANanoNEDB, the last 3 using IndexedDB. These do not use PHP but built in classes. You can see this from the Databases section of the source code.

1621513437641.png




Our work with BANanoServer (jetty) & BANano is still a work in progress, you can see our many questions and tries and things we were able to solve and not solve as yet here, https://www.b4x.com/android/forum/pages/results/?query=bananoserver

Later!?
 

Attachments

  • 1621512804653.png
    1621512804653.png
    99 KB · Views: 135
Upvote 0

Magma

Expert
Licensed User
Longtime User
Well after replacing some lines at start of the code and using jserver, also rem bp.open and exit application was able to run it at jetty.... ;-)

The same with bananowix which is easier (i am vb6 programmer) but its using php for databases.. :-(

Waiting the new designer for bvad3 ... Hope to be drag n drop + all code hope to be into b4j ...

Nice job ?

Ps: by the way what exactly are the limits of free webix.. and why discontinued supporting it..? Why all these frameworks cost so much... Snif
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Well after replacing some lines at start of the code and using jserver, also rem bp.open and exit application was able to run it at jetty.... ;-)
Please share your experience, this should be awesome to find out.

Waiting the new designer for bvad3 ... Hope to be drag n drop + all code hope to be into b4j ...
Thats the whole point of the enhanced design system.

Ps: by the way what exactly are the limits of free webix.. and why discontinued supporting it..? Why all these frameworks cost so much... Snif
At the time, I reached the ceiling when it came to creating the free components and demonstrating how to use it. They have added new components on their packages. No, I have not stopped supporting it, no one is asking / seem to be using it. Its an awesome package hey. I know of one person personally who was/is using it, but that was then. Yes, they are very expensive. Main reason I started BVAD3.

Thanks for the kind words.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
Sharing Experience ... :)

well when you open a project at laragon you just remove lines

at bananowebix projects (AppStart) :

B4X:
    Publish = "C:\laragon\www"

also at the end of Appstart remove:

B4X:
    BP.Open(True)
    ExitApplication


at BVAD3 tutorials...
just keep the private publish as string without the "= "C:\laragon\www""
B4X:
 Private Publish As String '      = "C:\laragon\www"



banano-edit.jpg


add at Process_Globals this code / and Jserver Library

Public SRVR As Server

and add at Appstart the following code:

B4X:
    'added
    SRVR.Initialize("")
    SRVR.Port = 52042
    SRVR.StaticFilesFolder = File.Combine(File.DirApp,  "www")
    SRVR.Start

    Publish = File.Combine(File.DirApp,  "www")
    '----------


at BVAD3 tutorials...
add at Process_Globals this code / and Jserver Library

Public SRVR As Server

add the same code (like webix) at Appstart the following code:

B4X:
    'added
    SRVR.Initialize("")
    SRVR.Port = 52042
    SRVR.StaticFilesFolder = File.Combine(File.DirApp,  "www")
    SRVR.Start

    Publish = File.Combine(File.DirApp,  "www")
    '----------

and remove
B4X:
    fx.ShowExternalDocument(appPath)
    #if release
        ExitApplication
    #end if


And the following the same for webix and bvad3:

at then end of AppStart no need add nothing...
because we manually browse then page from the browser we want... like


banano-edit-2.jpg
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
The only problem are the php/server scripts - as they don't run with add-ons at jetty (the are ways to fix it-with addons)

but from the other hand why to use PHP when you have the feature use the b4j and add/delete/edit records to databases or run server code :)
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Thanks @Magma, but I am little bit conflicted, your question is about BVAD3 but you are fully discussing BANanoWebix including your screen dumps. This is going to create a confusion. Don't you want to perhaps rather redo your "Sharing Experience" to only speak about BVAD3? Then you can share your BANanoWebix experience individually? Thanks for understanding.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
You have right...
well -- Sharing exprerience for BVAD3.. how to work with the tutorial at jServer :)

here the changes i ve made for working the BVAD3 Tutorial...

1) Create a folder into the project \objects ... with the name www (important!)
2) Add Jserver Library...to the project
At the Process_Globals remove specific folder "C:\laragon\www" and add the following line (for adding library jserver):
B4X:
    ...
    Private Publish As String '= "C:\laragon\www"
    ...
    Public SRVR As Server
3) At Appstart add the following lines at the start of project:
B4X:
           'added
SRVR.Initialize("")
SRVR.Port = 52042
SRVR.StaticFilesFolder = File.Combine(File.DirApp, "www")
SRVR.Start

Publish = File.Combine(File.DirApp, "www")
'----------
4) Remove at the end of AppStart module these lines:
B4X:
    'Dim fx As JFX
    'Dim URL As String = File.GetUri(File.DirApp,"log.txt")
    'fx.ShowExternalDocument(URL)
    '
    'Dim appPath As String = $"${ServerIP}/${AppName}/index.html"$
    'fx.ShowExternalDocument(appPath)
    '#if release
    '    ExitApplication
    '#end  if
5) Run the project...
and browse the "client" from any browser you like (html5 compatible)...
the http://localhost:52042 (or if you are running from other pc--- http://ip:52042 - have in mind to pass someway the port from router if you wanna see it work out of your local network)

b1.jpg

b2.jpg
 
Upvote 0
Top