Archives
-
Why are scripts slow to load in Firefox when using Visual Studio’s built-in development Web server (a.k.a. Cassini)?
If you’ve been doing some script development in Visual Studio and Firebug, you may have experienced something like this:
-
Wally’s introduction to 3.5 SP1
Wally McClure, MVP extraordinaire and ASP Insider, just published a short book about the new features in ASP.NET 3.5 SP1. It is a short and to the point read that should get you started in no time. I wouldn’t have shown web service access as the main advantage of jQuery myself (the selector and animation support adds more value for ASP.NET Ajax developers) but that’s a minor thing, and there are plenty of other resources to learn about jQuery. Topics in Wally’s book include:
-
Microsoft Ajax Client Templates and declarative jQuery
Apparently Brian likes our declarative syntax. And jQuery. And he did something quite fun with them, something we had clearly not anticipated: using Microsoft Ajax’s new declarative syntax to call jQuery plug-ins instead of Microsoft Ajax behaviors as was the original intent.
-
Really Simple Testing for JavaScript
There are plenty of options to test JavaScript code. My goal here is not especially to add to this long list but I needed something for my samples that was brain dead simple to understand and that I could redistribute without any concerns about licensing (this is licensed under the very liberal MS-PL). I just think it’s good practice to distribute tests with sample code because it promotes TDD and helps to understand the intent of the code.
-
Instantiating components on template markup
All client-side template engines enable you to create HTML (feel free to go ‘duh’). What they don’t all allow is the creation of event handlers and components over the markup they generate. The general approach with those engines is to do a second pass of code over the markup to create handlers and components. This is quite unfortunate as this generally requires some knowledge of the markup (which plays against separation of concerns) or something like the introduction of marker CSS classes into the markup.
-
Should HTML be considered as a data format?
As HTML is becoming more and more semantic, at least in intent, and all styling is moving into CSS, one has to wonder what it is now representing. It seems like it is now a format for unstructured data (a.k.a. rich text), in the same sense that XML and JSON are formats for semi-structured and structured data and CSV is a format for tabular data.
-
Is English speaking necessary for developers?
There’s been quite a few blog posts and tweets lately around the following (slightly distorted) quote:
-
Simplifying the edit in place behavior
Last week, I wrote about building a simple behavior to edit text in place. Almost at the same time, Nikhil was building a similar component for Silverlight, but it was considerably simpler because instead of substituting a label for the textbox on blur, he was just changing the border so that the textbox resembles a label. This is a lot simpler, cleaner and more stable. The textbox always behaves according to what one would expect from a textbox because it never ceases to be a textbox. No focus to manage, nothing to hide and show, just styles to change.
-
Getting a reference to a behavior
In the last post, I showed how you can instantiate multiple behaviors on a single input element, through server extenders or directly through client behaviors (which themselves can be created imperatively or declaratively). In this post, I want to show how to get a reference to these behaviors.
-
Putting more than one behavior on one element
Microsoft Ajax has the interesting ability to combine more than one component onto a single element. In the previous talk, I alluded to this possibility and one of the commenters (Tiamat) asked me to show how this is done.
-
Building a neat edit in place behavior
For the purposes of my next post, I built a neat little edit in place behavior and I thought it deserved its own post. It does a pretty good job at showing how easy it is to build a clean behavior using ASP.NET Ajax. It’s always good to go back to the basics… In this post, I’ll show you how the behavior works, but more importantly how I built it.
-
Deep Zoom without Silverlight
In a move that I wouldn’t have bet a dollar on, Live Labs released a purely JavaScript Deep Zoom client. You read that right, what was so far one of the nice features only found in Silverlight is now available in an open web, standards-based version.
-
One thing you didn’t know about ASP.NET unless you’re David Ebbo
David has an excellent post about a pretty cool ASP.NET feature that you almost certainly don’t know about. I had no idea for sure. Check it out.
-
Preview documentation for ASP.NET Ajax 4.0 available
We published some documentation for ASP.NET Ajax 4.0 Preview 3:
http://quickstarts.asp.net/previews/ajax/templates/default.aspx -
The magic behind live bindings explained
Dave has a fantastic and very detailed post about our implementation of the Observer pattern in ASP.NET Ajax 4.0.
-
Generating HTML from Silverlight
Martin has an interesting post on the technique he uses in his Silverlight chess board to generate HTML from a Silverlight application.
-
Visual Studio patched for better jQuery IntelliSense
Jeff King just announced the release of a patch for Visual Studio 2008 that enables the IDE to find the –vsdoc.js file without requiring the developer to reference it.
-
Building a data driven application with ASP.NET Ajax 4.0 and ADO.NET Data Services
Jim Wang (one of the great QA people on the Ajax team) just started a blog, and his first post is a very detailed walk through building a data-driven application from scratch using ADO.NET Data Services and the new client templates in ASP.NET Ajax 4.0.
-
PDC 2008 ASP.NET AJAX Futures talk available online
The full 83 minutes of my PDC talk are available on the Channel 9 web site. You can watch the session online (using Silverlight) or download the video in a number of formats. Slides and source code for the demo are also available.
-
ASP.NET 4.0 Roadmap talk available online
Scott Hunter’s talk on the ASP.NET 4.0 roadmap (in which I’m doing a 10 minute demo) is available from Channel9:
-
jQuery IntelliSense documentation file available
IntelliSense documentation files for jQuery just got published on jquery.com. This enables great IntelliSense at design-time for jQuery in Visual Studio 2008. It goes without saying that this file should only be used at design-time and never at runtime. For the moment, in order to ensure that, you can include the file from an “if (false)” server code block. We’re also working on a much better solution.
-
We need Rock Band / Guitar Hero song compatibility
In this post, the Penny Arcade guys make the point that beyond instrument capability, what we really need is song compatibility between the two. Beyond the licensing nightmare that would probably represent for both games publishers, this resonated really well for me. Here’s why and why it makes perfectly good business sense below the apparent “yeah, right, you wish” appearances.
-
Going to California
I’m flying to San Jose tonight for tomorrow’s OpenAjax Alliance face to face meeting, which Microsoft is hosting. On Friday, we are also hosting a new event that aims at establishing a dialogue between JavaScript library developers and Microsoft. We’ll have talks from the IE, Visual Studio and ASP.NET teams, as well as talks from members of the community. This should be very interesting.
-
Using the power of binding to animate changes
In a recent post, I showed how the binding component can be instantiated independently of the {binding} markup extension. But there’s a whole lot more it can do.
-
Hack: using live bindings outside templates
A comment on this post is asking whether it is possible to create bindings outside of a template. The point of doing that is that you don’t necessarily want to render a template just to set-up a few bindings.
-
Celebrating Silverlight 2 while following the World Chess Championship
To celebrate the recent launch of Silverlight 2, let me point you to a cool app from Martin Bennedik that is basically a Chess game (re)player. It’s really cool to visualize a whole game like this:
-
Alt.NET podcast on jQuery
We had an interesting conversation with the good people from the Alt.NET podcast on jQuery and what it means for .NET developers. Check it out:
-
A possible cause of “‘Sys’ is undefined” explained
Clay Compton explains on the ASP.NET QA blog how bad web.config overrides can lead to the Microsoft Ajax Library not loading and the “‘Sys’ is undefined” error being thrown when the page loads. It’s a great read and hopefully will unblock some of you.
-
Client templates in MSDN Magazine
My first full-length article in MSDN Magazine is out with the October issue and it’s about Microsoft AJAX client templates. Check it out…
-
jQuery now officially part of the .NET developer’s toolbox
You may have read that from John Resig or Scott Guthrie. I’m very excited to announce that Microsoft has decided to ship, adopt and support using jQuery on top of ASP.NET. This may come as a surprise to some of you but I hope you’ll agree with me that it makes total sense. jQuery is a fantastic JavaScript library that focuses on DOM querying and manipulation, whereas the Microsoft Ajax Library focuses on building reusable components and interacting with ASP.NET web services.
-
JavaScript and client templates on Hanselminutes
I'm sharing a spot with Scott Cate (of CloudDB fame, and by the way CloudDB is a fantastic product built entirely using ASP.NET AJAX) this week on Hanselminutes.
-
"Reality has a well-known liberal bias"
I've been thinking about this famous Stephen Colbert quote quite often lately. Having been raised in a country where there are no political ads on TV, I find it quite shocking to see how candidates here in the U.S. sling mud at each other through disgusting little ads that insult the viewer's intelligence with really outrageous claims.
-
Using client templates, part 2: Live Bindings
In part 1, we saw how to use DataView to render JavaScript data using a simple template. In this post, we'll see how rich bindings unlock richer scenarios where user changes automatically propagate back to the data and to all UI that is bound to it.
-
IE8: now with search that doesn't suck
I installed IE8 Beta 2 and tried CTRL+F this morning and here's what I got:
-
Using the Ajax Control Toolkit in ASP.NET MVC
Stephen Walther has a pretty cool post on using the new file-only version of the Ajax Control Toolkit from an MVC application:
-
Ajax Control Toolkit released for .NET 3.5 SP1
I just released the latest version of the Ajax Control Toolkit for .NET 3.5 SP1.
-
I don't like Braid. What's wrong with me?
I really, really like a good puzzle game. So when I saw Braid announced and read the raving critics, I was quite sure this was a game for me. I really wanted to like it. Then I downloaded the trial version... and pretty much hated it. So here are some critic's citations and how they resonated for me:
-
Need a simple grid for ASP.NET Ajax?
A client grid control is probably the most requested control for the Ajax Control Toolkit. It will come eventually but if you need a simple grid control right now, DotNetSlackers' Ajax Data Controls do a pretty good job. Their grid supports pagination, sorting, drag and drop of columns, in-place edition and is server-integrated. They also provide repeater types of controls but those are made a little more complex to use because of the lack of data binding. The whole thing is open-source. w00t!
-
Using client templates, part 1
Last week, we shipped the first preview for the Ajax work we're doing in ASP.NET 4.0 under the simple form of a simple script file (release and debug versions). This should show how much emphasis this release puts on the client-side. As a matter of facts, I'll use a plain HTML file here instead of an ASPX file to make it perfectly clear that everything here (except for the web service that provides the data) runs on the client.
-
Windows Live tools for Visual Studio
The Live team just shipped a great suite of controls that enable Live integration into any ASP.NET web site. The suite contains Map, LiveID, Messenger controls and more.
-
If you don't know about CTRL+I in Visual Studio...
If you don't know about CTRL+I in Visual Studio, go try it, I'll be waiting...
-
Alternating styles in ListView without AlternatingItemTemplate
ListView (the server-side control), like all repeating data controls in ASP.NET, has an AlternatingItemTemplate, but it would be a shame to have to copy all the markup in the ItemTemplate into AlternatingItemTemplate, just to alternate styles on the items. It's quite likely that only css classes will change between the two, and redundancy is bad <- big scoop here.
-
ASP.NET AJAX 4.0 CodePlex Preview 1 available
I'm very happy to announce that the first preview for the new Ajax features in ASP.NET just went live. Thanks to everyone who made that happen and thanks to all of you for providing feedback on the Roadmap.
-
Using ScriptManager with other frameworks
ScriptManager is a useful control. It manages script references, removes duplicates, enables localization and debug/release modes, enables script combining and makes client-side component-based development easier (components register their script dependencies with ScriptManager without the page developer having to know those dependencies). But one thing we should have anticipated was that this control would be interesting to developers who wish to use a different framework than the Microsoft Ajax Library.
-
Who's the PC now?
I saw WALL-E yesterday with my daughter. As usual, Pixar delivers a great, fun movie. Animating a pile of rusty metal and transform it into such a moving character is no small achievement. But there's one thing that I found really curious.
-
ASP.NET Ajax roadmap published
We just published our roadmap for ASP.NET Ajax.
-
New tools to prevent SQL injection attacks
I've blogged in the past about injection attacks. Microsoft publishes additional new tools to detect and protect against injection attacks. The first tool, developed by HP, crawls web sites to automatically detect possible attacks, the second blocks dangerous requests from being executed, and the last one analyzes code to look for dangerous practice.
-
Generating thumbnails in ASP.NET (DotNetSlackers)
I just published a new article on DotNetSlackers. The post is about generating scalable and secure image thumbnails.
-
ASP.NET Ajax client-side templates and declarative markup article in MSDN Magazine
I wrote a short column in Dino Esposito's latest MSDN Magazine article to introduce two new features that we will ship with the next version of ASP.NET Ajax. The features will enable you to declaratively instantiate client-side components and to build data-driven HTML from simple templates.
-
Ajax charting
Miljan from ComponentArt announces the 2008 release of their charting engine. It's a really interesting engine for Ajax developers because it has a full client-side object model. Check it out.
-
Script reference profiler
ASP.NET Ajax 3.5 SP1 contains a new feature that enables the application developer to combine scripts in order to reduce the number of downloaded files. But in order to do that, the developer must have a way of discovering what scripts are being used in a page or application.
-
Script combining screen cast
I recorded a 5 minute screencast that shows how to use the new script combining feature in ASP.NET Ajax 3.5 SP1:
http://asp.net/learn/3.5-SP1/video-296.aspx -
Late notice: speaking in Montreal tonight
I'll switch to French for this post as the talk will be in French.
-
What's that exception you have here?
Mike Harder found this one that I didn't know about: all exceptions that you may get from the browser are not Error instances. DOMException is an exception that gets thrown when a DOM operation fails, but for some incomprehensible reason it doesn't derive from Error like SyntaxError or TypeError:
-
Cache sharing between sites
There's been some debate recently about good ways that we could enable web sites to share the browser cache in the future. The problem is that popular JavaScript frameworks currently end up being downloaded several times from different sites that use them and this is a great waste of resources. Of course, there are some ways to achieve re-use of scripts across sites today by hosting those frameworks in a central location, but that is an expensive thing to do for framework developers, most of which are open source projects (it basically amounts to asking the framework developers to pay for the hosting cost of everyone that uses them).
-
Web development best practices finally made fun
-
OpenAjax requests comments on browser wishlist
The OpenAjax Alliance has been working with some of the top Ajax developers on a wishlist that aims at gathering and prioritizing the development features that we need the most from next generation browsers. The process is completely open and Wiki-based, so feel free to contribute.
-
How to make UpdatePanel accessible
DotNetSlackers just published my article on how to make UpdatePanel accessible:
-
A case for partial rendering
I've been seeing more and more authors lately dismissing partial rendering (a.k.a. UpdatePanel) as a poor man's version of Ajax, something you should only choose if you're too lazy to implement "true" Ajax.
-
IE8 to look forward: the Evil Empire listened
I've said some time ago that I personally would have preferred if IE8 was in standard mode by default, that it made more sense in the long run at the price of moderate suffering in the short term.
-
If you're reading this, you should be on weblogs.asp.net/bleroy
Apologies if you're not. Let me explain.
-
You're not being reasonable
Ever since it came out, it seems like Wii Play has been somewhere on top of sales charts and even managed to be the #2 top-seller of 2007 in the US. Let's be clear about this: even if it looks like a good deal, being only $10 above the price of a standalone Wiimote, it really isn't. It would be a good deal *if* Wii Play itself was worth $10, which it isn't by a very large margin (i.e. at least $10). As a matter of facts, if you gave me $10 to play this thing (which I refuse to call a game), I would decline. And I want the fifteen minutes I spent trying to play it back.
-
Getting absolute coordinates from a DOM element
For some reason, there is no standard API to get the pixel coordinates of a DOM element relative to the upper-left corner of the document. APIs only exist to get coordinates relative to the offset parent. Problem is, it's very important to get those coordinates for applications such as drag and drop, or whenever you need to compare coordinates of elements that may be in completely different parts of the document.
-
A honest recap of the IE8 meta-tag controversy
This will affect all Web developers, which is precisely why the debate is very heated. Anyway, here's a honest recap of the issue. I tend to agree with the author's conclusion although that is obvisouly not the position of Microsoft...
-
Improving PHP by running it in IIS
Mike Volodarsky wrote a fantastic article in the January 2008 issue of MSDN magazine in which he explains how you can take an existing PHP application (he uses QDig, a popular image gallery) and improve it without touching a line of its code. This is a great demonstration of the power of IIS 7's modular and pluggable architecture. Mike was able to add the following features to this PHP application using only managed code modules and configuration:
-
I'm now officially a slacker
Well, at least a Dot Net Slacker...
-
Off-topic: I have the best daughter in the whole world
My wife was trying to explain Martin Luther King day to my four year old daughter today. It's pretty difficult to explain seeing all the cultural ramifications and references that we take for granted but that she doesn't have, so my wife starts by explaining how she (my daughter) might have noticed how people have different skin pigmentations. Guess what she answered to that...
-
Dates and JSON
JSON is a great data format and it's taken the Internet by storm for a number of good reasons. But because of a strange oversight in the EcmaScript specs, there is no standard way of describing dates in JSON. There's been a lot of discussion on this topic and it still remains a problem today.
-
Immutability in C#
For some reason, there's been a lot of buzz lately around immutability in C#. If you're interested in algorithms and data structures, it's a fascinating subject. Immutable objects, according to Patrick Smacchia, have the following advantages:
-
Screencast: how to enable server-side history management in an ASP.NET Ajax application
I've recently recorded a screencast showing how to enable server-side history management (in other words, handling the back button) in an ASP.NET Ajax application. The whole video is less than 15 minutes total and I build the whole application from scratch in there (in VB).