As I can reference a second html page in duocode. Where I can find examples applied in real like applications, such as connecting to SQL data, navigation between pages.
Another question, namespace.js file created is common to all possible html pages? in the application.
All your questions are more JS architecture and design and are not related to DuoCode directly.
Connecting to SQL must be done on the server side using ASP.NET (also look at NancyFx) or similar, from JS you can use Ajax HTTP/REST post to get data from server, we also recommend to look on AngularJS.
Navigation between pages is done using window.open() method in JS, see:
I couldn't understand your namespace.js file question, can you rephrase it?