I want to create an app with Flutter and also a web site with WordPress. However, I don't know if it is possible to connect both oh my site and app to a unique database and I don't find any document on it. Indeed, I want my customers to be able to log in them on both. Do you know if it is possible or not and have you any document that could help me ?
Thank you for your help
there is actually a very good article on how to proceed to make a Wordpress connection throught your app made with Flutter:
https://wordpress.org/support/topic/flutter-app-connection/
Also, don't forgot, that every wordpress have a public API (by accessing {wordpressWebsiteUrl}/wp-json) where you can get your post etc...
Related
I am new in mobile app development and I am developing an application in React Native, which will contains the lyrics of songs. Now, I am in a situation where I am thinking about the best way to make database for it.
I would like the basic lyrics to be downloaded to the device with the app, but also that the user can add other songs that would only be visible to him. Which way is the best? I think, that all songs could be saved into some database (for example in device storage or SD-card). I think about SQLite or Firebase, but is this the right way?
Thank you for all your advice ;)
Whole solution seems like a good use case for Firebase/Firestore.
Firestore seems to integrate well with mobile apps. It's also managed so it's a simple way to run a database for a mobile app given you can provide the customer with direct access to the database without the need for a backend.
I am new to React Native and currently building an App in Expo. I am trying to add an offline feature in my app. Take Profile Screen for e.g. if a user updates his/ her name in the app and it doesn't have the internet access/ is offline so when the user gets back online his/ her name will be uploaded on the database. Till then, it should be able to see his updated name on his phone only.
So far I have build only front end part which accepts Name only. But don't know how to add this feature in my app ?
I am good at developing frontend but don't have a good knowledge how to connect frontend to db and backend. It will be helpful if someone can put some highlight for that?
Can anyone tell me how to achieve this type of offline feature ?
There are many way to achieve something like this. This works out of the box with Cloud Firestore, which is one way to accomplish offline functionality/persistence.
Check out this: Using Firebase with Expo.
One more way is you can use Asyncstorage if it's only a name field you want to store offline expo asyncstorage.
To send the updated name to database when user is online, you can use Netinfo expo netinfo to check whether user is able to access internet or not.
i'm managing lot of websites, few of those are Joomla.
Last webmaster has gone without giving any help and i've those Joomla DB that i cannot understand which websites are related to.
I mean, on wordpress, i'd see on "option" table to check URL but where i can find this information on Joomla?
Thanks
Have a look in the configuration.php of each site instead. In them, you can see which database is connected to the specific site.
Joomla by itself does not store the web site URL in this tables or configuration files, and I take that as a merit over Wordpress. The advantage of not storing the URL is that I could simply change web server's configuration when I want to change a site's URL. Everything will appear perfectly, unless for some reason a programmer chose to hard-code the web site URL into his code (which is a very bad practice).
So I suggest look into web server's configuration to get your the document roots and then relate the configuration.php file in there to the databases.
So, no chances.
Only solution i see is to backup and delete DBs one by one, if more than one, and see which website has gone "offline"
I would like to ask how to create an ionic app that talks to Laravel API but still works offline when there's no connection.
Let's say i have to write a quiz mobile app in Ionic and it requests for Laravel API to retrieve the questions as well as store the scores in db.
I'm just starting to learn Ionic and i'm really confused right now on how to approach this.
What confuses me most are:
Does the Ionic source live inside the Laravel source code w/c serves the API?
If i want the Ionic app to be installable, should the Laravel source code be included as well during the compilation process?
Thanks in advance for any help.
Your php or in general server side code is completely independent from your ionic application. If you want your app to work offline you should think about something like fetching a high number of information initially and work with this data without making any additional requests.
However your ionic app does only contain the frontend. You could implement some logic for local storage, but if you want to keep information hidden from the user (e.g. solutions) you have to put that logic on a dedicated server.
In the few details you provided, I can say the Laravel code does not live inside the ionic app. The ionic app is separate from the backend API by Laravel. You are possibly trying for a ReST based architecture where you communicate with your Laravel Server with an API. You need to keep those codes separate.
However without any internet, you won't be able to access those APIs, so you will just be able to show some static data, or you could serve from a DB and show later. For how to use the sqlite db you can look here
In your backend you can have an API like
http://example.com/api/v1/questions/1/
Which will fetch a question with options and if you want the app to have the answer for offline storage you may have that as well. When a user answers, you may check whether you have internet access and send answer and verify if you do, else you may save the answer in your DB and sync when you do have access. You can fetch multiple questions so that a user may answer multiple questions in case he/she will not have internet access.
Hope it helps. :)
We are 2 students studying web development.
Right now we are researching and trying to figure out a solution for an ionic app.
the app will have a lot of data content (video, image, music etc)
The questions are: should the APP be developed with a REST api? (seems like the only/best way to connect to a database with ionic?)
or can you build the app with a cloud-based-database without the REST-api (any suggestion for the database?)
and last should we use LocalStorage as our database?
Let me go from bottom to top; if you said you'll use a lot of content in your database - don't even think about local storage. If you really must have a local database as well, consider looking into SQLite (https://github.com/litehelpers/Cordova-sqlite-storage).
The sentence "cloudbased-database without the REST api" honestly makes no sense in Ionic. Let me explain; Ionic uses Angular as its front-end framework. And, front-end is the key word here. You can take any front end framework, or pure vanilla JavaScript for that matter and you will not be able to connect to any database (be it in the cloud, locally, or whereever). It's just not how that's suppose to work.
So, finally, to confirm - yes, you will have to create a (REST) API for your database which will then allow you to "talk to" the database with Ionic.
Hope this clears things up a bit.