2 Replies Latest reply on Nov 11, 2013 12:43 AM by Patrick Simons

    What are the benefits of jquerymobile-patch?

      Hello all,

      I would like to discuss an issue regarding performance of Rhomobile applications with you. We've built our first Rhomobile application which is an onboard computer application. This is a really basic Rhomobile application with simple show and edit-functionality for data wich is synchronised.

      I've noticed that Rhomobile is using a jquerymobile-patch.js.

        "<script type="text/javascript" charset="utf-8" src="/public/js/jqmobile-patch.js"></script>" in layout.erb.

      This seems to create or change html tags on a page which contains style items that are coupled to the stylesheet for this patch. I was wondering what the pros and cons of this solution are.

      To my point of view this makes it harder to customize the appearance of the app because I always need to check which html-tags , including their style-properties, are wrapped around my element.
      But an even more important concern of mine is performance. The performance I experience on a Motorola MC45 is a bit slow. Loading of a page takes about 1 or 2 seconds, although it is a really basic page.

      I've created a new application to test without use of this patch, but using a clean JQuery instead. In this application it feels a lot easier to style my content and I can create a much more customized view while still using the functionality of Rhomobile. Besides that a page seems to load a lot faster.

      So now my question is: what are the benefits of using this jquery-patch that I am missing right now? Thanks in advance for your opinions.

        • Re: What are the benefits of jquerymobile-patch?
          Jon Tara

          It adds some features that are specific to jQuery Mobile, and, in my opinion, they are features that no good Rhodes app should be using. I always leave it out.


          Most of it is to support Wait pages.


          You should be aware that this monkey-patches jQuery Mobile, and is designed only to patch a specific version. If you use another version of jQuery Mobile, you need to review and see if changes are needed.


          Rhodes 3.x has only ever officially supported jQuery Mobile 1.0, and the patch supplied will only work correctly with JQM 1.0. However, many Rhodes have updated their JQM to newer versions, and probably have not removed the patch.


          Rhodes 4.0 currently supports jQuery Mobile 1.3.1, and it appears the patch has been re-written for JQM 1.3.1.


          Perhaps somebody from Motorola can comment on the other purpose(s) of the patch, other than support Wait pages.


          That said, I have reviewed this code myself, and I didn't see anything that I thought would be a performance bottleneck.

          • Re: What are the benefits of jquerymobile-patch?
            Patrick Simons



            Let me give this topic a little kick.


            Can it be that this patch is needed to give the app the look and feel of the platform you build it to? So lets say, you build for Android it gives it the typical look and feel from android with android calender-selectors e.d.