Friday, April 4th, 2008
Category: Microsoft

This is an interesting one. If you go to learn about ASP.Net Ajax at the Microsoft site itself you not only see info about the product, including this:
ASP.NET AJAX is a free framework for quickly creating efficient and interactive Web applications that work across all popular browsers.
ASP.NET AJAX is built-into ASP.NET 3.5. It is also available as a separate download for ASP.NET 2.0.
But, you may get a full screen modal popup that tells you how much better Silverlight is than anything the Open Web has to offer ;) NOTE: Some people see this, and others do not.
I don’t see this when I go to Adobe Spry. There is no “FLEX FLEX FLEX” message.
How do you feel about that?
-999999997.7 rating from 30 votes
Friday, March 28th, 2008
Category: Microsoft
, Performance
I missed the Microsoft Research paper on Doloto: Code Splitting for Network-Bound Web 2.0 Applications:
Modern Web 2.0 applications, such as GMail, Live Maps, Facebook and many others, use a combination of Dynamic HTML, JavaScript and other Web browser technologies commonly referred as AJAX to push page generation and content manipulation to the client web browser. This approach improves the responsiveness of these network-bound applications, but the shift of application execution from a back-end server to the client also often dramatically increases the amount of code that must first be downloaded to the browser. This creates an unfortunate Catch-22: to create responsive distributed Web 2.0 applications developers move code to the client, but for an application to be responsive, the code must first be transferred there, which takes time. In this paper, we present DOLOTO, a system that analyzes application workloads and automatically performs code splitting of existing large Web 2.0 applications. After being processed by DOLOTO, an application will initially transfer only the portion of code necessary for application initialization. The rest of the application’s code is replaced by short stubs—their actual function code is transfered lazily in the background or, at the latest, on-demand on first execution. Since code download is interleaved with application execution, users can start interacting with the Web application much sooner, without waiting for the code that implements extra, unused features. To demonstrate the effectiveness of DOLOTO in practice, we have performed experiments on five large widely-used Web 2.0 applications. DOLOTO reduces the size of initial application code download by hundreds of kilobytes or as much as 50% of the original download size. The time to download and begin interacting with large applications is reduced by 20-40% depending on the application and wide-area network conditions.
They take examples with varying degrees of download-i-ness and show how their system can or can’t help:
As we play with the techniques for getting the best performance, it does feel like we need an abstraction that handles dependencies, loads only what is TRULY needed right away in onload, and loads other payloads as required / later.
Wednesday, March 5th, 2008
Category: Ruby
, Microsoft
John Lam has posted about a new release, DSL: Dynamic Silverlight. I can’t believe that Microsoft is going to take the DSL TLA ;)
Our team is happy to announce Dynamic Silverlight (DSL), which integrates our DLR dynamic languages with Silverlight. It requires Silverlight 2, which includes the cross-platform CLR and a set of libraries for rich graphics, media and web programming. It is packaged as a Silverlight extension, which means that it is downloaded in addition to Silverlight on an as-needed basis.
DSL has a runtime and an SDK component. The runtime consists of two assemblies: Microsoft.Scripting.dll, and Microsoft.Scripting.Silverlight.dll. You’ll also need the language assemblies, which are IronRuby.dll and IronRuby.Libraries.dll for Ruby and IronPython.dll and IronPython.Modules.dll for Python. The runtime component is a small additional download. Today, the IronRuby Silverlight runtime is just a 712KB download, which takes less than 5 seconds to download over modern broadband.
Now you can get Ruby in your browser:

