Comparison with Xamarin Forms app

ShepSoft

Member
Licensed User
Xamarin Forms (XF) is Microsoft's cross-platform environment for Visual Studio/C# developers.
I thought it might interest B4A users to see a comparison of build statistics.
The comparison is based upon a test app created in XF that simply creates/uses a SQLite database
and presents the data in a scrollable list view. The B4A app is the DButilsDemo available here.
Both apps are very skeletal and the data set is tiny for both. In short, they're very, very similar.

XF vs B4A:
                               Xamarin Forms               B4A (DButilsDemo)

  Release build time               1m 35s                         8 s

  Footprint                         56Mb                          3 Mb

  Cold start                      1484 ms                        624 ms

  Warm start                       386 ms                        186 ms
The build was done to the same Android phone connected via USB to the same development PC.
I am acutely aware that these kinds of comparisons are imperfect to say the least, but the winner
here is abundantly clear. It takes forever to build in XF and its almost instant in B4A. The size of
the created app is very large in Xamarin but trivial in B4A. The all important cold start time is also
significantly better in B4A. Both offer good warm starts but B4A still has the edge.

(I know this isn't a question but I couldn't decide where these comments should go if not here).
 
Last edited:

Mashiane

Expert
Licensed User
Interesting comparison. Well we all know that Visual Studio is 3 GB and we are producing competent apps with B4J wich is less than 20MB installs, well after installing the JDKs we are still less than 200MB I think. Mayble your app in xamarin has the same version control issues indicated in my control panel. :rolleyes:

install.png


This type of versioning I still fail to understand a great deal. Good story you have here... #dont mind me, but really are other OS'es like this? Really?
 

LucaMs

Expert
Licensed User
Well we all know that Visual Studio is 3 GB and
To start my VS (version 2015) and create a new empty project on my pc, I have to wait about... 12 days 😂:mad:

I can't deny, however, that it is much more powerful and "complete" than B4J (but let's not forget that a sw developed with B4J is not installable only on Windows systems).
 

ShepSoft

Member
Licensed User
I think that you should compare the time taken to develop a complex medium app.
Yes of course but I included caveats in my post - it was meant to be an interesting but
crude comparison of admittedly unrealistic code samples. However, Xamarin Forms is
known to have very poor startup performance - they've worked hard at addressing this
and now offer AOT compilation in all versions of VS - but it's still not brilliant. I've used
C# for years (and Xamarin for 2 years) but am new to B4A so I can't say how things will
look over time. Thanks for your comment.
 

Diceman

Active Member
Licensed User
You can try Delphi 10.4 next. I believe their community edition develops in Android and iOS as well as Windows. Make sure you have plenty of disk space for the install (55gb).
 

Indic Software

Member
Licensed User
You can try Delphi 10.4 next. I believe their community edition develops in Android and iOS as well as Windows. Make sure you have plenty of disk space for the install (55gb).
The community edition is very small. It is hardly 1 GB!

The final application that it generates are generally quite large in size. But overall it is just a superb free tool for learning and developing cross platform apps.
 

antsnel

Member
Licensed User
Xamarin Forms (XF) is Microsoft's cross-platform environment for Visual Studio/C# developers.
I thought it might interest B4A users to see a comparison of build statistics.
The comparison is based upon a test app created in XF that simply creates/uses a SQLite database
and presents the data in a scrollable list view. The B4A app is the DButilsDemo available here.
Both apps are very skeletal and the data set is tiny for both. In short, they're very, very similar.

XF vs B4A:
                               Xamarin Forms               B4A (DButilsDemo)

  Release build time               1m 35s                         8 s

  Footprint                         56Mb                          3 Mb

  Cold start                      1484 ms                        624 ms

  Warm start                       386 ms                        186 ms
The build was done to the same Android phone connected via USB to the same development PC.
I am acutely aware that these kinds of comparisons are imperfect to say the least, but the winner
here is abundantly clear. It takes forever to build in XF and its almost instant in B4A. The size of
the created app is very large in Xamarin but trivial in B4A. The all important cold start time is also
significantly better in B4A. Both offer good warm starts but B4A still has the edge.

(I know this isn't a question but I couldn't decide where these comments should go if not here).
Not to mention how much available Ram Xamarin uses (read:most of it on an 8gb PC) during the build process :-(

To be a bit fairer on the build times, did you exclude IOS from the build?
 

ShepSoft

Member
Licensed User
You can try Delphi 10.4 next. I believe their community edition develops in Android and iOS as well as Windows. Make sure you have plenty of disk space for the install (55gb).
The free edition is restricted and I don't meet the requirements - the pro edition is £1400 for year 1 and £400 per annual renewal.
 

ShepSoft

Member
Licensed User
Not to mention how much available Ram Xamarin uses (read:most of it on an 8gb PC) during the build process :-(

To be a bit fairer on the build times, did you exclude IOS from the build?
Yes I do - there is no iOS (or UWP) target in the test app I built which is, as I said, as near to the B4A DBUtilsDemo as I could make it.
 

Peter Simpson

Expert
Licensed User
Xamarin Forms (XF) is Microsoft's cross-platform environment for Visual Studio/C# developers.
I thought it might interest B4A users to see a comparison of build statistics.
Hello @ShepSoft,
I really enjoyed reading your BASIC B4A vs Xamarin comparison post ;). It's not the first time that I've seen posts in this community comparing B4A developed app sizes with other Android development tools, but your comparison interested me because you also included some other figures too.

You said in a later post that you've been developing in C# for years and using Xamarin for the last 2 years. What made you look for another application development tool (you're a new licensed member on here), and how did you find b4x.com?

BTW, welcome to this great community.



Cheers...
 

ShepSoft

Member
Licensed User
I began writing commercial software for Windows desktops about 35 years ago and for mobiles in 2012. There was no cross-platform development environment then and I began by using Eclipse/Java for Android. With the arrival of Xamarin it seemed natural for me to unify things - I was using VS/C# for desktop. But despite being able to leverage my substantial library code base, Xamarin's performance has proven disappointing and I have been looking at alternatives. Flutter/Dart gives me no advantage over Xamarin. I've dipped my toe in the B4X water having simply noticed it listed somewhere - I can't recall where exactly.

Thanks for your welcome ... I shall linger longer.
 
Top