Testing and Deploying

From NSB App Studio
Revision as of 18:04, 26 July 2014 by James (talk | contribs) (More formatting.)
Jump to navigation Jump to search

The easiest way to test your app is in your desktop browser. Use “Start in Desktop Browser” under the Run menu. It will run in your default browser, which should support WebKit. At this time, Chrome and Safari support WebKit.

You can debug your program using the desktop browser. For more information, see Using the Chrome Debugger.

Once your program runs well in the desktop browser, you can deploy it to a server. Devices can then load your program from that server.

Start Up Time

There are two parts to the startup: the Translation (which happens on the desktop) and the actual startup on the device.

The Translation time will increase as the size of the app increases. Each time you run, any modules which have changed need to be retranslated. If you run twice in a row without changing your app, no translation needs to be done.

You can make Translation faster by splitting your project into more modules. That way, not as much needs to be translated each time. It's also a good way to organize your code to make it more maintainable.

Deploying

App Studio provides a server for testing apps, called the nsbapp.com. When you choose Deploy from the menu, your program and any files listed on the manifest are copied to the server. When the upload is complete, the IDE will give you the URL to open the app from.

The first time the app is run on the device, the files on the manifest are copied to the device. Your app can then be run locally, without an internet connection.

If you change your program and upload it again, there is a pause while the files are moved into place on nsbapp.com.

The next time you run the program (or refresh), the device runs its current version from memory while it gets the latest manifest from the server. It compares them: if the manifest has changed, it then downloads the whole application again and saves it to the device. Once this is complete, the new version of the app will run next time you do a refresh.

Use nsbapp.com for testing, not as a permanent home for your app. Old projects are automatically removed after a while, so they may become unavailable.

For more information, see Distributing your App.

Next: About Screen