Tales from the Evil Empire

Bertrand Le Roy's blog

News


Bertrand Le Roy

BoudinFatal's Gamercard

Tales from the Evil Empire - Blogged

Blogs I read

My other stuff

Archives

September 2006 - Posts

Deep thoughts on scientific research

Heard on France Inter the other day about scientific research funding (didn't catch the names of the authors of these quotes though):

"Ignorance will always be more expensive than research."

"Electricity wasn't discovered by trying to improve the candle."

A nice and compact way to coerce to Boolean in JavaScript

JavaScript is always the strange beast as far as comparisons are concerned. There are cases where the automatic contextual casting is not quite convenient. For example, we like to reliably return booleans from some of our methods, not null, not undefined and not some random object. Being able to say that this function will return a boolean is a Good Thing that the users of the API will appreciate when debugging.

Anyway, I used to do this to coerce something to Boolean:

something ? true : false
Dave Reed just showed me a much more compact way of doing that:
!!something

Probably not the most readable thing in the world but I could get used to that, the same way I got used to

return something || null;
when I want to coerce undefined into null as a return value.

(by the way, this is the first post I write with Windows Live Writer and its excellent code plug-in based on Wilco's code coloring stuff. Works great for me...)

ComponentArt releases Web.UI for ASP.NET AJAX

Atlas has its first commercial control library. Component Art just went live with the new version of their excellent control library. All their controls now have a full client-side API built on top of the Microsoft AJAX Library. They all support UpdatePanel and persist their changes across synchronous and asynchronous postbacks. The library already has full online documentation and live samples. They are certainly setting the bar very high for other component developers. To think that they were able to do that even though we're not even in beta is just amazing and just show the level of excitement around the technology.

It is an amazing library. Check it out:
http://atlas.componentart.com

Rick Strahl on ASP.NET AJAX

Rick has a very extensive post on his blog about the state of Atlas today. It's a fair and complete look at what the technology is today and what it will become in the next few months. The post is a great read that I personally enjoyed a lot because Rick is hard to please and well, he seems to be mostly pleased (which doesn't mean that we don't have a lot to do before we release, working on that).

http://west-wind.com/weblog/posts/7551.aspx

And the real name of Atlas will be...

Scott just announced the naming and roadmap for Atlas going forward:
http://weblogs.asp.net/scottgu/archive/2006/09/11/_2200_Atlas_2200_-1.0-Naming-and-Roadmap.aspx

Fixing the back button in Atlas

Nikhil has an excellent prototype that adds browser history management to UpdatePanel. The two things I like the most about this sample are the simplicity of the API and that it goes beyond just restoring the back button and bookmarkability.

The simplicity is brought by a very clean server-side, event-based model. All the complexity of client-side history management is hidden by the server-side API. Basically, you add state changes to the history from the server-side events that are triggered by the changes you want to keep track of, and you restore this very same state from another server-side navigation event. It can't get any simpler than that.

The way in which this goes beyond simply restoring the back button and bookmarkability is that *you* now decide which state changes should be considered navigation. So from a state of things where you had lost the back button, we end-up in a place where the back button makes a lot more sense than with ordinary postbacks. Furthermore, with postbacks, you never really had bookmarkability: saving a bookmark from a postback page did not save the POST state so what you bookmarked was not the stateful page, it was the page in its initial state.

Check it out:
http://www.nikhilk.net/Entry.aspx?id=139

More Posts