Getting excited about AJAX again (but will I use jQuery or Microsoft Ajax 4.0 – or both?)
Dave Reed has a great example of how to do few different things in Preview 5 of Microsoft Ajax 4.0.
A fee highlights:
- Declarative binding of data to templates
- onitemrendering event (is this the same as onitembind? it looks like it…)
- Dynamically choosing the template for a given data item and its placeholder at render-time.
- Declarative bind of a template to a JSONP call (sweet and powerful)
- Hints of better “imperative,” or pure code interactions with templates (as opposed to declarative bindings).
- This is something I look forward to – I want to be able to have my javascript code easily placed in proper namespaces and in a proper anonymous function without having to boilerplate it all the time. I think a VS 2010 JavaScript snippet could do this (I copy and paste it everytime I start a new js file at this point).
Read the post here - http://weblogs.asp.net/infinitiesloop/archive/2009/09/10/microsoft-ajax-4-preview-5-the-dataview-control.aspx
PS: This got me think about JSONP and how it normally wraps a JSON object in a single function call. It would be neat to have multiple calls wrapped in a single JSONP request that simple called more than one function (or the same function multiple times) when it returned. That would allow a developer to choose (depending on the scenario or even the amount of data involved) whether to call the server 10 times versus say 100 times.
Thoughts?
More later - joel