Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jwavess's avatar

Can you make iOS, Android and C# with Javascript and PhP - MySQL

Hey guys,

So I'm starting to see a few of these "hybrid" and new ways of creating native apps for iOS, Android and Windows with sources like these

https://xamarin.com/platform

http://ionic.io/products/creator

And I was wondering if there is anything out yet I can create the apps with using PhP / Javascript, not just full stack Javascript. I believe with the ionic one you need to have a skill set of Angular, Node, NPM and express for it to work. The only reason I am not %100 on learning any of those is wouldn't Angular JS replace Laravel, and isn't Node, NPM and express all backend, thus replacing PhP?

Seth

0 likes
19 replies
willvincent's avatar

I believe with the ionic one you need to have a skill set of Angular, Node, NPM and express for it to work

Not so. ionic is a frontend framework. You don't need node other than for the compilation to a native app (with cordova/phone gap). ionic can work entirely on its own without any server side, but yes absolutely you could have it talk to a server via an API implemented in PHP.

If you do consider going this route, especially as you've not yet learned it -- do yourself a favor and learn typescript, then you can jump in with ionic 2, which uses angular 2, which is typescript based.

jwavess's avatar

@willvincent So Typescript seems to be, based off a quick google search, a more robust language than Javascript? Also if I did choose to learn Angular.JS, dose that mean it would be replacing PhP? The reason I want to stick with PhP and not go to Node is that it can communicate with MySQL, relation, verses Mongo, non-relational.

So the general idea would be to replace Laravel with Angular.js Use Typescript instead of Javascript And use PhP MySQL for the back end make the switch from PhpStorm to Webstorm

?

Seth

zachleigh's avatar

Angular is a front end framework. It is not a replacement for php or Laravel.

Laravel is a php framework. It is not a replacement for php, its more like a solid base to write apps upon.

A framework is not a replacement for a language, it just provides basic structure and common functionality so that developers dont have to reinvent the wheel on every single application they make.

Before jumping into a framework, Id learn basic php and javascript. Just a suggestion....

jwavess's avatar

Hey, @zachleigh I may of been unclear as to my last comment. I am fully aware of the differences between a language and a framework. Just a little while ago I finished an entire online bootcamp in PhP & MySQL, followed by one of Jeffrey's Laravel courses. What I was implying was that Angular.JS is a framework that is meant for Javascript AND Javascript's backend language - Node. That being said I could indeed use PhP in the Angular.JS framework but It would not be as efficient as using Node. So if I would take on Angular.JS, thus replacing Laravel, since I Would not use Laravel for Node, I would have to leave my favorite language PhP and my favorite query language MySQL AND Laravel. Also I wouldn't use PhPStorm with Javascript, Node and Angular, I would have to switch to Webstorm. So my main goal at this point is to find a way to use something like Ionic with Laravel and not Angular.js. The gentlemen from Ionic. LLC informed me it only works with Angular.JS when I asked him if I could use it with Laravel. Are you saying I can use Laravel AND Angular.js? If so, why did Jeffery make a Vue and React series when instead he could of made one with Angular, Angular being the more "robust" out of the two.

willvincent's avatar

So Typescript seems to be, based off a quick google search, a more robust language than Javascript

@jwavess Sort of, yes, Typescript is a 'superset' of commands on top of javascript. Most notably adding typed variables.

So the general idea would be to replace Laravel with Angular.js Use Typescript instead of Javascript And use PhP MySQL for the back end make the switch from PhpStorm to Webstorm

No, angular does not replace php, it's a front end framework built on javascript (typescript in the case of angular2), not a backend language (php) or framework (laravel). What editors you use really don't matter, you could use windows notepad :)

Also, lets set the record straight a bit here... node can't only talk to mongodb. Node is perfectly capable of talking to a variety of SQL databases, postgres, mysql, sqlite, etc.. and it can be done either with raw DB queries or with an ORM. Node can be, however, more challenging to work with than PHP for the same reason that people love node -- it's asynchronous. That means you either have to leverage promises, or get stuck in a super deep nested callback hell. But that's a whole other story. Node is a wrapper, the engine -- if you will -- that allows javascript to be used on the server.

Long story short -- Build an API. Build a frontend -- either with php, or angular, or something else entirely -- or all of the above. But build the api first, and if you know php, use that. @zachleigh is giving you good advice too:

Before jumping into a framework, Id learn basic php and javascript.

d3xt3r's avatar
d3xt3r
Best Answer
Level 29

Angular.js (as already mentioned before) is a front end framework built on Javascript. Node.js is a backend framework built on Javascript. Laravel is a backend framework built on PHP.

You can have N * M options where N is the number of back end frameworks you know (including use of native PHP). M is the number of front end frameworks you know. Including basic html site.

Just chose you backend and frontend frameworks, there is no such dependency and constraint that angular works better with node.

1 like
willvincent's avatar

