Android Question Advices sought on database connection: php vs. direct

toby

Well-Known Member
Licensed User
Longtime User
My b4a apps currently connect to MariaDB via PHP, and I'm not familiar to direct connection yet and would like to know more about it.

I'm wondering what are the pros and cons of each of them in terms of
1. security
2. performance
3. easy implementation

Thanks in advance
 

DonManfred

Expert
Licensed User
Longtime User
3) very easy
1) nearly NONE! Do not use direct connection in your App! The recommended way is to use jRDC2 on your Server (here you can add security).
The DB-credentials can be stolen easily by a hacker when using direct connection.
 
Upvote 0

Sandman

Expert
Licensed User
Longtime User
(Though, if you got the skills to make a secure API (using PHP or whatever) then that will be fine too. But never ever do the direct connection thing. That's asking for problems.)
 
Upvote 0
Top