I need help to programming an App that need a data from SQL Server and somehow I have to update the data too. The app will be a client side and the server will have all the database. did BB allow us to connect to PHP directly or I need to make a HTML so that page will run the JS?.
Can anyone help me, where I can find the demo? or sample about Sql and app?
I have already install eclipse and Blackberry SDK 7.1.
Lets assume you are building a horoscope app:
You input a date and zodiac sing and you get your horoscope from the server.
In this case, your client can be build from few HTML pages styled with CSS.
If you need something more fancy you can use JavaScript.
On the server side, you will need running DataBase, and support for PHP (running Apache).
In the simple variant your client will send requests (from a Form or Ajax) to
www.myServer.com/my_php_back_end.php and will display the response.
This is just a simple scenario so you can form your question better.
PHP_MySQL-Creating-Form
Related
I made an app using jquery mobile, php and mysql and now I'm trying to convert into .apk file using phonegap for desktop.
But I have a problem with my php code because it doesn't work, phonegap doesn't recognize php code.
Is there a way can do it to convert both jquery mobile code and php & mysql into .apk?
I will post the whole code if it's necessarily or another way to do this, please help!
Unfortunately not.
You would have to separate your server-side and client-side code.
HTML & jQuery Mobile would be your client, which you could turn into your app.
PHP & mySQL would be your server, which you could not put in your app.
You would then communicate between the client and the server by calling Ajax in client code, you might also like to use a framework like CakePHP on the server.
Good luck!!
Hi all,
i want create mobile app (i use phonegap) that retrieve and insert data in MySQL Database on web server also i will create website that connected to the same Database using (PHP).
I need guidance:
What topics should i know/use ?
What things should be implemented in Web development process ?
Can i use shared host or i will have to rent dedicated server ?
Is phonegap the right choice to accomplish the project ?
.........
Any guidance will be great.
Thank you All.
Your lack of familiarity with the technologies involved leads me to believe you are making a mole hill out of a mountain. All the skills involved need time/effort and no one answer here will cover your question.
There are various methods to achieve what you ask... I suggest starting with learning how to write some HTML5, then move on to doing a bit of Javascript and then follow it with a bit on jQuery. These skills are what you will use to place text on your web page or app.
After that, learn how to install MySQL, Apache, MySQL and PHP on your laptop. These skills will help you save data on to a server.
Then you need to learn how to combine them so that the data sent from your web app gets checked prior to saving on the server.
Then follow with how to read the data from the server and prepare it for re-display back on your web page or web app.
Once that is done - learn how to use the PhoneGap build service so you can package your app and try it on your device.
I suspect if you start now, and do 10-20 hours a week, you might get something buggy working by Christmas.
Best of luck!
I use html5 + css3 + jquery mobile to built my mobile application. Actually I've already desktop version, and i want to make mobile application.
Is that true php wont work on html5 for mobile application?
If that true, i use ajax for call my JSON (that place create on jsontext.php).
I tried HTML5 on desktop browser and it worked.
I built it to apk using build.phonegap.com and install the apk to my device.
After that, my database record not showing. Maybe it didn't execute.
Other user in stackoverflow said we can use backbone.js. how-to-access-a-remote-database-from-jquery-mobile-application
are my steps right? or I have to use backbone.js. THX.
Here's some answers:
Yes, php won't work in a mobile native/hibrid mobile application,
because php needs to be interpreted by a php server before
generating output.
Its easy and simple to both generate and parse JSON, it's widely
used in apps.
That is good. If you want an 'online-only' kind of app, you can use
a webview and point it the url of your app - its basically a browser
without navigation buttons and user interface - but something's
don't work that well, you should test before. It may also display
your app as sluggish and unpolished.
No problem with that, Cordova/Phonegap is actually becoming a very
good mobile framework. You should also install ADB
(http://developer.android.com/tools/help/adb.html), ADT
(http://developer.android.com/tools/help/adt.html) and the Android
device emulator
(http://developer.android.com/tools/help/emulator.html).
You must be sure on how to insert and retrieve dabatase records.
This depends on how you programmed it. Be sure to have the database
available publicly (accessible only from the apps, though).
Hope I've answered your questions, and that it helped.
For javascript and html files only, Dreamweaver's build app for android function seems to work great in cs 5.5. But when any php code is put in (for authentication, or for ajaxing in web service returns ) it seems that the android app just displays broken php code instead of executing it. When building the app, Dreamweaver won't even let you use a root php file in the project; it only seems to only accept html files.
Am I doing something wrong? Building apps out of web language-based files seems a lot less useful if server-side code isn't allowed.
Are there any other alternatives? Titanium studio looks really complicated, but I'm willing to read the docs if it's worth the time.
http://help.adobe.com/en_US/dreamweaver/cs/using/WSeffff8bffc80208478c8d43312e240fe0ad-8000.html
Indeed it only packages HTML, CSS and Javascript into an Android or iOS package.
I'm afraid you'll have to learn real Android development if you want something more complex.
Dreamweaver will package the files up just like you asked, however, the destination system is what runs the code. Android doesn't execute the PHP within the app. Your app has to connect with a remote server that is to handle the log in. Thinks of two separate apps, one on the phone and one on your server.
Android doesn't execute the PHP within the app. This is because PHP is a server side client and Not client side. Unless they create some inbuit servers within phones from which native apps can tap into. One option you can use is to use html files and within them, create links to php files which are in online servers so as to have your scripts executed.
Here's a tricky one.
I'm developing a web app for iPads that will be installed as kiosks. The app is essentially a quiz. Wont need to store data in a database, but will need to process data from 1 page to another page (from questions page to results page).
Original solution was simple PHP. I have now been informed that wi-fi/3g will be unavailable to the kiosks, so they wont have access to the webserver w/ php that has been working like a charm. App needs to be browser-based.
Looked around for solutions for installing PHP on iPad, like PHPPOD from Cydia, but unsure if that is even an option for iPad...and we wont be jailbreaking them. Can this even be done w/o php?
If you won't be jailbreaking them, trying to get a working PHP interpreter on them might not be impossible, but it'll probably be at the very least annoyingly difficult (and it's unlikely Apple would approve random PHP interpreters in their app store).
I'd suggest trying to port the app to Javascript instead. If it's just a simple questions -> results flow, writing a basic Javascript web app with jQuery to help out if need be shouldn't be too painful.
If you're not jailbreaking them, then you will NOT be able to get any un-approved apps onto them. Apple does NOT want you to bypass the app store, because they want their 30% cut. Installing a PHP interpreter on an iphone/ipad would allow you to build apps outside of Apple's control - this is THE main reason why Flash will never been on an iphone - it's not just for playing movies, it's actually a pretty full runtime environment.
You could try using HTML5 local storage, or use the native SQLlite database in iOS.
Without wifi/3G you would need local storage won't you? For this you need not jailbreak your iPad & force it to work through PHP. You could do that following -
Jailbreak the app & maybe try to get your PHP solution working on iPad.
Build a native app with local storage (using sqlite or core data) & handle the display through UIWebView.
Build a HTML5 app with local storage is easy to do nowadays, again UIWebView would be used.
As Amber suggests, you could build all your quizzing logic in javascript, but I am concerned here as to where you'll store data. You need to refer to point 3.
Hope this helps...