Search This Blog

Monday, January 7, 2013

Day3 - Web Mobile and HTML5

very nice tool  ---- weinre is WEINspector REmote 
weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.

ratchet UI framework  - Prototype iPhone apps with simple HTML, CSS and JS components.
you can combine it with Junior  A front-end framework for building HTML5 mobile apps with a native look and feel.

Today we focus on java-script .. here is a starter slides - advanced java script .

if you not use var on variable , it will be global.
file is not a domain for variables.
var in a function , "live" in the function.
create variable in a function without a var , will be global.

best practice:
all variable should be start with var.
all my code should be insert into function.
function(){
     var foo=5;
}
when you add "use strict" , the supported browser will failed to run the JS function when there is errors in the function.

each var is like hashmap.
console.dir - display all the items in the var.

must tool when working with teams or a big project:JSHint is a community-driven tool to detect errors and potential problems in JavaScript code and to enforce your team's coding conventions.

JS Bin is a JavaScript, HTML and CSS playground. If you want to experiment, learn or help your friends with a problem, then JS Bin is for you.






No comments: