Activate your free membership today | Log-in

Wednesday, July 23rd, 2008

Embedded OpenType and the W3C

Category: Microsoft, Standards

CSS:
  1.  
  2. @font-face {
  3.   font-family: Cambria;
  4.   font-style: normal;
  5.   font-weight: normal;
  6.   src: url(CAMBRIA2.eot);
  7. }
  8.  

We discussed the new font-face / EOT work yesterday. Ben loves typography, hence him wanting to give Tahoma a rest.

Then we see Microsoft weighing in on the topic, and it made me ponder the politics going on.

Bill Hill has a new post on the IEBlog about Font Embedding on the Web.

The first couple of paragraphs says a lot. First we have the "look at the companies supporting it":

It’s Bill Hill here again, still fighting the good fight to make typography on the Web as good as we’re used to seeing in print. We made significant progress this week, when one of the USA’s most prestigious font companies announced its support for the Embedded OpenType format for font embedding on the Web, and launched a new website to promote other browsers to support it in addition to Internet Explorer (which has had EOT support built-in since 1996).

And then the fear about font linking ;)

At the same time, Ascender Corporation and its collaborators in the typographic community also warned of the legal dangers of using the Font Linking mechanism currently supported by other browsers.

So, EOT is "in front of the W3C". What are your thoughts?

You can give Bill Hill's work a peak and look at the Assender post too.

Posted by Dion Almaer at 8:15 am
10 Comments

+++--
3.9 rating from 14 votes

Friday, July 4th, 2008

Microsoft ASP.NET Ajax Road Map

Category: Microsoft

Microsoft has come out with a road map for the Ajax side of ASP.NET, which has been simplified to be just: Framework and tools in one versioned package; Ajax components will be released separately on Codeplex.

There is a bold goal at the beginning of the document (why is the doc a PDF/.doc and not just HTML!!!):

Make ASP.NET Ajax the first-class choice for all Web 2.0 developers

They are going to be catching up with richer CSS selection and DOM manipulation:

JAVASCRIPT:
  1.  
  2. $query(“textarea.rich”)
  3.   .addHandler(“focus”, function(e) {
  4.     Sys.Debug.trace(“focused into “ + (e.eventTarget.id || “?”));
  5.   })
  6.   .setStyle(“width”, function() {
  7.     return (document.body.clientWidth – 10) + “px”;
  8.   })
  9.   .create(Contoso.UI.RichTextBehavior, {
  10.     showToolbar: true,
  11.     fonts: [“Arial”, “Times”, “Courier”]
  12.   });
  13.  

We have got some animation going on:

JAVASCRIPT:
  1.  
  2. $query(“.sprite”).animate([
  3.     new Sys.Animation.FadeIn(300),
  4.     {
  5.       “style.backgroundColor”: “#ff0000”,
  6.       “style.fontSize”: “2em”),
  7.       duration: 500
  8.     },
  9.     new Sys.Animation.FadeOut(300)
  10.   ])
  11. );
  12.  

What else?

  • Accessibility
  • Drag & Drop
  • Client-side Controls and Behavior
  • Interoperability: OpenAjax hub support
  • Tooling, tooling, tooling

Posted by Dion Almaer at 7:50 am
4 Comments

++---
2.7 rating from 29 votes

Tuesday, June 10th, 2008

Silverlight 2 beta 2: cross domain connections, more controls, and animation

Category: Microsoft

Microsoft launched Silverlight 2 beta 2 last Friday (which seemed a bit strange....).

I saw this on the same day as some Adobe folks showed me an old thread that showed MLB.tv sneaking a context menu saying "About Silverlight" into the Flash version ;)

What is new in the latest beta? Danny Thorpe is looking forward to digging into the "new support for cross-domain connections using sockets, sibling to Silverlight’s existing cross-domain HTTP request."

