Seeking advice for a non-UI server configuration Web interface

JordiCP

Expert
Licensed User
Longtime User
I'm posting it here since it is not exactly a technical question, but more a seek for advice

In the past I've built a couple of not-too-complex B4J non-UI server projects which worked ok deployed in a VPS. Now I'm retaking these projects and would like to explore adding a couple of Web pages for configuration and get basic statistics.

Here comes the problem. I know nearly nothing about building web pages :confused:

I've seen, during the years, a lot of posts/libs/tutorials about huge powerful frameworks: ABMaterial and BANano (@alwaysbusy ), Pakai (@aeric ), SitashoDaisy (@Mashiane ), and perhaps others. I see there is an incredible amount of work there! The pity is that I have literally missed them, since it was not in my focus at that moment. This weekend I have been exploring the forum but I fear I am still a bit confused about how do each one of them fit different needs or, in other words, in which scenario they fit better.

Considering that my needs are
  • Only need a couple of web pages for configuration, not really a complete multi-user interface
  • Anyhow, I need a decent UI with the basic UI elements for interaction, such as tables, buttons, dialogs...
  • Authentication is needed.
  • Learning curve should be the minimum possible
Which solution do you think could fit better (or if all of them are overkill for my needs and there are simpler approaches, please also advice)?

Thanks.
 

aeric

Expert
Licensed User
Longtime User
The smallest server template I have is:

Basically, you can just add a few html files into the assets folder, read the file as String and output it using response.Write() in a server handler.

B4X:
Sub Handle (req As ServletRequest, resp As ServletResponse)
    Dim Content As String = File.ReadString(File.DirAssets, "index.html")
    resp.ContentType = "text/html"  
    resp.Write(Content)
End Sub

Pakai is a Web API framework.
It depends on some libraries developed by me.
Beside learning about the libraries, you also need to have some understanding in SQL database, JSON, JavaScript, HTML, Bootstrap to use the template.
I don't recommended it if you are new in web development.
If you want to try out, you can check the tutorials for v4 and v5 but they are quite outdated and may be confusing.
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
Thanks @aeric

Will definitely start with the simplest option, check if it is enough for my needs and try to grow from there. Still have the concern of what to use to build simple HTML pages which doesn't imply 100% typing them.

Your work and contributions to the forum are impressive. Thanks again :)
 

aeric

Expert
Licensed User
Longtime User
My advice is don't avoid learning.
HTML is easy to learn.
Try follow some tutorials from w3schools or freecodecamp.org

When you have learn the basics, you can try to use Bootstrap to make the UI look better.

Considering that my needs are
  • Only need a couple of web pages for configuration, not really a complete multi-user interface
  • Anyhow, I need a decent UI with the basic UI elements for interaction, such as tables, buttons, dialogs...
  • Authentication is needed.
  • Learning curve should be the minimum possible

1. Links can be as simple as using anchor tag
HTML:
<a href="page2.html">Go to page 2</a>

2. Bootstrap has examples of creating table with styling
HTML:
<table class="table">
    <tr>
      <td>Column 1</td>
      <td>Column 2</td>
      <td><button class="btn btn-success">Submit</button></td>
    </tr>
</table>

3. I suggest you to use B4J server Session.
B4X:
Request.GetSession.GetAttribute("UserID")

4. Start building from simple projects.
Check (Mini) Template Engine example.
 

Cableguy

Expert
Licensed User
Longtime User
I'm posting it here since it is not exactly a technical question, but more a seek for advice

In the past I've built a couple of not-too-complex B4J non-UI server projects which worked ok deployed in a VPS. Now I'm retaking these projects and would like to explore adding a couple of Web pages for configuration and get basic statistics.

Here comes the problem. I know nearly nothing about building web pages :confused:

I've seen, during the years, a lot of posts/libs/tutorials about huge powerful frameworks: ABMaterial and BANano (@alwaysbusy ), Pakai (@aeric ), SitashoDaisy (@Mashiane ), and perhaps others. I see there is an incredible amount of work there! The pity is that I have literally missed them, since it was not in my focus at that moment. This weekend I have been exploring the forum but I fear I am still a bit confused about how do each one of them fit different needs or, in other words, in which scenario they fit better.

Considering that my needs are
  • Only need a couple of web pages for configuration, not really a complete multi-user interface
  • Anyhow, I need a decent UI with the basic UI elements for interaction, such as tables, buttons, dialogs...
  • Authentication is needed.
  • Learning curve should be the minimum possible
Which solution do you think could fit better (or if all of them are overkill for my needs and there are simpler approaches, please also advice)?

Thanks.
ABMaterial is perhaps overkill for what you need/want, and the learning curve can be either very steep... or way to graduated... but at least, It allows you to use full B4J code, with a very complete set of views/controls
 
Last edited:

JordiCP

Expert
Licensed User
Longtime User
My advice is don't avoid learning.
💯. My job consists in doing it every day (I mean learning, not avoiding it 😁)

When you have learn the basics, you can try to use Bootstrap to make the UI look better.
Just landing into it. Also a friend of mine recommended Bootstrap, so I'll definitely give it a go

ABMaterial is perhaps overkill for what you need/want, and the learning curve can be either very steep... or way to graduated... but at least, I allows you to use full B4J code, with a very complete set of views/controls
Agree. I don't need it right now, but I will explore this and/or other solutions to fill the gap

Thanks all :)
 

Pablo Torres

Active Member
Licensed User
Longtime User
I recommend you to build the pages on visual studio with node, it is very simple, Gemini can help pretty much, and use b4J to create a server that works as an API.
You can make local post to this non-ui jar and your db will be secure.
 

Jones Hone

Active Member
Licensed User
Longtime User
You can refer to this.
That's how I started!
 
Top