John also talked about Chiron, a mini Web server that lets you develop against a local file system with ease. We will find out more, and get access to the bits, on Friday when John gives his MIX talk.
Tuesday, March 4th, 2008
Category: Microsoft
, Adobe
A couple of articles from the press came out at the same time. Darryl Taft reported on his conversation with Kevin Lynch and Martin LaMonica published Microsoft to take Silverlight offline eventually.
The intersection is where Kevin answers about Silverlight going offline:
Well, what about an offline Silverlight capability? Would that do it?
In order to do it well, your heart has to be in it. And if you look at what we’re doing right now with our technologies like Flash and AIR, we’re making sure they work reliably across operating systems. So that means Mac and Windows, but also Linux. We’re releasing Flash Player now simultaneous for Mac and Windows. It took us a while to get their and now we’re doing that, and it’s the same core code.
If you look at what Microsoft is doing with Silverlight, they’re not actually building the Linux version off the same code base. It’s a new code base, which is unlikely to be compatible with the other code bases because it’s just not built the same way. So there’ll be different idiosyncrasies and we know that will be a problem. So we’re really taking a passionate approach to reliability across OSes. And you really have to have that as the core essence of what you’re doing or it won’t really work that well.
Microsoft says it is coming:
Microsoft does not currently have specific plans to bring offline capabilities to Silverlight, but it’s something it will eventually do, said John Case, general manager in Microsoft’s developer division.
“It’s something that we will want to do,” Case said in an interview on Monday. “Eventually, customers will expect us to do it.”
Darryl has a lot more meat in his article which asks:
- As far as AIR deployment, why not just put it in Flash?
- But isn’t the Flash Player only about a 500K download? Couldn’t you just up that a little, as you said bandwidth is increasing?
- When are you planning to, or are you in fact planning to, open-source Flash?
- So you said Tamarin was a first step. Does that mean you’re going to do a second, third, fourth step and so on until Flash is fully open source?
- I’ve watched this ongoing competition between Adobe and Microsoft. What do you think they need to do if they want to one-up AIR?
- Well, what about an offline Silverlight capability? Would that do it?
- So how do you address the criticisms about security with AIR?
- You mentioned support for Linux with AIR. Can you expand on the importance of Linux for you guys and where you’re headed with it?
- Who is better at designer/developer workflow, Microsoft or Adobe? Do you concede that to them?
- What’s the status of the Adobe relationship with Google about Google Gears?
- Do you have any plans to do an AIR-based browser?
NOTE: I had a couple of opinions on the issue of open source wrt Gears and AIR
Friday, February 29th, 2008
Category: JavaScript
, Library
, Microsoft
We are waiting for the big news at MIX, mainly revolving around IE 8. We have heard some reports from people who have IE 8 beta that the bugger is a bit of a disappointment, and that it hasn't moved on too much from IE 7, but lets wait and see before passing judgement.
Today though, Dare Obasanjo posted a slew of Windows Live news on several APIs.
The big meta message is the fact that "Microsoft Standardizes on AtomPub". Now I feel like it is time for me to open a pub in the valley and one in Seattle called "The AtomPub" ;)
On the JavaScript side we have the Windows Live Messenger Library where they implemented it in Script#:
The Messenger Library is written in C# and compiled into JavaScript using Script#. Messenger Library applications can be written in either C# (with Script#) or JavaScript. Messenger Library applications can be built using ASP.NET and ASP.NET Ajax, or they can be built independently of the .NET framework.
The code looks very C#-y:
JAVASCRIPT:
-
-
try {
-
var hash = window.location.hash.substr(1);
-
if (window.location.replace == null)
-
window.location.replace = window.location.assign;
-
window.location.replace("about:blank");
-
var name = hash.split("/")[0];
-
var win = null;
-
if (name && (name != ".parent"))
-
win = window.parent.frames[name];
-
else
-
win = window.parent.parent;
-
if (win.Microsoft) {
-
win.Microsoft.Live.Channels.Mux._recv_chunk(hash);
-
}
-
} catch (ex) {
-
/* ignore */
-
}
-
You can also use a high level widget to embed chat, which you can see on Dare's space:
Friday, January 25th, 2008
Category: Utility
, Microsoft

