I want to delve in to mobile applications, specifically Android apps (I am an Android fanboy). My web application is a content based site; built with PHP/MySQL and served with a lot of HTML5, CSS3 and JQuery.
What would be the best starting point and direction to take to begin development of a mobile application? I've seen a couple of videos on PhoneGap and it seems very interesting with its standards-based cross-platform approach. Is that a good way to go?
My basic intend is to have an application that can load content from my site (served to the app probably as JSON or XML) which the application can render in native UI (or make use of local storage etc. that a simple web content frame won't do). I guess it would be a glorified mobile site, but I want it to me slightly more with the ability to save and render content for if internet is not available.
PhoneGap does a nice job of bridging native APIs so they are available to your JavaScript. What you really need to consider though is the look, feel, and performance of the HTML/CSS/JavaScript you run on top of PhoneGap.
I have recently started building an app with JQueryMobile. The look and feel is really nice, and I was able to build something very rapidly. However, page transitions are very blinky/choppy to the point where I don't think its acceptable. This is really a problem with Android's browser performance and not JQuery Moble.
Sencha Touch seems to have animations and transitions that are a bit smoother, but it has a steeper learning curve.
Another option is to create an application which is a hybrid, containing some PhoneGap based Activities and some purely native Activities.
Since you are already familiar with web development, I would suggest doing a quick sprint with PhoneGap and Sencha Touch. If it looks promising, stick with it. If it doesn't, abandon it for a native app.
If you want to use native UI & controls, then Phonegap will not help you. It essentially wraps HTML/CSS/JS in an app & provide JS API's for native device features. It does not help you create native UI & controls.
You can directly code in native Java or use Titanium if you want to code in JS and build portable apps with native UI.
If you are only going to be targeting Android, then I would suggest avaioding PhoneGap or other cross platform SDK's. If you're comfortable with Java or are willing to learn, go with the Android SDK tools and Eclipse.
I have found that working with JSON is extremely simple on Android, and dealing with xml is not that much harder.
If you want to stay away from coding in Java, you could simply use what you have already as an HTML5 app, and create a new mobile CSS to reflow the look and layout of your app. That way, you can still use all the HTML and javascript you are currently using, and get your info from the same server...
In my experience though, Android web app are very slow... unfortunately (and hopefully Chrome will fix this) android browser is very bad with javascript... very slow.
Related
The question is very basic, but it's very important for me. Please suggest me a solution. I have some mobile app template in HTML/ jQuery. I want to create Android app using the template. What will be the best choice for the back-end language. Database is MySQL. I have 10 years of experience in PHP. But I found PHP is used mainly for web, it is not suitable for Android app. So, please suggest what language should I learn and which IDE should I use. And finally is there anyway I can use PHP for developing Android App?
Node.js might be an alternative for the back-end, because it's still included with javascript and supports mysql
For both hybrid and native apps, you will probably need to develop an online API the app can use as a backend. That API will not run on the mobile device but on a webserver somewhere and can most definitely be built using PHP/MySQL.
For the app itself, if you want to be able to use your HTML/jQuery template, you're pretty much limited to a web app or hybrid app. These render your UI in a browser context so they're capable of loading and runnig jQuery code. You will probably have to learn about service workers to handle on-device caching so that your app stays functional when the device is offline.
For a native app, your best bet IMHO is to go with React Native. You cannot use your current HTML/jQuery template for that, since native components do not use HTML or Javascript (or CSS for that matter). But, in React Native you can rewrite the HTML part to use JSX components which are pretty similar. All the jQuery logic would have to be re-engineered "the React way" but will still be Javascript. The React Native compiler will take care of converting that JSX/CSS/Javascript code to native Android components.
It depends on you but i will suggest you if you want to expend your skills in applications development try to learn ReactNative
I am completely new to the concept of Hybrid App Development. I have developed a website without any framework like Angular or React, just core coding. Now I want to develop a Hybrid App from this.
But I have some questions running in my mind and could not find answers anywhere so thought of asking this community of Geniuses.
1) Is it necessary to use any framework like Angular or React or Vue for the development of a Hybrid App? Or can we simply develop a Hybrid app without such frameworks?
2) Is MVC architecture important for the development of Hybrid App or we can convert any website into a Hybrid app having no MVC architecture?
3) once a Hybrid app is made, what code would it be having inside the app wrapper? Will it be my HTML, CSS, Javascript, etc or it would have converted all my code into Java for Android? I mean what if anyone tries to reverse engineer my apk? What code will he have?
4) What about security? I mean I will be using database connections, settings, configurations and other security codes which should not be accessible to anyone who tries to reverse engineer my app?
5) What happens when I update my website on HTML and PHP? Will I have to recompile my Hybrid app to have new features of my website?
6) Will Hybrid App also have my PHP code at server side? I mean I have a website developed with PHP, so what is it gonna do for dynamic PHP codes?
I hope these questions make sense for anyone new to Hybrid App development. Thanking you in anticipation. Any support would be highly appreciated.
Here are my 2 cents
No you do not. You could do in in plain html/js, and then use Cordova for instance to package the app. But I think it's much easier if you use a framework if you have to rewrite the app from scratch (wich I think will be your case, since you seem to only have a classic PHP website).
You can convert any JS/HTML SPA website to a hybrid app, it does not need to be MVC. But you cannot if your site is built with PHP
If you use a hybrid app, it will use the device's webview to display a 'local' JS/html based website. I don't know what you would see with reverse engineering, but potentially your whole website. But anyway it'd be the same for a classic desktop SPA website.
All DB connections and secure configurations should be kept server side, and you use an API to access your data.
You cannot build a hybrid app using PHP. Hybrid apps use webviews to display the content, which are kind of simplified browsers. So they can only work with local html, js and css files.
The hybrid app itself is meant to be only html/css/js files. If you use PHP, it should only be for the server side API, not for rendering views.
I have a question about web and native app development and integrating multiple frameworks.
I currently have a web app (html 5, css, js/jquery, php, mysql) and want to make available as a native app on Android and iOS. It uses Yii framework and I was thinking about using Netbeans IDE and Apache Cordova to make the conversion. How do I go about this? Can someone supply some links or an explanation to clear things up for me?
If you have a different method you'd like to recommend instead of Cordova, I'd appreciate that too. Please provide why you prefer that method though.
I've seen plenty of information on this forum and the web that explains this process, but non with Yii in mind.
Thank you for all and any help!
I had the same issue. since we have decided to drop the native app and use an html5 website design i picked, Yii+backbone.js .
in your case, if you plan on building a native app, the backend ( PHP or Yii in your case ) will not be used as a smart web server , because you will use a JS framework.
Known and well loved and used frameworks are:
angular.js
backbone.js
knockout.js
ember.js
Keep in mind, php is a server side language. Its not client based. Yii could serve as a backend providing the data thats all. When you want to use cordova you need a client side framework like jquery mobile.
Which technologies I need to learn for developing Online Chat Room with voice/video support?
Presently I know Core PHP/MySql and DHTML.
If you want to do a chat that would scale, you need to learn how to write an event handled application, there is a lot of framework to build such application, a short list
node.js
python twisted
etc...
This tool would permit you to use the comet style of ajax call.
Sadly, I don't think there is any event driven web server/framework for PHP, so you would probably have to learn other language.
Websockets do suit the job best. That means you ought to study some javascript and a serverside technology of your choice. http://dev.w3.org/html5/websockets/
There is a free API called TokBox that I've used for custom video chat applications in the past:
http://www.tokbox.com/
You'll have to build a back end for storing and passing chat sessions, but it has a very robust javascript library that lets you control the number of participants, the position and size of screens, audio controls, etc etc etc... and it has developer libraries in php and several other languages that help you connect to their servers to back-end controls (including downloading and archiving chats).
It's well documented, and I was able to get a fairly customized system up in about a day.
I want to design a mobile-based application that enable lectures set question through iphone.
I have had an website designed by PHP that lecture can set question through internet.
How to change and start?
Please tell me the detailed process.
Thank you very much.
If you are trying to design a mobile WEB application PHP should not be your first concern.
You will first need to understand the differences of styling web apps using CSS for mobile phones. There are some frameworks out there that can help you with this - I have never used one myself but a quick Google found http://www.phonegap.com/.
If you want to build actual native apps you will need to build them in that phones native language - iPhone is Objective-C, Android is a version of Java and so on.
Start by reading this:
http://webdesign.about.com/od/mobile/a/write-web-pages-for-the-iphone.htm
and then go directly to specifications.
Sencha Touch is also one of the more popular frameworks to build mobile apps with HTML5/Javascript. Of course you can use any server side scripting language like PHP with it.
Building native apps for mobile devices is much different than building a web-based application for use by a larger (compatible) audience. If you desire the look and feel of a native app for your project, then you might think about building and app for the most popular of mobile device operating systems, such as for the iPhone, Blackberry, Android and any other mobile devices you want to include. Think of the native app for the mobile device as the customer service counter at your local department store, its a friendly and welcoming interface put in place to get you to the information you seek, quickly and efficiently. That's pretty much what your native application would be doing, if constructed with portability in mind. Which means you build a customer service counter for all different devices, while the PHP web-based application would become the tie in for all these devices onto one main source of information, your web server.
There are many ways to build both web-apps and mobile-apps, and even more ways to make them all interoperable. How you build the entire system from the floor up will definitely have an impact on the scalability, administration and interoperability and overall usability of your application.
Regardless of the avenue you plan to take in the development of your application, the core question must be answered. What purpose does this application serve or what need does it meet? By answering this simple question, your answer will present itself, as to what tools to use in the development of your application.