A long while back, I came up with a script library I called Sprinkle. I created a domain name for it, I mentioned it to Ajaxian.com, and they featured an article on it.
Somehow, Sprinkle disappeared and was forgotten (an oversight on my part) and sprinklejs.com no longer points anywhere.
But what Sprinkle did was quite simple. It allowed you to put src="..." on any DOM element, within reason, particularly <div>'s for HTML injection and <input>'s for default values populated from URL GETs. Then I sought to make it XHTML-compliant by using the DTD extensions spec whereby I was allowed to add my own attributes (like 'src=..') to existing declared elements (like <div>). Problem was, the browsers generated junk characters at the top of the page when I did that, so I had to use script to strip off the junk characters. The whole thing became a mess, for one simple lightweight proof of concept, and I hadn't even begun to tinker with advanced HTML and 2-way binding.
At one point a co-worker and I created a client-side MVC framework where we ended up creating DOM object assignments to "client controls" that would effectively be able to manipulate their associated DOM objects as though they were properties (which indeed they were). Nothing special in itself but it was another example of where we were marrying HTML and script. Ultimately my co-worker did most of the implementation work on that. I helped do a lot of architectural design of it, but he pointed out a lot of issues we had to work through such as dealing with composite ASP.NET server controls that defined our own client control--ClientID issues, for example, in a tree of control containers, one control nested after another.
And in my previous post I brought the whole matter up again and pondered even simple one-way data binding from scratch all over again. In the end I figured (and noted) phooey, just use client-side templates, jQuery, and JSON web services. You still, however, and up with a lot of manual work in some ways.
Anyway, the Web Forms dependency in ASP.NET AJAX made ASP.NET AJAX a complete turn-off to me all this time. I think my previous post pretty well documents why Web Forms is worth hating, most notably the evil <head runat="server"> and <form runat="server"> tags and how they completely mess everything up in a client-oriented web app.
While I reserve room for skepticism, ASP.NET 4.0 makes some promises in favor of lightweight view templates to such an extent that I'm raising my eyebrows and thinking it's worth blogging about. I'm not sure where I was back in July or so when it was announced but the new 4.0 platform promises a whole new approach to building web apps for the client. With the new ASP.NET 4.0 client templates , XHTML is cleanly extended using XML namespaces, and databinding and HTML templating is performed using DOM API abstractions (and jQuery) rather than server-side templating logic. What this will mean in the practical sense is yet to be proven but right now I'm thinking, holy cow. The panacea I just spoke of in my previous post has finally arrived, I think.
But let's not get ahead of ourselves. Fortunately, the proposed new ways of doing things the ASP.NET AJAX way are preview downloadable and the downloads already fetchable. We should play with this thing and provide feedback.
More info, and proof that I was a little late to the party, is at: http://weblogs.asp.net/bleroy/archive/2008/07/30/using-client-templates-part-1.aspx
.. and officially here: http://quickstarts.asp.net/previews/ajax/templates/usingajaxtemplate.aspx