B4J Question Documentation - What am I missing?

Ray Y

Member
I am very new to the whole B4X ecosystem, so is it just me or is there a lack of coherent documentation? Or even just one place I can go to learn certain things?

I know there's no one big book for hand holding, I get that. So, learn by example and trial and error. Ok, but....

For example, I want to write an app that does an HTTP POST and get a response back. Maybe I would like to see a B4J example of HTTP communications. I first look in the PDF documentation I got when I downloaded B4J. Nothing about HTTP there. It mentions libraries, but no documentation on any of them. Humm...maybe there's an example posted in the on-line forum. I search the community forums. Lots of posts about the "Http" library, OkHttp replacing it, OkHttpUtils2, HTTPUtils2, jHttp, etc. Huh? So, after spending the better part of an hour going through posts, I finally decide (without knowing if it's the correct decision) to try and use the jHttpUtils library within the IDE. Ok, so how do I use it? Humm...no documentation in the "Booklets" directory. Searching the forums for "jhttputils" gets me 7 pages of posts, none on a full documentation of the library itself. Really?

I finally get to https://www.b4x.com/b4j/help/jhttputils2.html. It lists the properties. Big deal. And no mention anywhere in any form or forum (that I found) about the library using a "JobDone" sub (which I did only find in the Android forum by an example for a different task.)

So, am I just incapable of finding the place where all these libraries / coding practices are documented, or is there none? Either way, it's very frustrating to a newcomer.

I'm really REALLY trying to like the B4X stuff (I'm vacillating between a very buggy xojo environment and a seemingly very undocumented B4X environment for moving forward with future projects) but this is elevating my stress level even before I commit to starting a project. It souldn't be this difficult, should it?
 

Ray Y

Member
My example was an example. Having that video is a great resource for that particular task, but it's 30 minutes long, and all I want is to know that I needed a "JobDone" sub, how I can add headers to my request, etc. But that's not my point.

Where is the reference for all the properties of ANY given library? Where is the code examples I can compile and try?

Again, these are rhetorical questions. My point is: If there is one, why can't I find it? If there isn't one, how do I learn to use it without documentation?

xojo has 320 complete, compile-able example projects included with the download. They have an extensive on-line help system with every class, method and event documented. (Now, if only the product worked as well as it's supposed to, I wouldn't be here in this forum.)

This (B4X) seems to be a great product and environment, with a great and active supporting community. But it would seem to me that the learning curve for those beyond the 'Hello world; This is an Object" crowd isn't addressed. And I am certainly not suggesting that this should fall onto Erel's shoulders. I don't think he sleeps as it is.

But, here I am, still taking longer to try a simple GET request than it should.

And unfortunately, I am much better at pointing out the problem (as a newbie to B4X) than I am at suggesting a fix. Is there one? Or is currently the only way to learn this stuff by plowing through pages of posts in the forum and getting code snippets?

Hence my post looking for suggestions to 1) how do I learn all the libraries available to me, the developer, and 2) if there is no central comprehensive repository for documentation and examples, how do you/I/we/the B4X community/newbies get/create one?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Where is the reference for all the properties of ANY given library?
The reference is available in the documentation page. In most cases the reference is less important than the tutorial.

If you search for Http you will find the two important tutorials (all 4 results are important):
https://www.b4x.com/android/forum/t...-services-are-now-even-simpler.18992/#content
https://www.b4x.com/android/forum/threads/79345/#content

1. The search in the forum is very good.
2. Start with the guides: https://www.b4x.com/android/documentation.html
3. Watch the very new video tutorials: https://www.b4x.com/etp.html

but it's 30 minutes long, and all I want is to know that I needed a "JobDone" sub
It will show you that you don't need a JobDone sub.

I think that all B4X developers should watch most of the videos. It is well worth the time if you are serious about B4X development.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
First, welcome to B4X @Ray Y!

I think you just have to get used to 'another' way of documentation. As Erel points out, it is much more tutorial based than giving an enumeration of properties and methods. Erels official libraries do have them, and he has a lot more discipline documenting them than me. The Xojo documentation has plenty of complains on their forum too (I have an RB/Xojo past myself). And the search in this forum is A LOT better than Xojos (no need to use Google to search the forum here ).

Where is the reference for all the properties of ANY given library?
Many libraries here are written by users, not by Anywhere Software. You can compare them a bit a like the RB plugins: they sometimes do lack documentation. I don't go out scot-free here either (I'm the developer of ABMaterial, a free web UI library). But I do have a day job too, so documentation (in the sense that you are asking with a list of properties and methods) is not optimal as there are literally thousands of them. But instead I make tutorials, showing and explaining whole concepts.