Paolo Severini, a Microsoft employee in Dublin, has build a JavaScript Memory Leak Detector that detects leaks with knowledge of the difference between IE 6 and IE 7.
How does it work?
Like any IE Band, the JavaScript Memory Leak Detector is a COM in-process DLL loaded in the Internet Explorer process. The fact of living inside the IE process allows it to easily intercept some of the API calls made by the IE code. In this case, we are interested in intercepting every call that creates a Jscript engine.
The Jscript engine is a COM object, and it is instantiated by Trident (mshtml.dll) with a call to CoCreateInstance(). Therefore, the first operation made by the tool will be to intercept the calls to CoCreateInstance made by the mshtml module. There are a few ways to implement this API hooking; in this case the simple technique of overwriting the module Import Table in memory works perfectly. (See Robbins' "Debugging Applications" for more details).
At this point we can substitute our own Jscript engine in place of the real engine. By implementing all the ActiveScript interfaces exposed by a Jscript engine and delegating all the calls to an instance of the real Jscript engine, the tool can transparently intercept all the interactions between Trident and Javascript and still have Internet Explorer to run correctly.
Now, a Jscript engine by itself has no notions of Internet Explorer and its DOM objects. It is IE that registers the root (window) object to the engine and loads into the engine all the scripts contained or loaded by a HTML document. Since we are intercepting all the calls to Jscript, we can thus have a reference to all the DOM objects that are passed to or used by a Javascript function.
The technique to do this is a bit tricky. A DOM object is passed to (and accessed by) Jscript through an IDispatch interface; so for each new object that we meet we create a fake COM object that works as interceptor (or wrapper), exposing IDispatch and delegating the calls to the real (contained) IDispatch object.
Every time a method or property is called to a DOM element by JavaScript, the call is actually made to our wrapper and then delegated to the real object. The wrapper can analyse the method in/out parameters and return value, looking for other IDispatch pointers that represent new DOM objects. If it finds a new IDispatch pointer not yet met, we know that this object will now be visible to the JavaScript code, and we need to build another wrapper and pass it to JavaScript in its place. In the end, every JavaScript function will access DOM objects only through these wrappers and the tool will have complete control over the script execution.
Tuesday, January 8th, 2008
Category: Microsoft
Michael Schwarz is moving on from his Ajax.NET library, and suggests that you go back to the mothership and use ASP.Net Ajax and the PageMethods feature.
History
I'm happy to see that Ajax.NET Professional is used about 13.3% when using .NET related web applications. Starting with my first post Using a HttpHandler and Attributes to call C# methods in JavaScript in February 2005 the AJAX hype started around the world. Two months later I renamed the project to Ajax.NET and added nearly all features that are the most used until today. In May 2005 Windows Mobile support has been added and Ajax.NET was the only .NET framework that was able to run AJAX requests on mobile devices. In the end of 2005 I was invited to the PDC 05 in Los Angeles where I could meet Brian Goldfarb and Jonathan Hawkins to see how Microsoft is working on AJAX in ASP.NET (Atlas). I meet some other .NET developers and had great ideas on how AJAX will change web applications. In October I published a new product called Ajax.NET Professional which was doing the same but contains several other security features. Because of a change in the JavaScript source I changed the name from Ajax.NET.
Now
Today I have my eyes on new technologies that will change client application development (web applications). To see any feedback of my MVP award for 2008 I'd like to concentrate more on those topics. I'm still using AJAX in nearly all my web applications, but the future will bring more important features.
Some of the users of the library are talking about stepping up to the plate to try to continue Ajax.NET itself, so we will see.
Tuesday, December 18th, 2007
Category: IE
, CSS
, Microsoft
Dimitri Glazkov has made a prediction that we will see CSS Grid Positioning in IE 8. This would make a lot of sense due to the fact that:
- Alex Mogilevsky, and Markus Mielke, of Microsoft wrote the spec
- If Microsoft comes out with a browser that goes above and beyond, they will be able to get rid of the monkey on their back
- CSS grids are painful right now!
This module allows you to create a layout like this:

with:
CSS:
-
-
body { columns:3; column-gap:0.5in; }
-
img { float:page top right; width:3gr; }
-
It can be seen as a grid with 6 vertical lines and 2 horizontal lines.
We can use the grid lines to position the floating image
The statement "float:page top right" here positions the image at the top right corner of the page (as defined in [CSS3GCPM])
"width:3gr" makes image 3 "grid units" wide, where a "grid unit" is the distance between two adjacent grid lines. Each boundary between a column and a gap automatically produces a grid line, therefore to specify "two columns, including the gap between columns, but not including any gaps outside the columns" we can just say "3gr".
You will see more detailed examples, with lots of gr's (grid units).
Friday, December 14th, 2007
Category: Opera
, Microsoft
Ah, the courts. The latest case aimed at Microsoft is from Opera, as they urge Microsoft to give consumers a genuine choice of standards—compliant Web browsers:
The complaint describes how Microsoft is abusing its dominant position by tying its browser, Internet Explorer, to the Windows operating system and by hindering interoperability by not following accepted Web standards. Opera has requested the Commission to take the necessary actions to compel Microsoft to give consumers a real choice and to support open Web standards in Internet Explorer.
"We are filing this complaint on behalf of all consumers who are tired of having a monopolist make choices for them," said Jon von Tetzchner, CEO of Opera. "In addition to promoting the free choice of individual consumers, we are a champion of open Web standards and cross-platform innovation. We cannot rest until we've brought fair and equitable options to consumers worldwide."
Opera requests the Commission to implement two remedies to Microsoft’s abusive actions. First, it requests the Commission to obligate Microsoft to unbundle Internet Explorer from Windows and/or carry alternative browsers pre-installed on the desktop. Second, it asks the European Commission to require Microsoft to follow fundamental and open Web standards accepted by the Web-authoring communities. The complaint calls on Microsoft to adhere to its own public pronouncements to support these standards, instead of stifling them with its notorious "Embrace, Extend and Extinguish" strategy. Microsoft's unilateral control over standards in some markets creates a de facto standard that is more costly to support, harder to maintain, and technologically inferior and that can even expose users to security risks.
Mary Jo Foley quickly chimed in on why it is a bad idea:
- Should antitrust courts be the ones in charge of determining which versions of Cascading Style Sheets (CSS), XHTML, Document Object Model (DOM) and other Web standards are the ones to which all browser/Web developers should be writing? Participants in various standards bodies can’t even agree among themselves which version of these standards is the best. How are judges supposed to wade through the browser-standards confusion in a good/fair way?
- Would it be positive for customers if Microsoft were suddenly forced to create a version of IE that looked good on paper, in terms of more complete standards compliance, but which broke third-party and custom Web applications? Microsoft has argued that it is trying to avoid this situation with IE and is working on various ways it can make IE more standards-complaint without breaking existing apps, completely upsetting the partner/customer universe.
- With Mozilla, Firefox has proved you don’t need government intervention to wrest a substantial percentage of the browser market from Microsoft. You just friends with deep pockets (like Google) and a community of dedicated developers — plus a guaranteed customer base who prefer anything other than Microsoft technologies.
In the end, Microsoft’s own inertia, browser-security problems and inability to react quickly to market changes (where, oh where, is IE 8?) will continue to help its browser competitors more than a ruling by the EU or other antitrust body would.
What do you think? Is Opera’s attempt to get the European Commission to force the unbundling of IE from Windows too late? And what’s your take on Opera’s attempt to get the courts involved in enforcing Web-standards compliance?
Monday, December 10th, 2007
Category: GWT
, Microsoft
With Microsoft Volta there has been a lot of comparison to GWT, especially as Eric M said that it will "blow GWT out of the water". There are some features that I am very interested in wrt Volta, namely:
- Any CLR language (e.g. IronRuby :)
- The ability to run on the client or the server:
As an example, let's say you have a function like ValidateAddress(). Whether this logic lives on the client (i.e. Javascript in the browser) or runs on the server is really a function of how complicated that function actually ends up being. Now imagine if when the time comes to refactor the function and move the validation logic from the Web client to the server or vice versa, instead of rewriting Javascript code in C#/IronPython/VB.NET/IronRuby/etc or vice versa you just add or remove a [RunAtOrigin] attribute on the function.
That being said, the Chronoscope (GWT project) author wrote about his experience playing with Volta, where he shares some of his frustrations (NOTE: Volta is obviously very much a preview release):
Microsoft's test application certainly blows away my browser: http://labs.live.com/volta/samples/WordWorm.html.
It made over 171 HTTP requests to load up all of its generated Javascript, over 2 megabytes of code, it took 20 seconds to startup, ran slow once it did, threw exceptions and sent me into the debugger, and when I looked at the code, I noticed that it had compatibility code for other browsers in my download, code chewing up space and network bandwidth that are useless to my Firefox instance.
I realize that this is a prototype, but come on. Microsoft should not be talking smack about GWT until they've got something to show that doesn't have so many easy to criticize flaws.
I am biased. I work for Google. Ray writes a GWT application
Thursday, December 6th, 2007
Category: Microsoft
Microsoft Labs has announced a new project called Volta that looks like GWT for .NET.
Erik Meijer (Mr. LINQ) is behind this one:
"The idea is that you start out building your application, focusing on the functionality, the look and feel, until you're satisfied with it and then you repurpose it into an AJAX application or whatever," Erik Meijer, Volta's principal architect and a member of Microsoft's SQL Server team, said in an interview. "You incrementally morph a standard client-only application into a Web application. The programmer specifies the intent and then we're going to insert all the necessary code to do the 'how.'"
Apps written with Volta can be debugged from within Visual Studio, something that's not always easy for multi-tier apps that run across client and server. "One of the unique opportunities provided for us is to debug across different forms of code, whether client or server," Alex Daley, Microsoft's group product manager for Live Labs, said in an interview. Volta, meanwhile, can also instrument code so developers can collect information on performance from Microsoft Service Trace Viewer.
You have a full API to talk into the browser side of things... E.g.:
C#:
-
-
partial void InitializeComponent() {
-
nameElement = Document.GetById<input>("Text1");
-
greetingElement = Document.GetById<div>("Greeting");
-
button1 = Document.GetById<button>("Button1");
-
public VoltaPage1() {
-
InitializeComponent();
-
-
var greeter =
new Greeter
();
-
button1.Click += delegate {
-
var name = nameElement.Value;
-
};
-
}
-
You can also call out to "native" JavaScript code via annotations:
C#:
-
-
[Import("function(id) { return new VEMap(id); }")]
-
public extern Map(string id);
-
I have seen teams have great success with GWT, and it is especially nice when a new version comes out that has huge speed improvements (which seems to happen each time), so there is probably a market for people who are .NET shops who think JavaScript is "icky" :/
I definitely want to check out the Ruby side of things...
Wednesday, December 5th, 2007
Category: Microsoft
When Silverlight came out of the gate, some were pretty surprised to see that there were no UI controls such as buttons. Really? I have to draw the components myself? You could tell that they went after Flash.old. Well, this was a 1.x release, and it is getting better. Scott Guthrie just announced some plans for Silverlight where they changed the version of 1.1 to 2.0, but also added:
-
Rich Controls: Silverlight will deliver a rich set of controls that make building Rich Internet Applications much easier. The next Silverlight preview release will add support for core form controls (textbox, checkbox, radiobutton, etc), built-in layout management controls (StackPanel, Grid, etc), common functionality controls (TabControl, Slider, ScrollViewer, ProgressBar, etc) and data manipulation controls (DataGrid, etc).
-
WPF UI Framework: The current Silverlight Alpha release only includes basic controls support and a managed API for UI drawing. The next public Silverlight preview will add support for the higher level features of the WPF UI framework. These include: the extensible control framework model, layout manager support, two-way data-binding support, and control template and skinning support. The WPF UI Framework features in Silverlight will be a compatible subset of the WPF UI Framework features in last week's .NET Framework 3.5 release.
-
Rich Networking Support: Silverlight will deliver rich networking support. The next Silverlight preview release will add support for REST, POX, RSS, and WS* communication. It will also add support for cross domain network access (so that Silverlight clients can access resources and data from any trusted source on the web).
-
Rich Base Class Library Support: Silverlight will include a rich .NET base class library of functionality (collections, IO, generics, threading, globalization, XML, local storage, etc). The next Silverlight preview release will also add built-in support for LINQ to XML and richer HTML DOM API integration.
Monday, December 3rd, 2007
Category: Presentation
, Microsoft
Peter Laudati, Developer Evangelist from Microsoft, gave a presentation at The Ajax Experience titled Light Up the Web with Silverlight which is now available for you to watch:
In this session, you’ll learn all about Silverlight from a developer’s perspective, including how to build rich, interactive applications using Visual Studio, as well as Microsoft’s powerful new designer tool, Expression Blend. You’ll also see how to create dynamic experiences with the Extensible Application Markup Language (XAML), how to manipulate the overall application or experience with code, and how to retrieve data and media from a Web service and incorporate it all into a Silverlight application.
Bio: In his current role, Peter works with the developer community in New York and New Jersey to support area user groups, code camps, and other events. Previously, he worked as a consultant in Microsoft’s services division. As a consultant, he worked on several application development projects and provided architectural guidance for large customers throughout the NY & NJ metro area. He lives with his family in central New Jersey and loves kayaking and biking at the Jersey Shore.
Friday, November 16th, 2007
Category: Games
, Microsoft
Game Friday is here, and it was time to showcase a Silverlight one. This time we have a Silverlight 1.1 version of Minesweeper, with full source code to check out.
Where is Silver Scrabulous?
Thursday, September 13th, 2007
Category: Microsoft
, SVG
Sam Ruby has done it again, this time taking Toine de Greef's work and making it better. Now your SVG can work on IE via Silverlight:
Cool. SVG to Silverlight via XSLT. But, embedding in HTML using comments? I think I can improve upon that.
Demo: Toucan. Rendered using native SVG on recent Gecko, Opera, and Webkit based browsers. Converted to Silverlight and rendered (after a brief delay) using client side XSLT on MSIE browsers with Silverlight.
This technique may also be useful for people who want to embed Silverlight into Webpages, which apparently isn’t so easy to do.
Demo: Raven — currently MSIE/Silverlight only, but clearly the reverse is also possible.
The magic bridge to the XML is in svg2xml.js:
JAVASCRIPT:
-
-
if (window.attachEvent) window.attachEvent("onload", function() {
-
xmls = document.getElementsByTagName('xml');
-
for (i=0; xmls.length>i; i++) {
-
var source = xmls[i].XMLDocument.documentElement;
-
-
var script = document.createElement('script');
-
script.id = "_svg2xaml_" + i;
-
script.type = "text/xaml";
-
if (source.nodeName == 'Canvas') {
-
script.text = source.xml;
-
} else if (source.nodeName == 'svg') {
-
var svg = new ActiveXObject("Microsoft.XMLDOM");
-
svg.async = false;
-
svg.loadXML(source.xml);
-
var xsl = new ActiveXObject("Microsoft.XMLDOM");
-