Tip: Split your code

Monday, September 24, 2007 at 1:17 PM

As you work on a gadget, try to split the JavaScript code into logical pieces, moving those pieces into separate .js files. Keep in mind that each view's XML file can include multiple .js files, and multiple views can use the same .js file. Splitting your code makes it more manageable and easier to reuse in your next gadget.

Have a tip you'd like to share? Send it to gd-developer AT google DOT com.