iOS Question Looking for consult on simultaneous iOS+Android development

I used B4a several years ago - very successfully - at another company. Android development only.

Fast forward to today. It has been a long time since I have looked at the product, and of course it has grown leaps over the years. We have some very important work to do to re-engineer similar but grossly different codebases for iOS and Android for an important app for our company that we distribute from the Apple and Google stores.

I have tried to do some reading here before posting. I believe it is true that while all the UI will be different, other middle tier type non UI code can be largely reusable across the two platforms.

Would just like to hear from Erel or other folks who have successfully built the same app using both the B4i and B4a tools.
  • Are you glad you chose these tools?
  • Do you think you saved significant time over the native SDKs?
  • Did you achieve enough reuse to make it a smart choice, as opposed to choosing a Javascript-based cross platform technology?
  • Does the product now contain support for building a single layout in a responsive manner, as opposed to having to essentially hard code to a screen resolution?

Any informed commentary greatly appreciated.

Frank
 

hatzisn

Well-Known Member
Licensed User
Longtime User
I am really glad with these tools. Firstly I created the layouts from the b4a layouts with the bal2bil tool. Then what I did was to create some functions that are acting as interfaces between the B4A side and the B4i side. F.e. a class that emulates the runtime permissions and has a function GetSafeDirDefaultExternal that acts exactly as the function rp.GetSafeDirDefaultExternal(""). Then the 99% of the code of the application will be reusable with slight changes if no native java functions are used.
 
Upvote 0

lucasheer

Active Member
Licensed User
Longtime User
Hello!
You have made the right choice to come here. I'll answer your questions honestly with my experience with B4

Are you glad you chose these tools?

Yes! I grew up learning VB.Net, and eventually moved on to Eclipse/Android-Studios and Xamarin to create my mobile apps. I found B4A, and instantly fell in love. I've been using it for over 4 years, where building mobile apps is required.

Do you think you saved significant time over the native SDKs?
Definitely. B4X comes with so many useful tools as far as encoding, communication, DB support, etc.. It's so easy to write code, and the visual designer is VERY useful and time-saving.
Not only that, but B4X has so many advanced development tools. Wireless debugging, Code hot-swap, logging, etc. Shipment is very easy. I hate Macs, which are required with other platforms. B4i doesn't require a Mac whatsoever with the remote servers. B4X also has the fastest debugging in my experience. I'm sick and tired of waiting 15+ seconds for a debug on other platforms. B4A debugs my biggest projects in under 2 seconds :)


Did you achieve enough reuse to make it a smart choice, as opposed to choosing a Javascript-based cross platform technology?
B4X makes it super duper easy to translate from B4A->B4i, as long as you don't use a whole lot of native views. If I use only B4X and custom views, my project translations usually only take 1-2 days or less. It depends on the size of the project. 99% of the actual class code is reusable in my experience.

Does the product now contain support for building a single layout in a responsive manner, as opposed to having to essentially hard code to a screen resolution?
I think it's had the designer scripting for awhile. That allows you to create responsive layouts. However, now there are anchors, which are absolutely fantastic.


Overall, I would definitely recommend B4X. Everything is native, meaning no runtime. You aren't going to have a 40MB hello world application, like in other platforms. A hello world application will be 0.01 MB. The speed is going to be optimum as well. Expect to build a fully native high-quality application, in about 1/4 of the amount of time. That's what I have experienced personally.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I mainly write thinkering games.

After getting used to the IOS difference it was just a matter of writing the game first for Android then reuse the entire class in the IOS project and work away the differences with conditional compiling.

With the birth of XUI things got even easier and a lot of these differences are captured into XUI methods.
Which means smaller sources and easier to follow without all these #IFs.
The only big exeptions here are mouse events. for example on one it's just _Click on the other it's _MouseClicked with or without extra mouse event type.
It would be nice if this was the same over all platforms maybe it's on the to-do list for later XUI extentions.

The current project was even done in B4J first with the same 'ui strategy' kept in mind so that a nearly instant port to Android or IOS is possible.

It's just a matter of constructing things right from the start.

If you rely a lot on forms then things are harder I guess as most things look different from one OS to the other but you can always create your own set of elements
so that it looks exactly the same on each.

It depends on how far you want to push things.
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Based on my experience:
  • Are you glad you chose these tools?
Yes, I had spent some time researching other languages and have found the B4X products fits my development style. For me there are several benefits:
1. A simple scripting language
2. Being able to use Java Object / Native Object to access API's which are not directly accessible from the language (with a bit of help from the community ;)), as well as developing your own libraries.
3. Not having to use Android Studio / XCode on a daily basis (why are they so slow?)
4. Wireless debugging
  • Do you think you saved significant time over the native SDKs?
It definitely saves time, making full use of B4X, XUI controls has reduced the time it has taken to develop for both platforms, at the same time. As mentioned earlier, there are a few quirks, but these can normally be abstracted away, hidden in helper functions or using the B4XView type.
iOS resize events losing some formatting still trip me up though.

  • Did you achieve enough reuse to make it a smart choice, as opposed to choosing a Javascript-based cross platform technology?
I am a bit biased against javascript as I hate weakly typed languages, but that is me.
Whilst I would not go as high as 99%, I would definitely say that I get over 80% code reuse.
My android activity modules have very little code, everything happens inside a class. It has taken me a number of years and the advent of the XUI classes to get there, but right now this provides simplicity and a lot of power.
  • Does the product now contain support for building a single layout in a responsive manner, as opposed to having to essentially hard code to a screen resolution?
