B4J Question making a big application

giannimaione

Well-Known Member
Licensed User
Longtime User
is b4j suitable for a large desktop application?
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
You would need to explain better what is big for you first.

But from my experience I have several products with thousands of LoC, spanning several forms, classes, libraries. With over 20 people connected simultaneously and never actually felt that b4j let me down.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Yes, and for for web apps too (browser based) using ABMaterial.
 
Upvote 0

giannimaione

Well-Known Member
Licensed User
Longtime User
...I have several products with thousands of LoC, ....with over 20 people connected simultaneously ...
LoC ? = line of code ?
with over 20 people connected simultaneously ? Can you explain better ?
thanks for your answer!!!
 
Upvote 0

keirS

Well-Known Member
Licensed User
Longtime User
It really depends on what you consider large. I work on a non B4J app which is an ERP system. That's approx 1 million lines of code, 450 forms and 750 reports. In the enterprise world that's a medium sized application. This is not a client server application as it uses a file based RDMS.

I have no doubt it's possible to re-write this in B4J. But I would be spending a couple of months writing a framework that included a CRUD code generator, form generator and custom views which could be data bound.
 
Upvote 0

jmon

Well-Known Member
Licensed User
Longtime User
B4J is the compiler (can we call it like that?) For Javafx applications. You can find many examples of really world big applications made using Javafx on internet:

https://jaxenter.com/20-javafx-real-world-applications-123653.html

See the one done for Emirates. B4J can do all that.

For a big app done in b4J, you could see one of the apps Ive done: https://vimeo.com/joaquimmontserrat/postchat
This video was done 3 years ago, but the app is much bigger now. I've been working on this app for more than 6 years now.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
You would need to explain better what is big for you first.

But from my experience I have several products with thousands of LoC, spanning several forms, classes, libraries. With over 20 people connected simultaneously and never actually felt that b4j let me down.
May I ask, how much RAM needed for your application?

I ran ABM sample, it took about 1 GB RAM, which is rather big in my opinion.

If my application build with B4J that is bigger in LoC about 10 times than ABM and it will connected simultaneously for about 100 people, does it mean RAM usage will also 10 times bigger?
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
May I ask, how much RAM needed for your application?

I ran ABM sample, it took about 1 GB RAM, which is rather big in my opinion.

If my application build with B4J that is bigger in LoC about 10 times than ABM and it will connected simultaneously for about 100 people, does it mean RAM usage will also 10 times bigger?

Most likely it is not, ABM is a very very large library you me be seeing the tip of the iceberg with what you are coding and with what ABM really is.

then again number of LoCs doesnt mean more ram. it is not related at all.

AND we were talking here about desktop apps not server. ABM is server app and my applications are all for desktop.

never i have seen more than 300mb of RAM, and even then!!! one thing is what Java allocates from the OS and the other the actual usage of the application on the JAVA Heap. java heap could be up to 1GB and your app may be consuming 10mb it all depends on the garbage collector.
 
Upvote 0

jmon

Well-Known Member
Licensed User
Longtime User
With Java8, my app was taking around 300 mb to 1gb of RAM. But there are a lot of images in it, and hundreds of controls (views). In my case,

I voluntarily increase the default RAM to provide a smoother experience, so I set it to a minimum of 1024, to avoid slowdowns when loading many big images.

I found that after switching to Java11, the RAM increased compared to Java8.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
If my application build with B4J that is bigger in LoC about 10 times than ABM and it will connected simultaneously for about 100 people, does it mean RAM usage will also 10 times bigger?
No.
As the JVM uses a very sophisticated garbage collector and memory handling it is not really possible to say anything based on that single number.
If less memory is available then it will use less memory.
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i vote for "b4j is suitable"
in most apps parts are repeating and can be reuse.
for long-time support you should develope "neat and tidy" source code and avoid copy/paste coding.
if you spent more time in creating you save this time in bug hunting later.
and :eek: "Too many cooks spoil the broth."
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Most likely it is not, ABM is a very very large library you me be seeing the tip of the iceberg with what you are coding and with what ABM really is.

then again number of LoCs doesnt mean more ram. it is not related at all.

AND we were talking here about desktop apps not server. ABM is server app and my applications are all for desktop.

never i have seen more than 300mb of RAM, and even then!!! one thing is what Java allocates from the OS and the other the actual usage of the application on the JAVA Heap. java heap could be up to 1GB and your app may be consuming 10mb it all depends on the garbage collector.
You were right. number of LoC doesn't related to more RAM and ABM indeed use a lots of libraries.

My typical application will be use few libraries a lot, but it is a client server application with more than 100 clients connections. So when I saw a lots of RAM used by ABM, I was hesitated, typical application build with C++ took about less than 50MB of RAM.
 
Upvote 0

giannimaione

Well-Known Member
Licensed User
Longtime User
a bit of screenshots of apps (made with B4J !!!) running in companies
img1.png
img9.png
img8.png
img7.png
img6.png
img5.png
img4.png
img2.png
 

Attachments

  • img3.png
    img3.png
    20.5 KB · Views: 165
Last edited:
Upvote 0
Top