N
N
Nikolai2020-06-11 13:36:08
MySQL
Nikolai, 2020-06-11 13:36:08

Is it possible to get data from the database (joomla) in the application?

I greet. I have a joomla ad site. I want to make an application for android and iPhone, but I could not figure out how to output data from the site in json. And then I thought maybe it will be possible to get data from the database. Is there such a possibility and how to implement it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Orkhan, 2020-06-11
@niknik_ykt

And then I thought maybe it will be possible to get data from the database.

You should not work with data from the database directly.
Look towards working with the Joomla REST API. Surely, there is a Joomla REST API.
I have worked with wordpress on java. And there are ready-made libraries for working with REST.
PS API - https://api.joomla.org/
https://extensions.joomla.org/extension/rest-api/
And then on android using okhttp work with REST

I
Ivan Vorobei, 2020-06-11
@ivanvorobei

You can't just get the database. Magic does not exist
You can:

  • Download the entire database to the client if the client can open this file. There are databases that are not supported on clients. This is a crutch.
  • Make a standardized response, in your JSON example. Of course it's better to use this approach. The database will not return the finished JSON, you need to go through the database model, form the JSON. Then parse it on the client.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question