Currently I'm using codeigniter4 How can I integrate? please define briefly I'm a fresher.
No this is not possible. PhoneGap is HTML and Javascript based. Your PHP code won't run.
Even if you would have a HTML/JS project only you wouldn't be able to use it 1-on-1. You would have to implement PhoneGap hooks etc. to make it run properly.
Related
I am creating a reservation website with code igniter, but I am having a problem because I want to use metro css instead of bootstrap. how can I do that? thanks in advance. :) I want to know if using metro css is possible with code igniter. Please help me. I will really appreciate. Thanks.
You can use custom Meto CSS library which you can download from here
github.com
Introduction
Code Metro (Codeigniter Metro UI CSS) kick starts the development process of the web development process by including Metro UI CSS into CodeIgniter. With this custom Codeigniter framework, you can make a site with an metro UI interface. It also includes certain libraries such as AWS and Facebook in-case you are developing applications requiring those SDKs. Now start working on your idea.
Note: There are lot configurations to be done. So to through link carefully.
i have got the project but someone told me to use ionic framework so
can we make web application using ionic framework?
and official website is telling that it is using for creating mobile application
so i am little confused
Well, yes you can create a fully-fledged application using Ionic; it's just that it's better suited for mobile applications. It's built on top of Cordova, so it's a little better with mobile applications.
I have tried it personally in the past, and it's amazing. The tools the Ionic Community provides makes building applications a lot more fun. Yes, you'll have to override a couple of classes to get the look you desire, but otherwise, it's possible.
But remember, just because soccer has a goalie, it doesn't mean you can't score.
The framework is made for developing Hybrid apps with the use of native functionality with ngCordova. That being said, if you like the framework you can just run it from your desired hosting platform since it is basicly just javascript, and angular, with the bootstrap like Ionic tags for styling.
You cant use the ngCordova functionality from a browser though.
The real questing is, what do you need to build. You might just be better of making a MEAN stack web application,if you dont have any use for the Ionic functionality, and just choose your own styling template, like mentioned, Bootstrap.
I'm using Phonegap to build an iPad app.
The app is supposed to be offline (aside of form submission), so it will have mostly static pages, so I'm going to have lots of HTML files, since I am not using JS MVC / Require JS to minimize the complexity. The more I see it, it's basically a static site wrapped in Phonegap to build an app.
Since I'm gonna have lots and lots of HTML files, it will be a pain to manage changes in (for example) header/footer if I'm not using any templating engine. So far, I'm using Codekit to compile Jade files to HTML, and it works out fine, I'm only using Jade for the layout/block/include feature and HTML compilation.
The one thing I don't quite like of using Jade is if your file has lots of nested HTML tags (for example a complicated form design marked up with Zurb Foundation/Twitter Bootstrap), then suddenly Jade isn't looking so clean anymore.
Somehow I think there has to be a better way to do it, though. Has any of you done a mostly static pages app with Phonegap? Any better suggestion?
Thanks
you can use 1 file for all, save the data in sqlite or as variables in JS files.
the code should be like this:
<!doctype html>
<html>
<head></head>
<body>
<div id="page1" class="page">...</div>
<div id="page2" class="page">...</div>
<div id="page3" class="page">...</div>
<div id="page4" class="page">...</div>
</body>
</html>
then you can create a function "navigate(page_id)" in the js file:
public function navigate(pageid){
$('page').hide();
if(pageid == 'page1'){
$('#'+pageid).show();
// get data and append it in the div.
}
...
}
for sure you can use Jquery Mobile, but it will force you to use a pre-defined template, Personally i don't use it because writing my own template is much better and may give more options.
I use a very standard workflow that is catching huge popularity in web development - Grunt. Grunt does tasks very similar to how Codekit compiles jade, only that Grunt is very stable, has a huge community and supports jade by installing grunt-contrib-jade. It'd integrate with several templating engines.
Grunt might seem to have a learning curve in beginning, however it is a great alternative, open-source and free to use.
Grunt website: http://gruntjs.com/
I would suggest this framework. It's so easy to achieve page navigation, and you don't need to put all your pages into one file, that will make it very hard to read or maintain. This framework allows you separate any of your files(html, js, css) into very small ones so that each file is easy to read and maintain.
It also uses Ajax to get html(pages/partial views), so you can do what you like to with the html.
Our phonegap team have finished some projects based on this framework, and it's very successful. There are demos with source code on that site, which would help you setup your project. You can take a glance at the files structure through the source code.
I would NOT advise jQueryMobile as it's really a pain for phonegap apps. Here are some posts what explain why:
How jQuery Mobile Eats PhoneGap Performance, See Experiment
Who Is Murdering PhoneGap? It's jQuery Mobile
I'm using JQuery mobile successfully. I use RazorEngine as a template service and them compile the files down to static html. Jquery Mobile has a nice paging engine that uses ajax to fetch the static html files and then show those on the page, along with a lot of other nice mobile specific features.
In your post you mentioned you did not use an mvc framework. However I would advise you to look into backbone.js. Backbone is a technology that is often being used in combination with Phonegap. You could use Backbones views to organize your code.
Hello Fellow developers,
I am embarking on a new journey to develop HTML5/JS web site and looking a ways to reuse the same code for Mobile App (Would like to use it using PhoneGap or Appcelerator). The requirement is to develop once which can be used on desktop, and smartphones, but project sponser wants more secure way to handle data on smartdevices and hence we would like to choose this approach. Now my questions is
Can we reuse and architect the solution this way to reuse HTML5/jQuery code on Mobile within Appcelerator or Phonegap?
If yes, what percentage of rework will be required to support on mobile devices?
If no, what could be alternatives?
thanks all for your guidance.
(1).
If your current desktop website interact with server-side in webservice way,everything will be done very easy. Even you can directly modify the *.java in src\com\ like this:
super.loadUrl("http://balabalabala.com");
With phonegap wrap, your app can be access right now.
If not, you will need spend time in implementing the server-side interfaces for client-side.
(2).
You need to refactor your static html page with some javascript framework for mobile(such as jquery mobile,sencha touch).
Using them to make your phonegap app more simalar with native app.
That takes time too.
The 2 things above are what you need rework.
I hope you are planning to build a mobile website. If so, its very easy to convert it to a PhoneGap app with may be only 5% changes provided your website uses only HTML5,JS and CSS. Its not possible to run a a website written in serverside languages such as PHP, ASP.NET, ruby etc. Some important items to keep in mind:
start development of website and app together. test with mobile browser and phonegap so that you can fix issues as and when they arise.
use a mobile HTML5 based framework like Kendo UI Mobile/ jQuery Mobile etc for developement
so that you dont spend time fixing all the mobile related UI stuff.
Wherever you are using PhoneGap features, check whether you are running on PhoneGap or else fall back to the browser feature.
I'm developing a mobile application in HTML/CSS/JavaScript using PhoneGap.
The question I have is how to manage files in my project. It seems that the application runs faster if all the HTML is placed into one file. In my case, my application should contain several pages and I can't think dealing with a more-than-2000-lines index.html, repeating each time same code for different views.
I'm coming to you to know what solutions you've found to make something simple that a foreign developer could understand and work on easily.
I'm using jQuery Mobile Beta 1. I've heard about jQuery tmpl which appears to me as a good solution to clear the code and reuse HTML, but is there another trick?
Thank you for your answers. Hope this topic would be useful for someone else.
Phonegap are not support multipage app. But mustache for js https://github.com/janl/mustache.js could help with managing of multiple html files.