B4J Question Tableview web view listeview which ?

M.Yasar Onur

Member
Licensed User
Longtime User
For a database application that I will write for both android, desktop and web application, which should I choose tablewiew webview or listview?
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
The question is what exactly do you want. If you are creating a web application, you can use the solution with a web browser that is present on any Operating System. But then it requires a solution on which your web server can run your solution. If you are going to develop a database application for yourself for home use, you could do it on a PC.
If you want to delve into developing a program that can be used on an Android phone or on a PC or if you want to develop your knowledge of databases, you can choose to develop on the basis of a B4X program that with the right choices , can be used on multiple OS based on one program source.
 
Upvote 0

M.Yasar Onur

Member
Licensed User
Longtime User
I didn't know which app to use.
But now I understand that if I'm going to make a desktop application, I should use b4j, if I'm going to make an android application, I should use b4a, right?
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
I didn't know which app to use.
But now I understand that if I'm going to make a desktop application, I should use b4j, if I'm going to make an android application, I should use b4a, right?
Well Erel's recommendation for creating a new program is to make a B4X program with B4J. You can then develop and test the same program by using B4XView elements with a single source for multiple OS. Differences such as a panel for B4A and Pane for B4J can be solved with the following code

B4X program source example:
#IF B4A   
    Dim pnlHolder As Panel
#ELSE #IF B4J
    Private pnlHolder As Pane
#End If

When adding a new module or class, don't forget to check the "Add module to parent folder" box. This will save the module or class above the B4J, B4A and B4I directories. Then you add that module or class to your B4A or B4I IDE after you have added all the libraries in the non B4J IDEs first. You can also copy the layout between the different IDE's.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
This code:
B4X:
#IF B4A   
    Private pnlHolder As Panel
#ELSE #IF B4J
    Private pnlHolder As Pane
#End If
can be simplified by this one:
B4X:
Private pnlHolder As B4XView
The B4XView is a superset of the platform specific objects.
In the example above the B4J IDE knows that it is a Pane and the B4A and B4i IDEs know that it is a Panel.
 
Upvote 0
Top