Float Mobile Learning – Developing Better PhoneGap Apps Float Mobile Learning TM

Blog

Our Expertise

Comments on “Developing Better PhoneGap Apps”, Page 1

You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Developing Better PhoneGap Apps”.

No related posts.


24 Comments to Developing Better PhoneGap Apps

  1. Ciaran's GravatarCiaran
    March 10, 2011 at 11:46 am

    The issue with using touchstart instead of onclick is that it can mess with the expected browsing experience, the main one being scrolling.

    If a user tries to scroll down the page but touches an element that fires a ontouch event, the page will automatically load the next page whereas an onclick event will cancel itself if it detects any movement, i.e. scrolling up/down/left/right.


  2. March 11, 2011 at 9:30 am

    Daniel, can you share the code you guys use to compare touchstart, touchend, and touchmove?


  3. March 14, 2011 at 11:45 am

    a workaround for the 400ms delay/scrolling is to use touchstart instead of onclick, but also check if the user is scrolling

    http://code.google.com/intl/ro-RO/mobile/articles/fast_buttons.html


  4. Xavier's GravatarXavier
    April 4, 2011 at 10:24 am

    You say “Find the processes which are taking the longest to complete”. I have not found a good technique yet within Phonegap to achieve this. Do you have any recommendations for profiling techniques within Phonegap applications?


  5. jussi's Gravatarjussi
    April 5, 2011 at 4:10 pm

    Is there a way to get responsive input for forms on initial selection, that brings up the keyboard? I tried using the above technique (as per links), but with both ios and android, it didn’t seem to make much difference. On android the input selection was slightly faster, but on both systems the keyboard came up with a noticeable delay.


  6. SoFierce's GravatarSoFierce
    April 25, 2011 at 9:21 am

    Thank You! Thank You! Thank You! Thank You! This is a really “snappy” solution to touch events. I almost abandoned my project until I found your tip (:active pseudo-class selector in CSS). I was getting painfully slow touchStart feedback. Now I’m back in action.
    Thanks again!
    Cheers.


  7. July 14, 2011 at 3:18 pm

    I know I’m a little late to the game here, but for click event replacement, I’ve been using the HTML5 Mobile Boilerplate Fast Button Click. It’s basically the Google Fast Button click mentioned above, but accounts for scrolling and other things. I’ve put it in place on a mobile website, and it’s much more responsive. Super easy to implement, thought it might help someone.

    Here is a test I did for work with several different touch events paired with touch styled media queries for moblie. Each subsequent screen (after clicking the next button) uses a different event, from click to touchstart to touchend to the fast button click.


  8. September 12, 2011 at 11:59 am

    Daniel,

    Great article!

    Do you know if apps built with phonegap can receive push notifications when they are in the background? The sample code from their wiki suggests that the app has to be running (foreground?) for it to receive push notifications.

    A second part this question is: if the app could receive remote notifications, can it send events to the elements on the page – e.g. refresh table entries?

    Thanks in advance!


  9. Ari Lacenski's GravatarAri Lacenski
    October 19, 2011 at 9:32 pm

    I’ve just started with Phonegap development, and I was advised to use jQuery Mobile, which of course relies on jQuery core. The reason given was that jQMobile does a good job of emulating native UI components. I haven’t made the switch to xui because I’m developing by myself and don’t have the resources to roll my own UI elements. Can you comment on the tradeoff and what one could do to make xui or zepto look more native? Many thanks.


  10. Don's GravatarDon
    October 27, 2011 at 2:36 pm

    How can u call an alert feature when an app is in the background


  11. laminina's Gravatarlaminina
    November 2, 2011 at 1:02 pm

    Hi Daniel,

    Any best practices for the UI specifically for setting font size, image size…I’m using em’s values and the same HTML/CSS files doesn’t behave the same in iOS size and Android screen sizes? Any reason or am I missing something?

    Why 1em doesn’t look the same in different screen sizes …not even close! :p
    Thanks in advance for the help. :)


  12. December 12, 2011 at 6:11 pm

    Thanks for this overview.

    One thing that you may want to modify in our article is that you shouldn’t delete variables names.

    function init() {
    //application code here
    delete init;
    }

    … will result in a JSHint error because the delete keyword should be used on objects, not variables.


  13. Anurag's GravatarAnurag
    January 18, 2012 at 6:53 am

    this is really nice matter given here specially for the beginners


  14. Matt's GravatarMatt
    January 28, 2012 at 2:47 pm

    Actually the delete keyword in javascript is not for deleting objects, it is for deleting properties of objects. The reason this may seem to work is because you may be removing the property from the global object (window). But not all objects are deletable and you cannot delete a property that an object inherits from a prototype. The best you can do is remove as many references to an object as possible. Keep in mind that any closures referencing the object will keep it alive.

    More info:
    https://developer.mozilla.org/en/JavaScript/Reference/Operators/delete


