Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Phonegap with ajax and Perl backend

by Corion (Patriarch)
on May 11, 2017 at 13:28 UTC ( [id://1190059]=note: print w/replies, xml ) Need Help??


in reply to Phonegap with ajax and Perl backend

Personally, I found PhoneGap to be a horrible experience.

Besides running Perl on Android, I'm currently looking at Progressive Web Apps and Service Workers to aggressively cache web pages on the client. If you can limit the communication to the server to very few instances or precacheable responses, you can create something that very much looks like a native application on Android. You don't get access to interesting Android services like the user address book or user calendar that way.

If you need some more fancy interaction, you will have to implement your backend two times. The "online" backend in Perl. This is what you already have. The "offline" backend in Javascript, this backend will be accessed by your service worker when the online backend is unreachable. That Javascript backend should behave like the online backend but store the interactions for later.

I'm not entirely convinced that this is less work or a better approach than porting a complete application to Java, but at least you get the "web front end" and "native application" from one codebase that way.

  • Comment on Re: Phonegap with ajax and Perl backend

Replies are listed 'Best First'.
Re^2: Phonegap with ajax and Perl backend
by Anonymous Monk on May 11, 2017 at 15:41 UTC

    Oh...how was it a horrible experience? Did the app work on both Android phones and Iphone when converted from a web site using PhoneGap?

      It was a horrible experience in the sense that I was stuck when getting the complete thing set up. I never got as far as building the app, even for Android.

      Maybe I was looking at the wrong instructions or outdated instructions. I found the mix of plug-ins that need to be installed for functionality and the (un)availability of the features depending on versions of various plugins perplexing and the process of installing too opaque.

      In retrospect I'm sorry I didn't keep notes of my dealings with Phonegap, but I think I wasted three or four evenings on it before trying Java instead. In comparison, the Google Android Studio (rebranded IntelliJ) made Java on Android shine and I got to a working application within one or two days of autocompletion and Stackoverflow.

        I see. Hopefully things have improved with the newer version of PhoneGap.

        It would take me far too much time to make a Java version of my website to make it into an app - and I am not even familiar with Java's syntax. I discovered PhoneGap and thought I could give it a shot - though understandably the html-css-javascript app will not equal to a native app.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190059]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found