Full Feature List

  • Animation
    1. Support for animating custom data points
    2. Object Animation support (animating structs)
  • Deep Zoom
    1. New XML-based file format
    2. MultiScaleTileSource to wire up your own images and get the Deep Zoom experience
    3. Better notifications when sub-images enter the view
  • Controls
    1. Customize the look and feel of controls using Visual State Manager. Interactive control templates were never so easy.
    2. Some base controls are now part of the core platform, rather than packaged into apps. Say hello to smaller app sizes.
    3. Calendar now supports multi-selection and blackout dates
    4. New TabControl
    5. Control properties changes (Background, Tooltip, FontFamily, FontSize…)
    6. DataGrid improvements: auto size, reorder, sort, performance and more
  • TextBox
    1. IME Level 3 input support
    2. Text wrapping and multiline selection highlighting in textbox
    3. Scrolling and clipboard support
    4. Document level navigation keys
  • Improvements in error handling, reporting
  • Parser and Property system
    1. DependencyProperty.Register/RegisterAttached now supports PropertyMetadata
    2. New DependencyObject.ClearValue
    3. Visual tree helper
  • Data-binding
    1. Per binding level validation
    2. Support for element syntax for binding markup extensions
    3. Binding to attached properties
    4. ItemsControl extensibility (OnItemsChanged method)
    5. Fallback in value conversion (Binding.UnsetValue)
  • Input
    1. Support for limited keyboard input in Full Screen mode (arrow, tab, enter, home, end, pageup/pagedown, space). I've seen more than a few requests for this on the forums.
    2. Managed APIs for Inking and stylus input
  • Networking and Data
    1. Cross Domain support in Sockets
    2. Cross Domain security enhancements
    3. HttpWebRequest and WebClient callable from background threads
    4. Upload support in WebClient
    5. Isolated Storage: default size increased to 1MB and new ability to change quota with user consent. Also a new management UI.
    6. Duplex communications ("push" from server to Silverlight client with no need to "poll" for data)
    7. LINQ -to- JSON serialization
    8. Significantly improved SOAP interop
    9. "Add New Item" template in Visual Studio for "Silverlight-enabled WCF Service"
    10. ADO.NET Data Services support
  • UIAutomation and Accessibility support in the platform
  • Media
    1. Platform support for Adaptive Streaming (also referred to by people as multi bitrate), the ability for Silverlight to switch between media depending on network and CPU conditions
    2. Content protection with PlayReady DRM and Windows DRM
    3. Basic server-side playlist (SSPL) support
  • Localization
    1. Changes to localized application model. You now create one xap per locale, instead of one monolithic multilingual app
    2. Expanded localization languages of runtime and SDK
    3. Japanese SDK Installer and documentation (July 10)
  • Several changes to make API and behavior more compatible with WPF
  • Tools
    1. Beta 1 projects will be automatically ported to Beta 2
    2. Remote debugging for VB on the Mac
  • CLR
    1. A new developer-oriented runtime package with debugging binaries, localized strings, docs etc.
    2. Support for OS fallback logic for resources
    3. CurrentCulture and CurrentUICulture isolation to AppDomain level
  • DLR
    1. Performance improvements
    2. Various new DLR and IronPython 2.0 Beta 2 language features
    3. Various new IronRuby features

Posted by Dion Almaer at 5:13 am
5 Comments

++---
2.3 rating from 35 votes

Monday, June 9th, 2008

Is “finally” the answer to all IE6 memory leak issues?

Category: IE, Microsoft, Testing, Tutorial

Hedger Wang has been scanning a lot of Chinese blogs lately for solutions to IE6 and memory leak issues. One of the things he stumbled upon is a pretty nifty way of nulling the objects to stop memory leaks by using the try ... finally construct. So instead of this solution which leaks memory:

JAVASCRIPT:
  1.  
  2. function createButton() {
  3.       var obj = document.createElement("button");
  4.       obj.innerHTML = "click me";
  5.       obj.onclick = function() {
  6.         //handle onclick
  7.       }
  8.       obj.onmouseover = function() {
  9.         //handle onmouseover
  10.       }
  11.       return obj;//return a object which has memory leak problem in IE6
  12.     }
  13.     var dButton = document.getElementsById("d1").appendChild(createButton());
  14.     //skipped....
  15.  

You can use the following which doesn't:

