Browse by Tags
All Tags »
HTML (
RSS)
I’ve already posted twice about that little class browser application. The first iteration was mostly declarative and can be found here: http://weblogs.asp.net/bleroy/archive/2009/09/14/building-a-class-browser-with-microsoft-ajax-4-0-preview-5.aspx The second one was entirely imperative and can be found here: http://weblogs.asp.net/bleroy/archive/2009/10/15/entirely-unobtrusive-and-imperative-templates-with-microsoft-ajax-4-preview-6.aspx This new version builds on top of the code for the imperative version and adds the jQuery dependency in an attempt to make the code leaner and simpler. I invite you to refer to the imperative code (included in the archive for this post ) and compare it with the jQuery version, which shows a couple of ways...
Last week, I wrote a post about how the new Microsoft Ajax Library Preview 6 made it a lot easier to write unobtrusive and imperative data-driven applications . Because for the previous preview, I had written a cool little class browser using a declarative style, I thought it would be nice to rewrite this in a completely imperative way. The mistake I made though was to call it unobtrusive. Never mind that ‘unobtrusive’ is a perfectly well-defined word that actually existed way before JavaScript. ‘Unobtrusive JavaScript’ has a very specific meaning that people feel strongly about. To be worthy of that label, an application must basically conform to (at least) those two requirements: Markup and behavior are strictly separated. That means no DOM...
Today is the release of the sixth preview of Microsoft Ajax Library. Don’t get fooled by the somewhat silly and long name: this is a major release in many ways. The scripts have been majorly refactored since preview 5. Check out the other posts out there (links at the bottom of this post) to see just some of the many new features that are in there. Some of my favorite are all the small improvements that have been made to make imperative instantiation of components and templated contents easier than ever. Many of you have told us that you preferred to do things imperatively and this release makes it a lot better. When Preview 5 came out, I built a simple class browser using the declarative syntax. The class browser shows the hierarchy of namespaces...
About a year ago, I asked the question on this blog whether HTML could and should be used as a data format: http://weblogs.asp.net/bleroy/archive/2008/11/26/should-html-be-considered-as-a-data-format.aspx After all, it actually already has semantic constructs appropriate for tabular data, for collections, for hierarchical data and for object graphs of any kind. Well, apparently I wasn’t the only one to think that (not that I expected I was): http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html Read More...
The Microsoft Ajax Library 4.0 Preview 5 is the first release of Microsoft Ajax that I didn’t participate in: I left the team a few months ago. But that doesn’t mean I don’t love what’s in there, and I really do. And by the way I’ve also seen what’s in Preview 6 too and man that will seriously rock. So I thought I’d write a little something to celebrate the new preview. The new features include recursive templates, which is pretty much begging us to implement a treeview with it, and we’ll do just that in this post. There is also an intriguing capability, which enables you to dynamically set what template to render for each data item, and where to render it. At first, this doesn’t look like the most useful thing in the world, but it actually...
Don’t read too much into this, but I’d love to read your feedback on this. I’m compiling a list of stuff that smells in WebForms when used as a view engine in MVC. Along the lines of: Noisy page directives that are useless for MVC runat=server Page lifecycle For once, you can let the inside troll take over :) Read More...
Kinik just published a pretty amazing #twitcode version of a Mandelbrot set visualization in JavaScript. Here’s the code: for (k=84;k-=1/32;document.write(k%3?i%8: '<br/>' )) for (x=y=0,i=99;--i/y;x=t)t=x*x-y*y+1-k%3,y=1-k/42+y*x*2 And here’s what it renders: http://twitter.com/KiniK/statuses/2575582146 Read More...
In yesterday’s post , I published the code for a simple include method for ASP.NET that I’ve been using in a couple of places, only to realize that it was fine for what I was doing but probably not very useful beyond that. So I spent some time today broadening its scope. It now supports nested includes (I modified the original post to reflect that change) and also setting properties on the control. You can still do plain includes: <% this .Include( "contents.ascx" ); %> But now you can also set properties on the included user control using an anonymous object: <% this .Include( "contents.ascx" , new {number=2, what= "A" }); %> The code for the helper considerably grew along the way but it’s still reasonable...
In yesterday’s post , I alluded to a simple include extension method that I like to use when I don’t care about designer support. In a comment, Andrew asked if I could share the code for it, so here it is. I never liked the regular way of including user controls in WebForms and how they require a registration and a declaration, both of which are more verbose than they need to be. A plain #include would work but is a little outdated (and if I’m not mistaken it’s not even available by default in IIS7). My Include method is quite similar to MVC’s RenderPartial except that it doesn’t deal with view data. It’s a plain and simple include. Just give it the relative path to a user control: <% this .Include( "Header.ascx" ); %> Here’s...
Master Pages are a wonderful concept that as developers we highly value. It’s the sort of pattern that just looks like the right thing to do (to our twisted, concept hungry developer minds) and that even makes you wonder why we haven’t done it that way since the beginning of time ( 1990 ). For the record, master pages were invented by David Ebbo , who is behind a lot of the smartest things in ASP.NET. Just in case you have no idea, what are Master Pages? Before master pages, sharing layout between pages was done using includes (or user controls). For example, your typical hello world page might have looked like this: <% @ Page Language ="C#" %> <% @ Register TagPrefix ="include" TagName ="header" Src ="...
More Posts
Next page »