Ionic as Bootstrap alternative for Laravel? - html

I have to create a application with 1). a webinterface and 2). an ios/android app. I will use Laravel as backend framework.
Now I can use Laravel for the webinterface and the API, and Ionic for the app (that communicates with the Laravel API).
The "problem" is: I have to create 2 webinterfaces... (the Laravel online webinterface AND the Ionic webinterface (= offline in a ios/android WebView)).
Thats why my question is: can I run Ionic (or another alternative) as frontend framework in my Laravel? So I can run this Ionic interface in my app webview? I need the same functionalities, like camera, GPS, push, etc. as the "normal" Ionic.
Or is there an alternative with the same look and feel as Ionic, but 100% online? So I can run my webapplication in a WebView container.

Related

Connect to MySQL using Ionic Framework without api layer

Is it possible to connect to a MySQL database directly from an Ionic application without an integration/api layer?
All the answers I found online suggest to create API in php or nodejs, but I would like to develop a sql client and the whole point of the application is to be able to make queries directly from the client device.
I cannot use the node mysql library from client side.
I am using Ionic 6 React.
No, as noted by Mostafa Harb, you cannot directly access a MySQL database in the cloud from a device. You'll need to use some kind of API.
The basic flow:
Ionic app authenticates to the API if necessary.
Ionic app uses Axios or Fetch to use the API to query the cloud database.
The API returns the response in a format the Ionic app understands.
The good thing about Ionic is that it is mostly framework-agnostic, so you can use any API you like.
Personally, I use Drupal, which is a PHP-based CMS that has support for providing access to Ionic via REST, JSON:API, or GraphQL (or a mix of the three).

Splitting web-app and mobile-app request in Yii2

I created a restful web-app platform using yii2 framework. It is working with no problems using a browser. Now I'm developing a mobile-app with angular and ionic and I'm searching for some guide to help me splitting the request from browser and app. Using the browser the web-app is configured to have a html view response, how can I detect a mobile-app request to change response in JSON format in each controller/action?
It's my first mobile-app development.
I just fighted this same war this week and I ended up splitting the folders and generating a new yii-app with fresh controllers just for the api.
I tried creating the api folder inside the web backend project, but I had to much problems with redirections, and as I was working from Android emulator fueled by Expo it was almost impossible to reach the api inside my localhost from outside.
At the end in the API REST you just reuse the database connection, rest of files are new. So there is no much to win in placing it in the same folder/project.
By the way, read this documentation: Implementing RESTful Web Service APIs in Yii2
As a code example you could check my yii2 web app: https://github.com/jvidalv/fempoble
And the api that works with the web: https://github.com/jvidalv/api-fempoble

Hybrid mobile app displaying notification in mobile app

I am developing a hybrid mobile app. I want to display notification in my application top right corner. I am using html + angularjs - front end and for backend I am using spring rest web service.
I am using cordova to just convert my frontend to native code.
Suggest me how to implement notification functionality in my frontend & backend
Note: I cannot use cordova for development. Because I cannot install it in all developers system. Only one dedicated system available with cordova installed. I can only use it for converting my html page to native
can you try this for notification alert link

Best framework for hybrid app for instant messenger

I wonna start to develop an hybrid app for an application which has a instant messages as core, besides some other realtime feature.
I was having a look to Cordova and ionic. Are these technology the right election?
Is there any module or instant messages project which I can use instead to write a new one?
have a look at
``Firebase from google
They even have a fully working chat application with source code
working demo demo
Con:- Your app is tied to google firebase infrastructure

Authentication in HTML5 + phonegap application

I'm building an application on HTML5 + Jquery and REST services at back-end . This application is meant for Desktop users and mobile users. So we are building the mobile version using phonegap. this application is a secure application and needs login screen. but now am in fix how I can achieve this.
1. If i Move the application to ASP.Net MVC then I can't create build using phonegap.
2. For phonegap i found http://www.raymondcamden.com/index.cfm/2011/11/10/Example-of-serverbased-login-with-PhoneGap but i think this is not suitable solution for desktop users
You can secure the server side using the authentication technology of your choice and then make your AJAX calls to the rest services pass along the credentials.
For example, if you wanted to write your service using ASP.NET MVC, you could protect that using something as simple as HTTP Basic Auth and then pass along a user/pass string in your request.
To achieve the login screen, you can write a dummy controller method which your login screen can call just to check if the authentication is working.
If you want a sample ASP.NET MVC backend with a PhoneGap front-end using jQuery, then I have some sample code up on GitHub and a blog describing building the application