Hello John,
1. Are all views automatically created when the app starts running ?
Not exactly. The HTML part of the views are loaded when needed, so, if you did not load an view, their HTML part is not loaded at all. Some stuff of the views are available from the scratch, for example, some variables, but, certainly other stuff cannot be available into the view is shown.
2. Can views be dynamically created (e.g. when I click a button a view is dynamically created) or do you just show the view (e.g. using ReplaceView "NewView2") ?
You can't create views dinamically. You must create it at designtime and then use actions like ShowView, ReplaceView and ShowDialog in order to show the appropriate view.
... and that these would allow me to use AB Actions too.
Only if you set an app's variable can use later AB actions to deal with that variable. Only if you place the variable in the app's root scope like in:
But the point is what you need, John. Commonly we no need to use thirdparty Javascript, or, just a few Javascript code in certain situations. If you plain to use thirdparty Javascript, then you must know about how to use that Javascript, and, in fact the AB context is more or less important, since finally we are talking about HTML apps, then, you must use the Javascript in a similar way that if you use it in any other HTML app.
I am just wonderiang where I would place these variable creation statements?
1. Would I place them in the "Ready" event on of the View (Master or normal view) ?
2. Would I place them in a Button that shows the view ? e.g.
That's is what I am saying. You must create your Javascript... when and where you need it... If you need it from the scratch, then you can use the app's Ready event. If you need it when an app's view HTML is ready, you must use the view's Show event. If you only need in certain location, may you can create it in an control's Click event, for example, etc.
3. Is there any way to refer to the current view without specifying its whole path (e.g. with something like this.View1) ?
Maybe in some places, yes, but, since some other places can require the whole path, probably is good to always refer to the whole part. IMHO.