NotesThe creation of web forms has always been a complex task. While marking up the form itself is easy, checking whether each field has a valid and coherent value is more difficult, and informing the user about the problem may become a headache. HTML5 introduced new mechanisms for forms: it added new semantic types for the <input> element and constraint validation to ease the work of checking the form content on the client side. Basic, usual constraints can be checked, without the need for JavaScript, by setting new attributes; more complex constraints can be tested using the Constraint Validation API.FeedUnfurl
NotesSimple. Weld binds data to markup, and can generate markup based on your data. There's NO special syntax or data reshaping required. It works in the browser and in node.js! Weld is currently 3.66Kb uglified with no dependencies other than a valid DOM. Weld will apply values to elements the way that elements expect to have their values set.Unfurl
Notes"PHP 5's SimpleXML module is one of the the biggest reasons to upgrade to 5. If you're parsing RSS feeds or the results of webservice requests it works beautifully and saves a ton of time. The only problem with it is that it'll only load valid XML. I banged my head against it for way to long before coming up with the following:"Unfurl
Notes"What I’m wondering is why more server-side frameworks don’t have similar selector-based DOM manipulation tools built in. Wouldn’t it be cool if you could attach such filters to views on the server side and manipulate the output page before it’s presented? Why isn’t this more common?"FeedEmbedUnfurl
Notes"Chain.js is a jQuery plugin, providing data-binding capability that allows you to generate web contents automatically by binding your data to html."Unfurl
Notes"Steven Levithan, of RegexPal, ran into some performance issues with innerHTML due to the fact that "every keydown event potentially triggers the destruction and creation of thousands of elements" so he started to look into it."Unfurl
Notes"As soon as I think I have it all worked out I bump into another oddity between Firefox and IE and handling the DOM. Specifically adding a radio button (or set of them) dynamically."Unfurl
Notes"For those of us just building a bog standard JavaScript application without one of these fancy libraries, it’s worth taking a look at how event delegation works in the real world."Unfurl
Notes"I’m talking specifically about situations where you are going to have a technological barrier to entry in any case. I’m just suggesting that Flash is a lower barrier than Ajax."Unfurl
Notes"Separation of presentation and content has been possible for years but there is one wrinkle standing in the way of completely separating the behavior."Unfurl
Notes"Storing web application data within a local cache opens up new possibilities for a future class of web applications by storing and loading user data directly on a user's hard drive."FeedEmbedUnfurl
Notes"You can apply the same DOM-event style logic to anything that happens within your application itself. You can plan your application that way from the outset"Unfurl
Notes"when dealing with XML documents Gecko needs you to use document.createElementNS in place of document.createElement when manipulating the DOM."Unfurl
Notes"Say you want to style form fields. You probably want to apply different styles to your text inputs, your submit buttons, your checkboxes, etc. But they all share the same tag name, input, so you can't just use an element selector in your CSS."Unfurl
Notes"The solution that the command pattern proposes is to encapsulate the changes to the DOM into objects, command objects, each capable of doing (and undoing) a particular action."Unfurl
Notes"Every time it finds an image with the class reflect, it generates a new canvas element. It will do some canvas magic (scaling, cropping, gradients) and produce a reflection image. "Unfurl
Notes"These bookmarklets let you see how a web page is coded without digging through the source, debug problems in web pages quickly, and experiment with CSS or JS without editing the actual page."Unfurl