8 Replies Latest reply on Mar 13, 2014 8:07 PM by Mark Nongkhlaw

    Simulate App for Windows Mobile. JQuery Mobile is not used

    a1932541-5ca3-4449-9684-6710c1e68a50

      Hello,

       

      I want to run my App on RhoSimulator (Platform Windows Mobile 6.5.3) in RhoStudio 4.

      It always looked good with the RhoStudio Version 2.2, but now it seems like JQuery Mobile is not loaded.

      rho1.PNG

      I followed the instruction on Rhomobile | Build for Windows Mobile.

      In build.yml I included --> app_type: "rhoelements".

      Is there something missing or am I doing something wrong?

      When I run RhoSimulator for Iphone everything is looking good.

       

      Kind regards

      Philipp

        • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
          Derek Warren

          By default Jquerymobile libraries were removed from Windows Mobile because of performance issues on some older devices when using JQM. If you want to use the JQM library again just modify the layout.erb file in your project.

          1 of 1 people found this helpful
          • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
            Daniel Silva

            Jquery was intentionally removed from Windows builds in an attempt to help performance.  You can add it back in, but I make sure you keep an eye on performance issues that can come up on some of the older lower powered devices. See some of the other posts here if you do see performance problems.  In my experience, disabling page transitions will help a lot. That is also done in layout.erb

             

            In layout.erb, you just need to change one character to bring in jquery for windows builds.

            Default..

            <% if Rho::System.getProperty('platform') == 'APPLE' || Rho::System.getProperty('platform') == 'ANDROID' ||

            ( Rho::System.getProperty('platform') != 'WINDOWS' && Rho::System.getProperty('webviewFramework') =~ /^WEBKIT/) %>

             

            Change to..

              <% if Rho::System.getProperty('platform') == 'APPLE' || Rho::System.getProperty('platform') == 'ANDROID' ||

            ( Rho::System.getProperty('platform') == 'WINDOWS' && Rho::System.getProperty('webviewFramework') =~ /^WEBKIT/) %>

            • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
              Peter Arcuri

              As one may know Windows Mobile devices may have limited processing power which can lead to dissatisfied performance when using styling libraries. This is convered in the documentation specifically at:

              Memory Considerations

              Rhomobile | Supported Platforms

               

              If you insist on loading the styling libraries then can be done within the layout.erb file for your project.

              line 12: ( Rho::System.getProperty('platform') != 'WINDOWS' && Rho::

               

              change != to == from line above.

              1 of 1 people found this helpful
                • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
                  a1932541-5ca3-4449-9684-6710c1e68a50

                  Thanks for all your answers!

                  I have another RhoElements 2.2 App with Jquery Mobile running on a MC9190-G and performance is not the best, that'sright.

                  But I won't miss the look of the forms with Jquery Mobile.

                  In plain Windows the app is looking very "sad". Are there some better Stylesheets available or how can I change the look?

                   

                  Kind regards

                  Philipp

                    • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
                      Pietro Francesco Maggi

                      Philipp,

                      An alternative can be to use a different stilling library, like Twitter bootstrap, that can provide a sometimes lighter, JavaScript layer, maintaining a nice look&feel.

                       

                      ~Pietro

                      • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
                        Jon Tara

                        For the same reasons advising not to use jQuery Mobile on low-end devices, it would best to avoid RhoElements, and the Rhodes Javascript APIs. Certainly, if you need some specific RhoElements feature, then you have no choice. But if you are using the Rhodes Javascript APIs to avoid writing Ruby code, this is not optimal for low-end devices. You are just adding a needless layer.

                         

                        My experience is that performance of the Ruby code is seldom a big problem. Javascript is the most common performance bottleneck. If you want good performance, avoid Javascript as much as possible. That doesn't mean avoid all Javascript - use Javascript where Javascript is appropriate - for dealing with the UI at a low level. Don't use Javascript to do things that are better done in Ruby code in a controller or model.

                         

                        It's nice that most/all of the Rhodes API is exposed to Javascript. It's a convenience, if you don't want to learn Ruby. But it is an extravagance.

                          • Re: Simulate App for Windows Mobile. JQuery Mobile is not used
                            Mark Nongkhlaw

                            Just to add to what Jon and others are saying, I had a jQM control which filters an unordered list in the webview (just added attribute data-filter=true). For this to function in WM low end device, I needed a RhoElements license. But the result was sloooow performance. So I opted out of RhoElements altogether for WM. The result is much better performance without JS stuff. Yes, I did have to learn a bit of Ruby and I'm still no expert. But I got by and I'm sure many can.

                             

                            But what if I wanted to use filtering or Ajax-like cascading dropdowns. Would twitter bootstrap help and what would be the performance degradation? Anyone used alternative JS frameworks for such things on low end WM devices?