Solved

Write an app

Posted on 2016-09-30
10
69 Views
Last Modified: 2016-11-25
What is the diff between writing a php page and making into an app?  Can someone point me to a page to write an app?
0
Comment
Question by:breeze351
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 41824131
It is actually quite different.  An 'app' starts from and runs on the client's device.  Web pages start from the server and run in the browser.  Since an 'app' is basically a program running the device, it has different privileges than a page a in web browser.  Apps for phones are written in JAVA for Android and Apple's Xcode for iThings.  Apps also have to be approved to be downloaded and installed from the Google and Apple stores.
1
 
LVL 31

Assisted Solution

by:Marco Gasi
Marco Gasi earned 125 total points
ID: 41824719
To write an app you can also use html5, javascript and css3 to write a hybrid app which will be converted into a native app for Android and/or IOS and/or Windows mobiles by Cordova/Phonegap plugin.

There are several framework  to help you to do this: jQuery Mobile, Ionic and many others: just Google for hybrid app

From within a hybrid app, which is foundamentally a web application, you can connect to a remote server when your php scripts can execute, perform database queries and any other task you wish returning a result. In order to connect to a remote server from within your app you'll have to use jsonp: personally, I'm happy using this jQuery plugin and write your Ajax calls using a special tecnique... but I'm going too forward. If you'll go to write a hybrid app, using jQuery Mobile you'll can post any new question here and I'll be happy to help you, if I can :)
0
 
LVL 54

Assisted Solution

by:Julian Hansen
Julian Hansen earned 125 total points
ID: 41824732
What is the diff between writing a php page and making into an app?
PHP is server side code - you can use it to write service endpoints that an app connects to but you won't write the app itself in PHP. With most internet based applications you have to define a stack - this is the combination of backend and client side technologies you will use to deliver the app experience to the end users. In a particular stack you might make use of PHP to deliver content back to the device where the app is running. As Marco and Dave have pointed out though the actual app runs locally on the device - and will either be coded in the native language for the device or using a hybrid solution like Cordova or ReactJs Native etc.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Assisted Solution

by:breeze351
breeze351 earned 0 total points
ID: 41824893
Where would the data reside? On the server side or does it have to be downloaded to the client?
0
 
LVL 31

Assisted Solution

by:Marco Gasi
Marco Gasi earned 125 total points
ID: 41824907
This depends on your choice and your needs. If you download dta from the server to store them locally on the device you can use SQLite. Keep in mind the SQLite doesn't support relational database so you can't have foreign keys, for instance. This kind of things depend on the type of the app you're going to create, the amount of data, if the app must be work even offline and so on.
0
 

Assisted Solution

by:breeze351
breeze351 earned 0 total points
ID: 41826781
I have the page running in PHP on a server and it does work.  Do I really to convert it to an app?  I understand that the app runs on the client, but why does it matter?
0
 
LVL 31

Assisted Solution

by:Marco Gasi
Marco Gasi earned 125 total points
ID: 41826790
I'm not sure: are you asking why you should worry about creating a mobile app from your web application? That depend on several factors. If your web application looks great in mobile device you could just go on with it, unless you need some specific features like, for instance, push notifications or if you can improve the appliction using mobile plus like camera, gps and so on
.
In addition, you could create an app just to follow the trend: mrketing and commercial considerations could be enough to decide to create a mobile app...
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 250 total points
ID: 41826870
If your 'app' would do nothing more than the web page does, then there is no reason to convert it to an 'app'.  However, you can't directly convert your PHP page into an 'app' for all the reasons listed above.  #1 is that the phones don't run PHP.  A lot of companies appear to have their own 'apps' for vanity reasons... but vanity seems to sell well to a lot of people.
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 41901521
I was out of town when this question was posted, but I'd like to add one comment about this part:
Where would the data reside?
That could be one of the more important questions of the design.  In round numbers it takes about 10x as much electrical power to get data from a server, compared to getting the data from in-device storage.  This has implications for battery life, so if you can cache information in the device you will do your client community a great favor.  Further to this point, any scheme that does repeated or unnecessary polling of the server should be considered a design flaw.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now