B4J Question Asking for advice for a new project

GiuDev

Member
Hi all,

I have a hobby project in my mind, and would like to develop with B4X. I will start saying I'm not a B4X developer yet, I know about B4X because we used for a mobile app some years ago (but developer was my partner, not me, and using native interface, can't ask to him).

The thing is I'm not sure wich approach to take.
The Project it's a chess tool companion. Because Chess has a lot of support coming for javascript libraries, I think this is the best approach to follow. Now, problem is how to integrate/do it.

Two options available (I guess)
1. Webview with chessboard and in some way interact with this JS code plus B4XPages interface.
or
2. Develop directly as a web server app, and show all inside a webview.

Right know a couple of doubts comes to my mind.

About point 1:
I don't know if it's possible to do it. If I can't control JS side and retrieve data/listen to events from there. And if possible, what could be the best approach, ABMaterial? Other option?

About point 2:
Develop directly as a webapp with bundled server, could be interesting, the problem I see here is, If later I wanna release mobile version, I don't know if b4server will run on android/ios.

Main Idea is to run as a local application, no need of internet at all, then as a hosted webapp is not an option.

Than, main question could be. What approach do you think is better for a desktop app communicating with JS libraries, and with an idea about maybe release the same project on mobile apps?

Regards.
 

GiuDev

Member
Sounds like a bad idea. Relying on WebView, especially for the app's core feature, is likely to lead to a lot of frustrations.

Do you really need the JavaScript libraries? What are they doing?

Well, I don't need it as is, but obviously I save a lot of work. For example, I want to show a chessboard with pieces and the ability to draw on the board and show diagrams, move pieces, load positions and so on. With chessground all of this is solved directly, and I don't have to code from scratch.

I guess in B4X I have to develop my own chessboard, pieces, paint arrows, allowed moves, etc..
 
Upvote 0

GiuDev

Member
Still sounds like a bad idea. If you want to develop with JavaScript then develop with JavaScript, otherwise a JavaScript library will not help you.
The core features should be implemented in B4X.

If I found some kind of Chessboard in Java could be possible to integrate, right? I guess should be something that uses JavaFX?
 
Upvote 0
Top