0

I have seen many people saying that it's not good to connect a mobile app directly to the database, but to have a web service doing it. So my questions are:

Why do I need a web service (middle layer) to connect a mobile app to the database (eg.: SQLite, Firebase) instead of connecting it directly from my iOS / Android application?

Why do I need an extra layer like in PHP or Java for web to make this connection? Is it for performance purpose? Or security? Or anything else?

How do these layers work?

Bruno Campos
  • 405
  • 7
  • 6
  • 1
    Possible duplicate of [JDBC vs Web Service for Android](https://stackoverflow.com/questions/15853367/jdbc-vs-web-service-for-android) – Morrison Chang Jul 29 '17 at 20:30

1 Answers1

1

Because your mobile app will be used by other people and users. So if someone decompile you apk/application, they will be able to see you login and password to access your database

so for security first But could be about logging, version or other stuff too

sheplu
  • 2,937
  • 3
  • 24
  • 21