Archives

Archives / 2006 / March
  • [MIX06] Wrapup

    Yes, I'm aware the conference ended 6 days ago. I returned to a pretty full workload, so it's taken me a few days to get my notes typed up. I'm finally ready to say goodbye to Mix06; thanks for bearing with me.

    Read more...

  • [MIX06] IE Standalone - Update

    I talked with Dean Hachamovitch (the IE General Manager) a few times at Mix06 about why I feel Virtual PC is not a complete or practical solution to web developers who need to migrate from IE6 to IE7. I recommended a few alternate ideas in the very likely case that they just can't support a side-by-side install of IE in the near future. I think this is an important issue - it's a first experience sort of thing for web developers, many of whom have only ever supported one version of IE. I'm quite at home with VPC, but I don't think we should expect that from web developers who feel inconvenienced to have to use a PC in the first place. It's important that web developers learn to like IE, and first impressions are important.

    Read more...

  • [MIX06] Corporate types to Microsoft - Don't Change A Thing!

    As a web developer who's into web standards, I cringed when I heard the feedback several corporate IT guys gave the IE team at Mix06:

    "Don't change too much! Don't release too often! Keep IE7 like IE6, but add some printing options!"

    I totally disagree with all of this, but I understand that the changes IE is making to become more standards compliant will be a major inconvenience to corporate IT shops who view IE as a stable platform. Who woulda thunk that IE7 would have swung towards standards compliance?

    This gave me a greater appreciation for the variety of opinion the IE team is hoping to satisfy with this next release - they're being asked to go in several opposing directions at once, and somehow seem to be keeping people pretty happy with how they're responding.

    Read more...

  • [MIX06] Making Your Site Look Great in IE7

    Web developers have come up with a variety of techniques for dealing with a quirky, stagnant browser that continued to dominate the market for the past few years. Most chose the low road, doing whatever it took to look good in IE and ignoring the other browsers. Those who tried to build standards compliant sites relied on a slew of CSS hacks to include adjustments for IE without affecting other browsers.

    Read more...

  • [MIX06] WPF/E

    WPF/E (Windows Presentation Framework Everywhere) is conceptually similar to Flash. It allows for rich client functionality in the browser through the use of a browser plugin. It supports audio and video, vector graphics (2D only), etc. It was announced at the PDC in 2005.

    I attended the WPF/E session at Mix06 since I'd ignored it to this point and wanted to get an idea of what it's about. I was pretty skeptical - how is this going to be any better than Flash, anyhow?

    I'm impressed.

    WPF/E uses a browser plugin to display XAML[1], Microsoft's XML based language for rich applications.[1] This is an advantage in that it's completely text based and can be written in any text editor. Of course Microsoft hopes you'll use Microsoft Expression Web Designer, but it's entirely possible to build WPF/E for free. There are some open source initiatives to build Flash on free tools, but I didn't see any that offer any kind of GUI support.

    While the WPF/E object can be manipulated from Javascript (as you'd expect), it can also be programmed in VB.NET and C#. How can a plugin running in Firefox on a Mac support .NET code? The control includes a lightweight MSIL engine! That's pretty impressive when you consider that the target size for the plugin is under 2 MB.

    The IL engine supports a small subset of the .NET runtime suitable for WPF/E:

    Base

    • XML / XAML Parser
    • Accessibility
    • Input and Eventing
    • Property System

    Media Integration Layer

    • 2D
    • Test
    • Audio
    • Video
    • Imaging
    • Animation
    • Composition Engine

    Other

    • Core Controls
    • Container Controls
    • Basic Layout

    I asked about support for screen readers and search engine spidering. I was told that Accessibility support is included (note the support in the Base libraries above). As for searching, they're working with the major search engines to support spidering inside the WPF/E, but since the XAML is all text based this should work pretty well.

    The video support is interesting - the media layer apparently has a custom video stack supplied by the Windows Media team. It looked like it only supports Windows Media, but doesn't require that the player be installed since it runs its own video rendering stack. At this point there's no hardware acceleration, although that's planned.

    It's planned for CTP release in 2006 with a go live date in first half of 2007.

    [1] XAML is similar to SVG. It's different because it lays on top of a different object model.

    Read more...

  • [MIX06] Day 2 - ATLAS

    Atlas is an AJAX system for use with ASP.NET. Here are a few interesting notes from the Atlas session if, like me, you're generally aware of Atlas but haven't really dug into it that much.

    Two client side script formats

    In addition to Javascript, Atlas supports a new script type: Text/XML. XML is not a known script type, so it's ignored by browsers. The Atlas client side script parses it and converts it to standard Javascript. There are a few advantage`s to this approach:

    • This allows you to program using declarative markup rather than wiring things up in code. This is similar to HTML or SQL - you describe what you want done, not how to do it. The Atlas runtime takes care of the details of turning your specifications into working script.
    • XML style markup will allow for designer tools to edit the Atlas script; this would be much more difficult with Javascript.
    • This is easier for the framework to support since it can use standard XML output systems.

    You can see some sample code and read more about it on Nikhil's blog.

    HTML / Javascript separation

    AJAX functionality is activated through CSS classes rather than directly calling Javascript functions from HTML elements via event attributes such as "onclick". This clearly separates the display behavior (CSS and Javascript) from the content (HTML). I've been a fan of this markups based behavior  approach for a while, for both practical and philosophical reasons.

    The practical advantages parallel the advantages of n-tier software design and semantic web design - clear separation of responsibilities yields simplicity, which pays of in the maintenance and upgrade phases. This clear separation also allows for gracefully degrading if, for instance, Javascript isn't supported on the user's platform.

    The philosophical benefit is similar - HTML should describe content, and CSS / Javascript should describe behavior. The practical benefits above naturally fall out when things are structured correctly.

    Ready for Prime Time?

    The obvious disclaimer here: I haven't used Atlas. I spoke to two ASP.NET developers who have done some pretty intense AJAX coding on ASP.NET who have used Atlas, and they told me that it works great for simpler projects but didn't work great for them in actual projects. One person told me that the UpdatePanel control only worked in ASP.NET pages, not user or server controls due to the control event order. I got the impression that it's advancing very rapidly, but is still a little difficult to use in actual project circumstances.

    Now, as I said, these are second hand accounts. I'm only passing them along to present balanced coverage and relay some real world impressions.


    Some other random notes I jotted down:

    • Uses JSON / REST.
    • Supports client side disconnnected recordset and databinding.
    • Allows easily "ATLAS enabling" a .NET ASMX webservice.
    • Extension method through extenders.

    Read more...

  • OPML 2.0 Will Support Includes

    OPML is a simple outline format which has been most commonly used to manage RSS feed lists. The problem I've run into is that it's a static document, so the feed list needs to be manually updated. I subscribe to a lot of feeds, many of them on group blog sites. It would be great to be able to subscribe to an OMPL link and automatically get any newly added feeds in my aggregator.

    The OPML 2.0 (draft) spec is out for review, and it has support for includes. The new include type allows you to link to an OPML list by a URL and you'll always be in sync. When this spec is finalized and implemented in aggregators, this will cut my feedlist in half. Cool!

    Here's an example of an OPML that includes the entire weblogs.asp.net feed list (assuming I'm reading the spec correctly):

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <opml 
    version="2.0">
        <
    head>
        <
    /head>
        <
    body>
            <include 
    text="weblogs.asp.net" url="http://weblogs.asp.net/Opml.aspx" />
        <
    /body>
    <
    /opml>

    Read more...

  • IE Update disables Flash. Flash navigation is stupid. If you have to embed Flash, use FlashObject.

    Due to the Eolas patent case , a new update to Internet Explorer will no longer automatically allow user interaction with plugins which are embeded in webpages. Think Flash navigation, music players (Quicktime, Windows Media, Real Audio), Java applets, etc. The applets will be usable, but only once you enable them, usually by clicking on them. (see the demo screencast here ).

    The update is already out on Windows Update - it's optional now, but I'm sure it will be mandatory within the next few months. It's described as a minor update, but I think people will be pretty surprised by this one.

    Now, I can't say that I'm heartbroken by how this will affect my browsing experience. For one, I don't use IE all that much, and who knows if Eolas will ever enforce this patent against open source browsers since there's no money in it. More than that, though, I dislike most embedded applets that do things I didn't tell them to do . I don't like web pages that start playing music when a page loads. I think Flash navigation is annoying, inaccessible, and completely unnecessary. If a page is going to make good use of Flash or Java - actually do something interesting, like a screencast or a game - then a little click to activate it isn't that big a deal.

    As a developer, though, this is kind of a pain. The thing is, there's a legal loophole that will allow automatic activation of applets as long as they're loaded via an external file, so some trivial javascript can load an activated applet without any user interaction. The reason is that the patent only covers automatic applets as long as they are directly included in the HTML file, so loading them via an external javascript file is fair game. So, in reality this is only going to be an inconvenience for web developers. Clients will know that other sites have dancing clowns and disco in their menus, so it can be done. Just do it.1

    Now, the code to load Flash files (or other applets) from javascript is pretty simple, but I sure hope professional web developers will put some thought into this and avoid the temptation to just hack a bunch of javascript includes together and call it done. Here are two better solutions:

    1. Get rid of it. This especially applies to Flash navigation, for tons of reasons:
      • It's not cool anymore. Really. It stopped being cool about five years ago, now it just looks amateur. Sure there are exeptions to this rule, but odds are you're not one of them.
      • It's not accessible, and probably not very usable. That could cost you users, but more importantly it could get you in legal trouble.
      • It hurts your search engine rankings and site searchability. Some search engines will index the Flash file, but they don't interpret it. If there's any logic, database action, or external files involved there's a good chance the links won't be followed.
      • It's not very maintainable. Ease of maintenance and updatability is very important. Sites that aren't fixed and updated don't get used. It's easier to fix and deploy a spelling error or address change in a text based HTML file than in a Flash application. With Flash being one big file, you really should retest the whole thing every time you redeploy; with HTML I can make spot changes and be confident I haven't broken anything. A website built with web standards can be redesigned with a CSS file change (ala csszengarden); Flash redesigns are much more work. As a side note, in my experience no one properly versions their Flash source files. It's very rare that anyone can even find their Flash source files a year after the site has gone live.
      • It's almost always totally unnecessary. You can build really nice navigation that's cool, accessible, searchable, and maintainable with CSS and minimal javascript. You can get fancy effects - fades, animation, etc. - with some simple javascript includes and a few minutes enabling the effects via CSS (see my previous article on that here). The point is, if you're using Flash to animate and fade you're doing things wrong.
    2. If you must use Flash, use FlashObject. There are still more more problems with Flash, but FlashObject solves them:
      • There is no way to embed Flash in a page that is (a) cross-browser and (b) valid HTML / XHTML. Macromedia's sample code uses an <EMBED> tag inside an <OBJECT> so it will work in most browsers, but <EMBED> isn't a valid HTML / XHTML tag.
      • Plugin detection isn't handled by browsers. If the user doesn't have Flash installed, or has it disabled, your site looks stupid and isn't usable. Note that Flash won't currently install under non-admin user accounts, so the possbility that your user won't have Flash installed may grow over time.

        FlashObject solves both these problems - plus the disabled by default issue I mentioned before - by replacing HTML content via a javascript include. You build a page in valid (X)HTML and include a placeholder div where your Flash content will go. Then you write two lines of javascript which tells the FlashObject library to replace your div with the Flash content. The div can contain alternative content that's valid, accessible, searchable, etc., which will be be delivered to those who can't or won't view your Flash content (including search engine spiders). Since this solution loads the flash via the external FlashObject javascript include, it will be automatically enabled as well - which means that if you're using another plugin, you should first look for a prewritten include that uses a similar, and if you have to write your own that you follow this model: replace valid HTML via a simple javascript call. Here's some sample code, quoted from the FlashObject page:
    <script type="text/javascript" src="flashobject.js"></script>
            
    <
    div id="flashcontent">
      
    This text is replaced by the Flash movie.
    </div>

    <
    script type="text/javascript">
       
    var fo = new FlashObject("movie.swf", "mymovie", "200", "100", "7", "#336699");
       fo.write("flashcontent");
    </script>

    1 All of the major plugin providers have provided references on how to fix this - Apple, Macromedia, Microsoft, and Real. I don't recommend following them, though, which is why they're just in a footnote.

    Read more...