Erels videos are a 'must watch' indeed. They are real gems for a novice, but also for the more veteran users there is plenty to learn.

I do understand the remark you are making. Some people like to grab the manual and silently go through it to learn the tool. But you will quickly notice on this forum a question is answered very quickly.

So, give it a shot I hope to see you around!
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
myself often start in online documentation you find the link right at a product page.
in the beginning i looked for all libs what they can do and much fit my insterest.
some libs are included in the ide some you need find here by search and filter.
if i need a tutorial or example project i searching for the library name.
the best documentation is a working project where you can see the usage.
if you open 2 ide's you can easy copy/paste.
i agree at some parts in the online docu should be more details. (a feedback link at method or event would be fine and someone that care the requests)
 
Upvote 0

Ray Y

Member
The fact that a question here is answered quickly is one of the strongest reasons that B4x is a legitimate professional development tool with ongoing support. All the more reason that a) it should be easier to get into and b) all the more posts to wade through to find any particular answer.

Maybe I should come at it from different way. If there WAS a Wiki or some such that consolidated some of this / all of this scattered info, a) would the community contribute to it (input), and b) would the community use it (output)?

I don't have unlimited free time, but I can certainly assist / take the lead in something that I think would move the whole platform forward, in the unique position that I am in that I know what it is I want to know that everyone already seems to know (huh?)
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Also, see @klaus signature and you'll find a bunch of beginners guides!
 
Reactions: Art
Upvote 0

moster67

Expert
Licensed User
Longtime User
I must agree with what mentioned by @keirS; the website of @rwblinn is fantastic and organized by topics/arguments as well (close to what you are looking for). It's full of samples too.
 
Upvote 0

RWK

Member
Licensed User
Longtime User
I would like to support Ray's question a little bit. For me as a Newbie it is also sometimes not as easy as i think it should be. Especially the http Stuff Ray is talking about seems not to easy to get the hands on it. For sure it is, because the stuff there seems to evolve fast (in the past year?) (which is great of course). But searching the forum brings up a overwhelming amount of stuff, but speaking upon different bases....jhttp, okhttp, ohttp2, webview. I posted a test here some days ago with my first test to get a simple request on a password secured website, but I stopped it because I can't find out what to use to get further than login page. In webview i can call the site, manually enter user and password and then get what i need. But i can't get my hands on the handles to interact in code with this webview. On other side i tested okttp2 to get and post, but i can't find a way to send the user and pass and than get the headers of this request to use it in the further get's or post's on the site. Looking at all the samples in the forum confuses more than bringing light to it.

All in all, I'm missing a sample forum which is based always on the actual code base......I know that is a massive work to maintain and I'm not here to say it it necessary, but for sure it would be great to have. It will be for sure also for Erels great video tutorials.

In the past i did a project in my spare time for our local street running event.... it is coded in FreeBasic (but to my shame, windows only):
https://sites.google.com/site/zlaufzeit/screenshots
It is client/server and so Erel's Networking video tutorial is great for that and seeing that i thought I would love to translate this to b4x, so i can deliver some webpages with results or to do a android client for the people to track and so on

but that seems to me actually not doable, cause it consumes to much time on the basic stuff I have to search for....maybe sometime

But saying all that.... B4X is a great product, with great support and I will do my best to become a valuable member of this community

Oh by the way... I can't also not find anything about the extraCSS field in the designer, is this working?
I only could get it somewhat working if i start with a ending } and then add a little bit css stuff in this field at a e.g. tableview component.

Greetings
Rainer
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User

Please start a new thread for this!
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Are you pretending to be Erel for the day?
Nop, but answering him here would make future searches for possible solutions very hard to find!

Erel never wanted or imposed moderators because he knows we will moderate it ourselves!
 
Last edited:
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i like the way how app game kit manage the online docu, it is all in Categories
and at each command each community user can upload a code snipped.
it not started by lib, instead it started by what the user will do or need.
 
Upvote 0

Ray Y

Member
i like the way how app game kit manage the online docu

Do you have a link to that you could share? I looked around their site a bit, but didn't find the forum.

Week never wanted or imposed moderators because he knows we will moderate it ourselves!

Which I think goes to the fact that the community could maintain a Wiki, with docs for each library, samples, what works, what doesn't, etc. The forums here are a great resource, but they are getting too large to find the meaningful bits. It's a time-sucker.

I would look at @rwblinn's B4J HowTos website.

This is the first I've heard about it - which proves my point. There's no reference to it up front on the B4X site. I also found the "[ABMaterial] ABMaterial For Dummies (lessons)" post here in the fourums, but there's also one from Mashey on codeproject.com.

Again, it's there, but everywhere.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…