I would say yes, the use of anchors and designer scripting which should cover you for most circumstances. Also make full use of Custom Views.
There is still some bias against using a Basic based language, both from other developers and some clients. I have started to refer to B4X as a low-code tool-set/environment which whilst not being strictly true, seems to work.

Andrew
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
I would also like to add that b4i actually saves you money which is absolutely crucial for low budget developers. I am referring to the hosted builder option which with 25 dollars a year provides you the chance to compile your app and upload to Apple Store without being forced to buy a mac. The price for the hosted builder is fair and if you do the maths (supposingly you would get a adequately good mac of around 900 euros) it would take 36 years to pay the same amount. In 36 years if my height is still positive I will probably be a pensioner and probably I will not remember where my p*n*s is located :):):). Given this approach I would say it definetely worths it to use the b4x universe because it is full of benefits other IDEs do not provide especially for low budget developers.
 
Upvote 0
I really appreciate all the feedback.

For an independent developer, finding affordable tools is indeed key.

But my ask is for a corporation. The tool cost itself isn't the issue. But key to us is:
- Being able to reuse most source across web, iOS, and Android
- Tools that are reliable and worthy of building solutions to be delivered to thousands of end users
- Tools that have a high probability of still being around and viable in, say, 5 years
- Tools that wouldn't have special requirements for the web; not requiring JavaFX.

If the 3 here are a match, I'm interested in learning more, but it isn't clear to me yet.
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
The best way to really evaluate any tool is to use it on a real project...
but
- Being able to reuse most source across web, iOS, and Android
Yes
- Tools that are reliable and worthy of building solutions to be delivered to thousands of end users
Yes, One of my apps is used by > 10K users each weekend and I'm sure other members have more usage than that.
- Tools that have a high probability of still being around and viable in, say, 5 years
Yes, I would not have chosen this tool if I didn't believe it had a decent lifetime.
- Tools that wouldn't have special requirements for the web; not requiring JavaFX.
This is your problem. Not sure what your objection to JavaFX is, but B4J certainly uses it.

Perhaps your search needs to continue. I'm sure the perfect tool is out there waiting for you to find it. ;)

Good luck!
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I think he means sites running entirely on java like we had old config tools/sites for pabx, routers, switches etc...

You can use B4J/java as backend but it's not required to work with a B4X based app/client.

If you prefer PHP or .NET as your corporation might have a developer for that you can use that without any problem while still using B4A for Android and B4i for IOS.
there's enough ways to interchange data between the two.
 
Upvote 0

Jack Cole

Well-Known Member
Licensed User
Longtime User
  • Are you glad you chose these tools? Yes
  • Do you think you saved significant time over the native SDKs? Absolutely
  • Did you achieve enough reuse to make it a smart choice, as opposed to choosing a Javascript-based cross platform technology? The re-use is nearly 100%
  • Does the product now contain support for building a single layout in a responsive manner, as opposed to having to essentially hard code to a screen resolution? You can't share the layouts between projects, but you can copy/paste from one platform to another in the designer. If you use XUI views and some common views, you can copy all your views. It ends up looking nearly identical across platforms. You can fine-tune your layout with designer script code, which you can also copy from one platform to the other (has to be done manually). B4x really shines in this area, unlike popular new frameworks like Flutter, which is cumbersome and time consuming to manually code all of your UI.

I use b4a/b4i for my apps and have over 20 million downloads with my apps. Recently, it became possible to share nearly all of your code across platforms. I developed a class and strategy for sharing code across platforms. I have successfully used this strategy to share almost all of my b4a code in a b4i app. I have experimented with and used various cross platform development systems. One was web-based, which I used to develop apps for Android, iOS, and the web. The b4x system is superior to everything else I have tried when using my strategy for sharing code.

As far as I know, there is not a way to deploy a b4x app to the web. You can write a web server, but you can't compile b4x to html/javascript. If you don't need a web app, and have experience with the basic language, I highly recommend b4x for cross platform Android/iOS apps. I am migrating my HTML/js cross platform apps to b4x. I have no regrets about using b4x. It is not perfect, but I like it better than anything else I have tried.

Here is my cross platform development strategy and class for b4i. One thing that is unrivaled with b4x is its support community. There are many helpful experts, and best of all, Erel who is the author of the product often personally answers questions, which can't be beat.
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
I really appreciate all the feedback.
For an independent developer, finding affordable tools is indeed key.
But my ask is for a corporation. The tool cost itself isn't the issue. But key to us is:
- Being able to reuse most source across web, iOS, and Android

Across web, iOS and Android is way too much to ask from a tool. Even visual studio does not provide this possibility to the maximum but partially. I do not know why you are interested for the web, but if it is about a back end you can easily use B4x for Android and iOS and use .NET for the back end having the two sides (mobile and web) communicating through JSON.


- Tools that are reliable and worthy of building solutions to be delivered to thousands of end users

I suppose your question has to do with only the front end in the mobile side and the answer is yes they are. If you refer though to web also, then the answer is that it is up to you to create scalable server integration or have a load divider in a main server to multiple servers.


- Tools that have a high probability of still being around and viable in, say, 5 years

The probability is high unless Erel's company decide or be forced to stop developing the B4x tools.



- Tools that wouldn't have special requirements for the web; not requiring JavaFX.

I cannot answer this question since I have not used B4J for a long time. My programming approach besides B4X is .NET and in .NET a lot of things are done differently.


Have a nice day
 
Last edited:
Upvote 0
Top