JAVASCRIPT:
  1.  
  2. function createButton() {
  3.       var obj = document.createElement("button");
  4.       obj.innerHTML = "click me";
  5.       obj.onclick = function() {
  6.         //handle onclick
  7.       }
  8.       obj.onmouseover = function() {
  9.         //handle onmouseover
  10.       }
  11.       //this helps to fix the memory leak issue
  12.       try {
  13.         return obj;
  14.  
  15.       } finally {
  16.         obj = null;
  17.       }
  18.     }
  19.     var dButton = document.getElementsById("d1").appendChild(createButton());
  20. }
  21.  

More demos, proof of concept examples and the "finally" explanation is available on Hedger's blog: Finally, the alternative fix for IE6's memory leak is available

Posted by Chris Heilmann at 10:22 am
29 Comments

++++-
4.2 rating from 31 votes

Thursday, May 29th, 2008

Testing IE Versions Just Got a Little Easier

Category: Microsoft

Testing your sites on different versions of Internet Explorer has always been notoriously difficult mainly due to the fact that Microsoft prevents you from running to different versions of the browser in Windows. Sure there have been solutions to get around this limitation but in my experience, they've always caused unexpected results and instability for the operating system or required you to run a VM. Not ideal.

Jean-Fabrice RABAUTE, the man behind the IE debugger DebugBar, has come up with a nice solution he's called IETester. This free tool allows you to have the rendering and javascript engines of IE8 beta 1, IE7 IE 6 and IE5.5 on Vista and XP, as well as the installed IE in the same process.

You can check out IETester in action below:


ScreenCast IETester from WebInventif.fr on Vimeo.

Posted by Rey Bango at 7:00 am
27 Comments

++++-
4.6 rating from 43 votes

Friday, April 4th, 2008

ASP.Net Ajax Site and Silverlight

Category: Microsoft

Silverlight on MS Ajax Page

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?

Posted by Dion Almaer at 2:10 pm
11 Comments

-----
-937499997.5 rating from 32 votes

Friday, March 28th, 2008

Doloto: Code Splitting for Network-Bound Applications

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:

Doloto

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.

Posted by Dion Almaer at 7:48 am
1 Comment

++---
2.4 rating from 19 votes

Wednesday, March 5th, 2008

Dynamic Silverlight Launched: Ruby and more in the browser

Category: Microsoft, Ruby

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.

Posted by Dion Almaer at 10:43 am
2 Comments

+++--
3.5 rating from 21 votes

Tuesday, March 4th, 2008

Silverlight Offline and AIR

Category: Adobe, Microsoft

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

Posted by Dion Almaer at 5:50 am
1 Comment

++---
2.6 rating from 11 votes

Friday, February 29th, 2008

Windows Live Teasers before Mix

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:
  1.  
  2. try {
  3.   var hash = window.location.hash.substr(1);
  4.   if (window.location.replace == null)
  5.     window.location.replace = window.location.assign;
  6.   window.location.replace("about:blank");
  7.   var name = hash.split("/")[0];
  8.   var win = null;
  9.   if (name && (name != ".parent"))
  10.     win = window.parent.frames[name];
  11.   else
  12.     win = window.parent.parent;
  13.   if (win.Microsoft) {
  14.          win.Microsoft.Live.Channels.Mux._recv_chunk(hash);
  15.   }
  16. } catch (ex) {
  17.   /* ignore */
  18. }
  19.  

You can also use a high level widget to embed chat, which you can see on Dare's space:

Windows Live Messenger

Posted by Dion Almaer at 6:53 am
4 Comments

+++--
3 rating from 7 votes

Friday, January 25th, 2008

Microsoft JavaScript Memory Leak Detector

Category: Microsoft, Utility

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.

Posted by Dion Almaer at 9:12 am
10 Comments

++++-
4.8 rating from 34 votes

Tuesday, January 8th, 2008

Ajax.NET: Move to ASP.NET Ajax with PageMethods

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.

Posted by Dion Almaer at 7:55 am
2 Comments

+++--
3.5 rating from 14 votes