Testing and Deploying: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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.  
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]].  
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.  
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''''
Keep in mind that Appstudio is acting as the web server when you run to the desktop browser for testing, so your first tab will not have the latest files when you rebuild and re-launch.
 
In Chrome it opens a new window with the latest file builds - however you can still just go back to the first tab and manually hit the refresh button or F5 on your browser and it will cause the browser to call the server (Appstudio) and refresh the files so you can continue to use the same debug window.
 
This is not a bug or deprecated feature - just a way for Appstudio to make sure you are testing the latest build for your app since there is no good or universal way for the server to tell the browser to refresh (the web is asynchronous by design).
 
 
== Start Up Time ==


There are two parts to the startup: the Translation (which happens on the desktop) and the actual startup on the device.
There are two parts to the startup: the Translation (which happens on the desktop) and the actual startup on the device.
Line 13: Line 20:
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.
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'''
== 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.  
AppStudio provides a server for testing apps, called the AppStudio Server. 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.  
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.  
If you change your program and upload it again, there is a pause while the files are moved into place on the AppStudio Server.


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.
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.
Line 25: Line 32:
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.
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|Tech Note 05, “Distributing your App”]].
For more information, see [[Distributing your App]].


Next: [[About Screen|About Screen]]
Next: [[About Screen]]

Latest revision as of 18:41, 22 January 2016

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.

Keep in mind that Appstudio is acting as the web server when you run to the desktop browser for testing, so your first tab will not have the latest files when you rebuild and re-launch.

In Chrome it opens a new window with the latest file builds - however you can still just go back to the first tab and manually hit the refresh button or F5 on your browser and it will cause the browser to call the server (Appstudio) and refresh the files so you can continue to use the same debug window.

This is not a bug or deprecated feature - just a way for Appstudio to make sure you are testing the latest build for your app since there is no good or universal way for the server to tell the browser to refresh (the web is asynchronous by design).


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

AppStudio provides a server for testing apps, called the AppStudio Server. 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 the AppStudio Server.

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