0 Replies Latest reply on Sep 17, 2013 8:56 AM by David Males

    Writing a SPA for SB1

    David Males

      Hi,

      I just want to see if anyone else has written (or in the process of writing) a SPA for the SB1. I am nearing the completion of a Durandal JS SPA for my SB1 and have noticed a few things and wondered if other people have seen the same. I'm afraid I can give too many specifics ie post the whole example due to company privacy etc.

       

      I have created an MVC app using Knockout for comparison with the SPA

       

      My observations are:

      1) When the initial request is made to download the index page and Durandal app I see the Busy alert message and have to click on Wait before the first view is displayed. Note this still happens even though I have optimised the app using Weyland,and I don't think it happens every time!

       

      2) I have activated the scanner using scanner.enable() in the activate method for my view models. I have created my viewmodels using the singleton pattern so the function looks like:

      ...

      return {

              activate: function () {

                  //alert("enable");

                  scanner.enable();

                  scanner.decodeEvent = 'decodeEvent(%json)';

              }

      ...

       

      3) Does the browser cache web pages when the running app is from an external website?

       

      Other observations:

      I can certainly tell the difference when displaying a new view in the SPA compared to getting a view from a normal MVC app.

       

      Cheers

      David