Same but Different new GLatLng(49.265788, -123.069877) <g:point lat="49.265788" lng="-123.069877" /> new GLatLng( -123.069877 , 49.265788 ) <g:point lng=" -123.069877 " lat=" 49.265788 " />
Practical Differences
Both could have auto-complete support
Designability and IDE support
HTML writer support on servers
Order matters … to a less degree in XML
Declarative can be less code
People don’t like JavaScript
Remember, HTML is a success for a reason
The Bugaboo
Imperative can be nearly as good as declaration
“ JavaScript objects need more than just setting properties”
var input = new Input();
input.hint = “Please enter a number”;
<input>
<hint>Please enter a number</hint>
</input>
var input = new Input();
input. setHint (“Please enter a number”);
Input.prototype.setHint = function() {
// setup any event hooks etc…
}
Benefits?
Designable
easy IDE tooling
Declarative patterns
succinct, reproducible solutions
Rich semantics
frameworks can easily read and interpret
server or client side interpretation
Write Once, Deploy Anywhere
http://flickr.com/photos/elmyra/9335163/ WUT IZ ISNIDE?
0 comments
Post a comment