Setting up a CMS for a Phonegap / Cordova iphone app - ios

When making a iphone app with Phonegap / Cordova is it possible to attach a web based CMS to it, to pull the data down from, so that a non technical user could update the app ?
Usualy you'd just build them using html, css, jquery/js but i wandered if there was an easier way to update them ?

Rather than a CMS, you should look into static site generators. I use Jekyll for all my PhoneGap apps, including one that has a non-technical user updating the content.
Content pages are set up as markdown files with a yaml header - not quite as user friendly as a full CMS, but still pretty easy to edit.
I have jekyll set up as a build step, so all the generated html files get packaged and deployed to the device as part of a single click build process.
You could export static html from a web based CMS, but that will likely be more trouble than it is worth by the time you debug all the bits that were designed to work online only.
Loading the pages directly from the web will work just fine technically, but runs into several of the app store rules - no significant added functionality, no offline access and possibly downloading executable code.

You could use a normal cms on a server like a webpage so normal joomla wordpress etc.
Then you add the url to the phonegap whitelist and load it like the normal phonegap html url.

With DrupalGap, it is possible to create iOS (and Android, etc) mobile applications using PhoneGap and a Drupal powered website.
What is Drupal?
Drupal is an open source content management platform powering millions
of websites and applications. It’s built, used, and supported by an
active and diverse community of people around the world.
Why Drupal?
Use Drupal to build everything from personal blogs to enterprise
applications. Thousands of add-on modules and designs let you build
any site you can imagine.
What is DrupalGap?
DrupalGap is an open source mobile application development kit for
Drupal websites. It uses Drupal, PhoneGap, jQuery Mobile and jDrupal.
With the DrupalGap Mobile Application Development Kit and API,
developers can create custom multi-platform mobile applications that
communicate with their Drupal websites.
Helpful Links
DrupalGap Getting Started Guide
DrupalGap SDK on GitHub

Related

How to load javascript globally on a web-based Rhomobile application

We are looking at transferring our web-based app from Naurtech CETerm to Rhomobile. We can change javascript functions/meta tags to use the methods of Rhomobile instead of CETerm, but due to the poor hardware performance of our devices the slow down caused by the overhead of loading jQuery and other files is significant. (Prior to this we had no requirement for jQuery, although it would have been nice to have it). We also now need the rhoapi javascript which is significant.
Is there a way to include these "framework" javascript files in the Rhomobile container app and have them available to all pages loaded without them needing to be re-parsed on each page load?
It is currently a web based app loaded using something like the following in our rhoconfig.txt file as opposed to a local file:
start_path = 'http://xxxxxx.co.uk/login.php'
My current understanding is that this means the app/layout.erb file cannot be used to solve this problem?
Thanks
More than RhoMobile Suite (and it's RhoElements enterprise device framework) you can take a look at Zebra Technologies' Enterprise Browser that is intended to be used as a stand-alone industrial browser, targeting Windows Mobile/Windows CE and Android devices manufactured by Motorola Solutions (now Zebra Technologies).
On "not too old" Windows CE/ Windows Mobile devices Zebra's Enterprise Browser uses a webkit derived HTML5 capable renderer engine so, to answer your question, you can use HTML5 application cache to download the JavaScript libraries only if there's an update, in this way you can remove any network delay.
I've seen some project using giant JavaScript files (well above 1MB compressed) on old WinCE 6.0 devices, the startup time is clearly the biggest problem, with the risk to look at a white page for 5-7s. This can be alleviated with an async loader and a splash screen. It's not going to make your page faster, but the user will know what is going on.
You can find more information about Enterprise Browser on Zebra Technologies developer website, the Launchpad, inside Enterprise Browser area.
If you build your custom RhoMobile web-app container with the idea to use in server pages, local resources, you can hit some issues around cross-site scripting prevention policies.

Zendesk app integration

I created a web application by using HTML, JS, JQuery, and some Jquery plugins. Now I want to integrate it into Zendesk. Can I use it like just copy all my files and paste it into zendesk zip file ? Or Do I have to re-code entire thing to make it work for ZenDesk ?
I checked the examples in online, they didn't mentioned anywhere about reusing the apps that already developed in Zendesk.
I am currently doing some fairly extensive Zendesk integration. If you are referring to customisation on the Agent Portal side then it will have to be a Zendesk App under strict Zendesk adopted frameworks jquery is included (http://developer.zendesk.com/documentation/apps/). If in the customer facing Help Center you can simply go into there on screen editor and paste your html, js, etc into the relevant sections see (https://support.zendesk.com/entries/22618341)
Good luck,
Tris
If you want to integrate your app to Zendesk as an Agent App, you might consider the chance of using within an iframe.
Note that the url to which the iframe is pointing to must be served as HTTPS. Otherwise, it won't work.
EDIT:
As of version 2.0 of ZAF (Zendesk Application Framework), it's easy to integrate any webpage. In v2.0, you aren't restricted to any technology or environment.

Combine JQM, MVC and PhoneGap together

I have a site which uses microsoft mvc 3 on the server side, jQuery Mobile on the client side and I want to combine it with PhoneGap and produce executes for Android and iOS.
Is it possible?
How?
Thanks
Yes, it is possible.
If you must use Phonegap, there are a couple of things to do:
First, you must create a project corresponding to each platform , following these instructions. Once you do that, you basically copy all the client side code (js, html, css) to the www folder of your project. This is one of the reasons, the app could load faster, since it's reading its resources from the local filesystem, and not receiving them from an http connection each time.
Second, you must find a way to provide your server side data to your app. If you are already using REST services or RPC methods to populate your website, then that's done, but if not, you must start by building them, and then calling them from your client (through ajax calls from jQUery most likely), and then rendering them through javascript (you can use the multiple templating libraries out there or just plain javascript, I recommend the latter only if the UI updates are minimal).
As you can see, the second part requires quite a little bit more work. Especially if you haven't built web services before.
The other option ,which does not require phonega/cordova is to use an embedded webview. Then you wouldn't have to do anything. It would work similarly to a browser (Loading the remote URL of your site), with the added advantage of being inside and android/ios app, and you could add other views or communicate with the embedded webview using native code. If you are planning to load html files from the filesystem and not from your server, you would have to do the same thing you have to do with phonegap.
It happened to me, if you have a web app depending on server code I would go with a WebView based app, and not a Cordova app.
It's really simple to create those webviews apps for Android or IPhone.
Here you have an example for building a webview based app on android
Here you have an example for building a webview based app on IOS
Hope it helps.
If you want to reuse your site you'll need a webview that browses it.
Phonegap wouldn't be needed if you use this approach, but the application will not be as responsive as a native app, and the IPhone moderators may reject your app for that reason (it happened to me).
Another approach would be that you recreate your site as a pure Javascript application and only communicate with your servers to execute some REST Services. In this case Apache Cordova makes sense.

PhoneGap Application from a MVC4 application

I am beginner with PhoneGap. However I have successfully created a small PhoneGap application for ANDROID emulator. Now I want to start with something related to my project. I want to develop a web app using MVC4 for desktop/laptops and want to in turn develop a mobile application for Android/iOS using PhoneGap.But what I understood is that PhoneGap only take input pure HTML/JavaScript/CSS. My MVC4 application is having some csHTML files, some resource files etc. How can I convert these files to make them PhoneGap compliant.
I have googled a lot for this but not getting any meaningful.
Also please tell me that whether I am thinking in right direction or there is something beyond this.
One more point my MVC4 application is multilingual in nature based on the language of the browser. Does it make sense to have multilingual app on mobiles. If yes then how can I get the culture information on the mobile devices using PhoneGap.
If possible please share some live examples or code snippets.
Thanks.

Using Phonegap as a native container for a Rails 3 App

I'm looking into using PhoneGap for an iOS app so that I can utilize the camera API. The plan is to use Rails to manage the entire experience. At this point, I'm not particularly concerned about performance. If it wasn't for the need for the camera, I would simply design it as a true web app.
Most of the answers and tutorials I have found suggest using ajax to the backend server to render the frontend. At this point in the app development, I'm not sure I want to build so much of the view in JS and would prefer to use Rails to render the views. I have seen a few very brief references to use PhoneGap as a container to literally render the Rails app. Performance aside, is this possible and how would I set up the core html file in PhoneGap to let the mobile app run normally?
I do not believe such a container exists to run on the client side but it is possible to dynamically serve a PhoneGap app (i.e. the app acts as a web browser with native functionality available via javascript commands).
Here is code which demonstrate exactly what you are describing.
Here is a screen cast I did associated with demo.
NOTE: The demo is using an out 3.2.1, and is broken as of the latest version Xcode and/or PhoneGap but it is possible, and apps of this nature are valid in the the various app stores, (Linkedin alongwith many others are already doing it.) The logic is there I just haven't had the time to fix the bug with the new version of Xcode, or update the PhoneGap code (doing the update may actually fix the bug in one quick work session).
Maybe you can also check my example app that is exported to Phoengap. It doesn't use camera but it is possible to combine native parts with Phonegap.
https://github.com/joscas/base_app/tree/devel (currently in the devel branch for the exportable version)
Life deploy: https://starter-app-staging.herokuapp.com (the desktop version)
It is based on rails / ember.js plus with token authentication (ember-auth) + OAuth (Google, LinkedIn,..) and Devise.
It uses the (phonegap-rails) gem I've created to export assets, fix paths etc.

Resources