Friday, April 06, 2012 11:29 AM
Instead of that we can achieve the same functionality through the single file also(I guess).
After looking into the code i got to know that:
program.js: Where the main logic of the code is been written.
base-sdk.js:Where all the display messages like Error and status are being written.
Friday, April 06, 2012 5:13 PM
These are simply structural artifacts of the SDK samples themselves. base-sdk.js is a file that's common to all the samples and aren't particular to the features being demonstrated, whereas program.js contains the code that's specific to the sample. For your own projects you can structure files however you'd like.
You'll find that the basic (Blank) app template in visual studio just creates a single default.js for app code. But I've seen many projects structured in many different ways according to the app's architecture and the developer's own preference. There's nothing sacred about the structure of the samples.
Saturday, April 07, 2012 5:23 PM
Can we just merge the two files base-sdk.js and program.js????
I tried merging these two files but i got some compilation errors. so i was little worried whether it is possible or not.
If possible can you provide me few samples....thanks in advance.
Monday, April 09, 2012 8:08 AMModerator
>Can we just merge the two files base-sdk.js and program.js????
They are pure js files so you're able to do that. However it does not quite make sense to me. Isn't it better to keep existing structure as the purposes to use them are different? May I know what you're worrying about so you need to merge them?
Allen Chen [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.