Ionic Framework different databases - ionic-framework

I am new to Ionic, currently learning to develop using Ionic. I just have a question, I don't know if it is possible.
My plan is to create an Ionic app, one application/code base only, for browser as admin, and mobile app for the user. I will limit their access based on the user.
Is it possible that I have two different database on my app?
On my browser I will use REST API to connect to MySQL.
On the generated mobile app, I will use an offline database.
Hope you can enlighten me. The goal is to develop a one application for web and mobile app. But I don't know if it is possible.
Thank you.

Your question is not very clear, I will try to answer according to what I understood.
You didn't mention the back-end, so I am assuming you are using the same data structure for both, e.g(user has id and name and phone, in both, identically)
In this case you can create a setting file where you will save your constant connection strings along with any necessary information(create a any-name.ts file in your root folder and just write down
export let example = {...}
and whenever you need, just import your any-name.ts and use the object inside.
If the data structure is also different, I thinks you will be doing massive works to maintain such an app, but the idea would be creating 2 of each functionalities having the same output but different inputs.
P.S in both cases I mentioned you will need to detect the platform to define which function/information is adequate.

Related

What is the easiest way to fetch data dynamically from a cloud storage to a flutter app

I am looking for a way to fetch data to my flutter app which can be adjusted and modified dynamically after deploying the app. As an example, if I want to change the images of the carousel depending on promotions or launch new books to the digital library. I need an economic option to host the data in cloud storage and fetch it from there.
I have considered firebase as well as google drive, but have yet to find a good guide. being a beginner and having concerns about security I want some expert advice if possible.
*edit-
Seeing many a tutorial I assume there is no better way than linking file URLs from the
Cloud Storage. So to dynamically change those is it possible to refer the URLs to some excel sheet fields to obtain URLs. Those fields can certainly be adjusted then without any hard coding. but the question is how to refer to such a sheet file? *
I also want to segregate the users into paid and free users, I have successfully proceeded with the authentication with firebase but still don't understand(I do have some concepts but don't know where to do that) how to put them in groups and impose limitations on them about accessing the data. any guidance, links and helpful advice will be cordially appreciated.
According to what you are looking for, I highly recommend you to use Firebase Remote Config, which is a cloud tool that allows you to modify your app's functionality and appearance without forcing users to download an update. You define in-app default values that control the functionality and appearance of your app when you use Remote Config. Then, for all app users or for subsets of your user base, you may utilize the Firebase console or the Remote Config backend APIs to modify in-app default values.
Your program can control when updates are applied, and it can check for updates regularly and apply them with minimal performance impact.
Remote Config comes with a client library that takes care of essential functions like fetching parameter values and caching them while still allowing you to manage when new values are active and how they affect the user experience in your app.
Here is a tutorial that uses Flutter and Firebase Remote Config that could also help you.

Using other languages with Flutter

I have been working with flutter for a couple of months now and it seems that there isn't really too much to work on an app for back-end or advanced functionality. I love using Flutter to help me design the UI but I want to use another language to help me do some other stuff. For example, I want to display a full-screen camera page (almost like Snapchat) or like send a direct message to another user through the app. Do I even need another language to do stuff like this? I am not an advanced programmer. I just want to create simple applications that can process and store a little bit of stuff.
You can easily do the mentioned stuff in Flutter/Dart.
Check out Firebase Messaging for direct messages and SQLite to store information on user devices.
For saving data locally,
You can use SqlFlite, a plugin with the help of which you can easily store and manage your database.
For saving data on the backend, so that other users can also access it when necessary, like the one you mentioned in a comment (..food ordering app)..you can use Firebase
Firebase has all you need.
Link to firebase :- https://firebase.google.com/
When your data is stored on a cloud, you don't need to hard code anything, for example, about the food ordering app you mentioned, you can make use of variables, in which you can store the values. So that when the owner changes the price, it gets updated.

How to Learn/Create a Database iPhone App?

I have a rather simple idea for an iPhone app. What I need to accomplish:
Allow login of users (which means I'll have to store usernames, passwords, and other account info).
Allow users to submit strings that other users can view.
Attributes attached to each string that must be tracked (i.e. "votes, views, comments, etc.).
As such, I assume I'll need to start learning about databases and working between a server and client. I've gotten my feet wet in OSX/iOS programming (specifically Objective-C) before. I want to learn how one can accomplish a data-based application and the needs I listed above.
I've done some light research and discovered something called SQLite (free and open-source is always good). Is this the right path to achieve what I want to do? I'm a total "noob" when it comes to this field of server/client/data "stuff".
Your help is greatly appreciated.
SQLLite is more like a local database. Really, the database that you will use is unimportant. It sounds like a project with webservices. Inside your webservices, you might connect to a Microsoft SQL Server or anything you want.
I think you should study how to setup a webservice that can be accessed in your code. Webservices is not an Objective-C topic, it applies to any platform. Your project is more like a web development project.
You can save user's credentials in keychain.
#Kinderchocolate is right about introducing database into your project.
It hears about a app which need transmitting data among clients.It means your need server database and local database.
For server database,I recommend you to use Parse.Parse is a platform which provide a convenient way to use their server database with Objective-c in your app.This tool will save many times and energy(it's not necessary to learn PHP,Apache,Mysql).Parse is not free of course,but it has a free period and enough for you to examine your idea.
Here's Parse!.
For local database,I recommend you to use Core Data,Which is provided by XCode.Core data is so strong to meet your need.You can find a way to use Core Data in many books.
Go try Firebase for database in the cloud. (On the server). In Swift 4 there is complete support for Firebase and SQLite

Connect existing Drupal page with PhoneGap iOS App

Case:
I have an existing page based on Drupal and going to develop a phoneGap iOS App. That means I just need the information of the existing page and want to fill these data in the new app.
My Question is now, do somebody know weather there is a work around or work flow to do so resp. how can I connect the existing page with another page or in my case phoneGap to get just the data? I'm new with Drupal and phoneGap so maybe you have some pages with information, tutorials or some help how to do this.
Thanks in advance yves
Drupal offers a module called "Services" which will allow you to get data or services from your website. You may need to create your own methods on that module to get the information you want to retrieve.
As for the iOS side, you can retrieve the data via XML-RPC, Rest or whatever communication protocol you choose at the server side, or go all the way with drupal-ios.
https://github.com/workhabitinc/drupal-ios-sdk/
You should start looking for the Services module and play with it. You will have an embedded console on that module to test the methods.
Once you're finish with that, take a look at drupal-ios or go deep with your own implementation via XML-RPC or whatever.

What's a common approach iOS apps use to allow users to export their textual data?

I'm diving into iOS development. I am building a simple Diary app. I'd like to be able to export my data somehow to my other computers. What are some common, simple steps to export plain textual data?
Thanks in advance for all your help!
A few options spring to mind.
Give the option to email it
Utilise 3.2/4.0's file sharing APIs to allow access to documents created within the app via iTunes
Upload to a webservice
I'm sure there are more, but that's what I immediately thought of.