11 Replies Latest reply on Jan 4, 2015 11:20 PM by Mark Nongkhlaw

    RhoMobile 5.0.25 ORM Issue

    Chris Child

      Hello all,

       

      I just updated to the most recent release of Rho, 5.0.25, due to a fix that was implemented for Windows OS based applications. After confirming the fix I then tried to run my app to make sure that everything else was still working and I've run into an issue with the ORM. I'm not seeing any errors in the logs. I've set logging to 0 or trace in rhoconfig.txt. The only reason I know that it is the ORM that is causing the problem is because I've put alerts before the ORM call and after. Here is the code and the imports:

       

           <link rel="stylesheet" type="text/css" href="/public/css/layout.css">

          <script type="text/javascript" charset="utf-8" src="/public/api/rhoapi-modules.js"></script>

          <script type="text/javascript" charset="utf-8" src="/public/api/rhoapi-modules-ORM.js"></script>

          <script type="text/javascript" src="/public/jquery/jquery-1.9.1.min.js"></script>

          <script type="text/javascript" src="/public/js/mytest.js"></script>

          <script type="text/javascript" charset="utf-8" src="/public/js/components/user.js"></script>

          <script type="text/javascript">

            

              $(document).ready(function() {

                  alert("before");

                  Rho.ORM.addModel(function(model) {

                       model.modelName("User");

                       model.enable("sync");

                       model.property("username","string");

                       model.property("password","string");

                       model.property("localLogin","float");

                       model.property("activeUser","float");

                       model.set("partition", "credentials");

                  });

                  alert("after");          

           });

       

      I've looked through the ORM documentation and did not notice any changes that should affect my work. If it matters I've only tried my app via the simulator so far.

       

      Thanks

       

      Chris

        • Re: RhoMobile 5.0.25 ORM Issue
          Mark Nongkhlaw

          Hi Chris,

           

          When you say windows based applications, do you mean WM or WP or something else?

           

          What is the fix in 5.0.25 all about?

              • Re: RhoMobile 5.0.25 ORM Issue
                Mark Nongkhlaw

                I encountered problems with alert on WP in the past. I'm trying to understand whether he's referring to WP and whether this issue still persists in the latest SP. Of course, I called alert from Ruby code, not JS.

                 

                The release notes dont mention anything about fixes for WP, therefore I assume that this and other WP issues would still be present. Not sure, but WP seems to be still low on Zebra's priority list.

                 

                Do Zebra/Moto have any devices on WP or are most on WEHH ?

                  • Re: RhoMobile 5.0.25 ORM Issue
                    Jon Tara

                    Oh, I missed the alert in the code! NEVER use alert() for debugging! (Really, it is best never to use an alert() PERIOD.) It is not an IE-specific issue. Every browser blocks on alert().

                     

                    alert() can break code that otherwise works.

                     

                    alert() can "fix" code that otherwise does not work!

                     

                    alert() is PURE EVIL.

                     

                    Debug using console.log() or an actual debugger where possible. (Both iOS and Android now both have remote mobile JS debugging using your desktop browser for the debugger UI.)

                     

                    I came across a list of all of the supported Moto devices, complete with pictures! Now, can somebody help me find it again? (edit: see response below) Mark - no, none of them are WP as I recall. Various version of Windows Mobile, Windows Embedded HandHeld, Windows CE, and, of course, for newer devices - Android.

                     

                    There's this, but it doesn't have the pretty pictures nor does it list the OS for each device:

                     

                    Rhomobile | Supported Platforms

                     

                     

                    I think he is referring to Windows desktop in this post.

                      • Re: RhoMobile 5.0.25 ORM Issue
                        Chris Child

                        Sorry for the late reply. Unfortunately I found this issue right before I left on holidays and in fact I still am on them but since I've gotten some responses I want to try and still help by providing some more info.

                         

                        Yes, at the moment I am running on windows desktop and 5.0.25 had a fix for the desktop touch interface so we had to move to it. When I am back on Jan 5th I will test on Windows Mobile and see if I experience this there as well.

                         

                        I appreciate the advice about not using alert to debug and I'll use console.log in the future but this issue was not working correctly even before I added the alerts.

                      • Re: RhoMobile 5.0.25 ORM Issue
                        Jon Tara

                        Mark: duh, the list of MSI devices is in the 5.0.25 release notes!

                         

                        I'd suggest breaking this out as a separate documentation item. It is very handy.

                         

                        Motorola RhoMobile Suite

                          • Re: RhoMobile 5.0.25 ORM Issue
                            Mark Nongkhlaw

                            Yep, I missed that too. Looks like there's only two consumer platforms supported now, viz., iOS which is at the top of the list and WP8 at the bottom  which could also be the order of priority within Zebra at this point. Also looks like WP8 might go the Blackberry way, notwithstanding the number of tech talks pledging support for this platform in the past. Android support is there because more and more enterprise devices  are moving to this....Overall, I dont think I will be too wrong in saying that Rho is for enterprise and rugged devices, not consumer devices, but I still do not understand the 'up-to-date' support for iOS. Are there any enterprise products on iOS or (like Android) will they be coming soon?

                             

                            I'm just trying to get a sense of direction in which enterprises are moving vis-a-vis the direction which Zebra will take going forward.

                             

                            Maybe I missed something, some talk, blog post or recorded video ...?

                              • Re: RhoMobile 5.0.25 ORM Issue
                                Darryn Campbell

                                There are no plans to remove WP8, though I take the point that WP8 often plays catch up to the enterprise OS'.  Spinning off Enterprise Browser as a separate product (Enterprise Browser) actually frees up Rho to concentrate more on consumer devices since the product no longer has to cater for Enterprises who just want to write hybrid applications.  There are no plans for an iOS product from Zebra Enterprise (as you probably know, Apple won't let any other manufacturer run their OS on non-Apple hardware).

                                 

                                Over the years Rho has also dropped support for Symbian and WP7 but WP8 has a strong foothold, particularly in Europe.

                                 

                                Regarding the order in the release notes, I wrote them and I just did the consumer devices alphabetically.

                                • Re: RhoMobile 5.0.25 ORM Issue
                                  Jon Tara

                                  Mark, I think there is plenty of Enterprise activity with iOS. What is a bit difficult with iOS still are "cross-Enterprise" apps, because - at least officially, Apple does not have an approved distribution channel for these. By "cross-Enterprise", I mean some "closed" (non-public App Store) app used by an Enterprise and outside partners.

                                   

                                  Apple has an Enterprise program, and a company can set-up it's own App Store. Apps in this private app store are not subject to App Store review. As well, (separate from the Enterprise development program) enterprises can lock-down their company-owned iPhones with tools available from Apple.

                                   

                                  Where I see iOS fitting-in to Zebra's infrastructure is in the ability to offer a mixed environment of task-targeted industrial devices and BYO, with BYO being quite common for management participation. A manager or executive probably does not want some bulky boat anchor tethered to their belt! To support this usage, they will have to go where-ever the bulk of consumer devices go, which right now is iOS and Android and not likely to change in the near future.

                                   

                                  From repo activity, I see there has been a lot of shoring-up of non-WP various mobile Windows platform support and also quite a bit of Android activity. I would think the overlap between this (along with Windows desktop) and WP8 is sufficient that it eases the support burden for WP8. It's a way different situation than Blackberry.