Pings

  1. [...] Developing Better PhoneGap apps If you’ve started researching what it would take to get from mobile web to native app, you’ve likely come across PhoneGap—a framework allowing you to wrap a mobile web app and deploy it as if it were written natively. We’ve done quite a bit of work in PhoneGap lately and the question inevitably comes up: are apps built in PhoneGap “slow”? A quick Google search returns a page full of reasons that would keep you from wanting to pursue using web technology in your next app. Before you write it off, however, we’ve come up with a few tips that have drastically improved our own PhoneGap apps. (tags: performance tips ios javascript mobile phonegap) [...]

  2. [...] DiscoverThe Best Free Apple iPad ResourcesNice links here for you iPaddies.(tags: ipad resources)Developing Better PhoneGap appsIf you’ve started researching what it would take to get from mobile web to native app, you’ve [...]

  3. [...] within an App wrapper such as PhoneGap, you ought to take a look at Float Mobile Learning’s Developing Better PhoneGap Apps. Coincidentally, there’s also an interesting story today on how all HTML5 apps [...]

  4. [...] Developing Better PhoneGap Apps :http://floatlearning.com/2011/03/developing-better… [...]

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

About This Blog

Float guides industry-leading companies to understand and leverage the power of mobile learning. We help companies meet their business strategies by making useful information accessible, anytime, anywhere. We are mobile learning strategy specialists.

We use our blog to share our thought leadership and provide guidance on your journey into mobile learning.

Float Mobile Learning Symposium

Register now for the Float Mobile Learning Symposium

Subscribe to our Feed

RSS
Enter your email address to subscribe to our blog via email, or click the icon on the left to subscribe in your RSS reader:

Float Newsletter

Float’s newsletter offers industry news, tips and views on the mobile learning world. Sent once a month, we promise only to send you the very best information and never sell or use your contact information to spam you.
Email:
Read our newsletter archives here.

Research Papers

In addition to our free blog and newsletter, Float has premium-quality research content available for purchase. View a list of all Float Mobile Learning research papers.

Upcoming Events

Float regularly speaks at industry events, conferences, and through webinars. We'd be very pleased for you to attend one of our sessions. Find out where you can find us next:

Free Webinar: Mobile Learning Conversations
June 13, 2012

mLearnCon 2012 Workshop: Prototyping for Mobile Learning
June 18, 2012

mLearnCon 2012: Moving Beyond ePub - Transitioning Your Content into Interactive Apps
June 19, 2012

mLearnCon 2012: Winning Over Stakeholders - How to Sell mLearning to Your Enterprise
June 20, 2012

Float Mobile Learning Symposium 2012
June 25, 2012
1871

See the full list of events.

Social Links

Float Mobile Learning Twitter Facebook Float Mobile Learning on YouTube Float Mobile Learning on Google+

Latest Tweets

Calendar of Posts

March 2011
MTWTFSS
« Feb Apr »
 123456
78910111213
14151617181920
21222324252627
28293031