So my main goal at this point is to find a way to use something like Ionic with Laravel and not Angular.js

ionic IS Angular. That's the browser side.. the server side does not matter you could write it in php, python, ruby, go, scala, perl, c, any huge number of options. An angular frontend is entirely separate from the backend. It is, for all intents and purposes, a stand alone, client side application. It can talk to a backend powered by node, or php, or whatever, but it doesn't necessarily have to, and that backend certainly does not HAVE to be node.

willvincent's avatar

To reiterate again -- the only node requirement that ionic has is to build the completed frontend angular application into a native app for deployment to the apple/google/whatever app stores.

1 like
jwavess's avatar

GOTCHA! lol thank you, now that we got that all cleared up a few more things.

A: How do I use a front end and backend framework on the same project, such as Laravel and Angular.JS B: Why is Ionic bound to Angular.JS, in truth I have no idea how Ionic works or what it even is, I just know you can build phone apps with it and it is for some reason only compatible with Angular.JS, why?

d3xt3r's avatar

I didn't even knew about ionic before this post . LOL. Quick search revealed it to be wrapper for HTML5 apps. What??? HTML5 apps in 2016??? May be its good for prototyping but for real development, far from ideal.

Anyways, "Hybrid" is something that is used very liberally these days. To me it means, I have learned a lot and i will not let you learn. Pay me (Not me, them :) ) and your job is done (not really)

A: How do I use a front end and backend framework on the same project, such as Laravel and Angular.

I use it, what is the exact confusion that you face.

jimmck's avatar

@jwavess You should really be coding now. Pick a language and code. There are no magic bullets. The God platform (aka Elvis) is still under development somewhere near Area 51 or more likely Tonopah now.

1 like
jwavess's avatar

@premsaurav LOL, glad you are caught up. I'll just need to watch Jeffreys Vue videos with Laravel once I finish the Laravel series. I was also considering this approach

http://venturebeat.com/2012/10/23/huge-news-php-developers-can-now-design-build-and-publish-mobile-apps-right-in-zend-studio/

Although I think Zend studio is an IDE, I hope Jetbrains will release something similar for PhPStorm, or perhaps a plugin.

@jimmck lol soo random, I have = PhP / MySQL / Javascript / Sass / html

willvincent's avatar

Yes, technically ionic is a for producing "hybrid" apps.. but it takes what you've created as an HTML5/JS/CSS app and wraps it into a native webview component, so that it behaves as a native app. And since it uses Apache Cordova to do that, you can access most/all of the native device functionality from javascript with cordova's api and various libraries/plugins.

So.. is it 'native' in the same sense that building an Android app in java, and an ios app in objective c would be? No, definitely not. The huge advantage it gives you though is one codebase that requires very few and sometimes no changes to work 100% cross platform. ionic simply provides some css and angular directives to make a web app (packaged into a "native" deliverable) behave like native apps, with minimal effort to build for multiple platforms.

If you also include CrossWalk you can avoid a lot of pain you might otherwise run into on android since it will use the chromium browser for the webview instead of the often janky half-assed broken android browser.

May be its good for prototyping but for real development, far from ideal.

Native apps will almost certainly always outperform a webview 'hybrid' app.. but if you want to build something cross platform you need a completely different codebase for each platform, and then you're looking at Java (android), Objective-C or Swift (iOS), and C# (Windows)

Personally, for most things I think a slight performance sacrifice is probably worth it to dramatically reduce complexity of building an app for multiple platforms... and being able to do so essentially just with javascript is pretty incredible.

So, really, what is ideal? Having to completely rewrite code to roll out another platform, and then maintain multiple code bases in multiple languages, or using one and maybe having to make a few very small tweaks for platform differences? I guess that largely depends on your time/budget and what you have available in terms of development team. Also, largely -- what it is you're building.

To just catigorically say "oh, that's not ideal for "real" development" is short-sighted and/or disingenuous.

1 like
jwavess's avatar

@willvincent awesome! Thats what I was thinking. The App I want to build will need to be able to use a GPS, is that possible with Hybrid apps? I keep seeing on articles that only "native" apps can use this functionality? I just want a user to be able to mark a location on a map somewhere and have that location saved to a database.

d3xt3r's avatar

@willvincent

To just catigorically say "oh, that's not ideal for "real" development" is short-sighted and/or disingenuous.

By "real" , i meant a "big projects" and definitely its neither short-sighted nor disingenuous (IMO). The granularity and the efficiency a native app can achieve, you cannot expect the same from hybrid apps, leave aside the size of your application.

Yes, for prototyping, small projects, definitely its a go.

jwavess's avatar

@willvincent Awesome!!!! and @premsaurav Ill keep it in mind, my app idea is really that big, I mean it will have quite a large database but as far as complexion and functionality its verrrrryyyyyyyyyy basic. it only needs to do three things.

Please or to participate in this conversation.