Android Question B4A to B4J Server

wonder

Expert
Licensed User
Longtime User
I have some stuff hosted on a B4A server.
If I were to migrate to a B4J solution, would I simple be able to copy-paste the code?

My server code has nothing but 2 or 3 additions to the original B4A server example.

Many thanks in advance.
 

sorex

Expert
Licensed User
Longtime User
what do you mean with B4A server?

an android device bound to a wan ip address & port ?
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
Yes.

http://www.ninjadynamics.com is currently hosted on an ASUS tablet with a broken screen.
Hurray for recycling!

The problem is that it goes offline a lot, and everytime it happens I have to restart the tablet.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
ok, B4J could do the job.

but why not install something like XAMPP? takes 5 minutes and you have a fast webserver including mySQL to play with.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
something like XAMPP

If you have an own root server (hosted or at home) I would prefer B4J then, If not (>90% of the "cheap" hosted server solutions) you're with php & MySql.

B4J server is most probably faster

I like the idea of having B4J as a server. Why? More possibilities and it should be more secure. Most hacking attacks assume you have a standard apache & MySql installation. With B4J you can secure it like you want by code (with php you often don't have so many options). Very easy.
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
Exactly, B4J + some homemade encryption should be completely alien to any attacker.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Most hacking attacks assume you have a standard apache & MySql

actually nothing to do with both BUT

1. with poor usage/knowledge of the coder and not taking care or sql injections and these work on mysql, sql, access or whatever you hang behind it.
2. leaks in the open source stuff they use. (WordPress and the likes)

the only reason I would go for B4J is for socket stuff as it would be similar as in your B4x clients.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It really depends on your experience and what you are trying to accomplish.

If you want to use an existing framework such as WordPress then there is no doubt that you should use PHP. However as a generic backend solution it will be easier to use B4J, especially for B4X developers.

B4J also has very good support for WebSockets which breaks the standard request / response communication pattern.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…