Archive

Archive for the ‘Ajax’ Category

Microsoft Silverlight rivals Flash, AJAX

Microsoft’s much-touted and much-anticipated RIA (rich Internet application) entry, Silverlight, lets Web developers and designers create “rich, engaging user experiences with 2-D graphics, animation, images, media, and video,” to use Microsoft’s own description. Silverlight competes in this arena with Adobe Flash and Flex, with OpenLaszlo and Curl, and with a variety of AJAX (Asynchronous JavaScript and XML) frameworks.

As I’ve written before, RIAs comprise a spectrum of application types and technologies. Silverlight is Microsoft’s entry in the middle of the “weight” spectrum. It joins the Microsoft AJAX Library, which falls at the lightweight end, and Microsoft .Net Smart Client applications, which occupy the heavyweight end. Microsoft Silverlight 1.0 incorporates a subset of the .Net Framework and supports JavaScript. Microsoft Silverlight 1.1, currently in alpha tests, incorporates a larger subset of the .Net Framework and supports JIT-compiled C#, Visual Basic .Net, IronPython, and (eventually) IronRuby as well.

Unlike many of Microsoft’s other offerings, Silverlight was designed from the ground up to be a cross-platform, cross-browser plug-in. It currently supports Windows and Mac OS using the Internet Explorer, Firefox, and Safari browsers. In the future, it will also support Linux and the Opera browser.

As you might expect from Microsoft, Silverlight is supported by excellent development tools. You don’t absolutely need those tools: Silverlight 1.0 is largely straightforward enough that you could develop applications using free HTML and JavaScript editors if you wished, supplemented by a free XAML (Extensible Application Markup Language) editor, such as XAMLPad from the Windows SDK or Charles Petzold’s XAML Cruncher. On the other hand, the time savings from using Visual Studio for development and Expression Studio for graphics design and video preparation should more than offset their cost.

The Silverlight 1.0 SDK can install a Silverlight JavaScript Application project template into Visual Studio 2005. For the best development experience, Microsoft recommends using Visual Studio 2008, which includes Silverlight 1.1 C# and VB project templates and is currently in beta test, and a preview version of Expression Blend 2. Setting up the Silverlight 1.0 JavaScript Application project template in Visual Studio 2008 takes some effort, which I discuss in this blog entry.

Silverlight is a browser plug-in and, as such, needs to be launched from an HTML page via JavaScript. The Silverlight runtime can parse and render XAML to the browser, animate XAML elements, and respond to user input and other events. It can also download and display media, and handle “ink” input from a pen, a touchscreen, or a mouse.

The Silverlight 1.0 plug-in provides mechanisms for setting and changing the XAML content to be executed by the runtime; for retrieving objects from the runtime; for manipulation of objects through JavaScript; and for downloading image, text, glyph, audio, and video content incrementally.

I found Silverlight development easy to learn, but I had a head start: I was already familiar with XAML, JavaScript, HTML, and Visual Studio. Expression Blend was new to me, but was similar enough to other graphical design tools that I didn’t have to climb much of a learning curve. That said, I’m no graphical designer: I appreciate the division of labor between programmers and designers that is facilitated by having XAML and code-behind files.

he online Silverlight QuickStarts should give most developers enough of a feel for the product to get started with simple projects. Additional reference information on MSDN and in the SDKs helps a bit, but a number of Microsoft Technical Evangelists and bloggers have created videos to make the process even clearer. Some of the videos go further afield, covering useful topics you never expected to hear about from Microsoft, such as integrating Silverlight with PHP and Java, and using SVG (Scalable Vector Graphics) assets in Expression Design. 

Silverlight 1.0 performance is adequate as long as you don’t do too much work in JavaScript; it’s certainly more than adequate for streaming videos (which is done by the runtime) and simple XAML animations. I found Silverlight 1.0 sites to be about as responsive as AJAX, Flash, and Flex sites, but less responsive than Curl sites.

The use of JavaScript in Silverlight 1.0 helps make Silverlight compatible with multiple browsers and operating systems, but it also limits Silverlight’s performance. There are two relevant issues. First, JavaScript is an interpreted language that is inherently much slower than native code. Second, when JavaScript is running, the Silverlight plug-in stops drawing. Silverlight 1.0 can be used for simple user interfaces that don’t spend much time processing events, but it’s not appropriate for creating highly interactive applications, such as games. For that, consider Silverlight 1.1.

Now that Silverlight 1.0 has been released, the Silverlight team is devoting most of its energy to Silverlight 1.1, now in alpha, which has a number of additional features over 1.0. Foremost among these is support for development in C# and Visual Basic .Net, offering a speed boost over JavaScript of roughly 200X, judging by the Bubblemark animation test. The Silverlight Chess demo, however, reveals the computational speedup is close to a factor of 1,000. I wouldn’t be surprised if the final computational speed of Silverlight 1.1 applications was comparable to that of Curl applications, and Curl is fast enough to do ray-tracing.

Silverlight 1.1 supports a larger subset of the .Net Framework than Silverlight 1.0, enabling the development of some fairly serious applications, not to mention some fairly cool games. In Silverlight 1.1 you can do networking and communication, process XML, use isolated local storage, upload files, and use compiled dynamic languages such as IronPython.

But Silverlight 1.1 is still a work in progress. In the meantime, should you jump for Silverlight 1.0? If I had a site that could benefit from streaming media and simple animations, and was intended for viewing on Windows and Mac computers, I wouldn’t hesitate to use Silverlight 1.0, especially if I had a development staff familiar with Visual Studio and XAML. On the other hand, I wouldn’t spend the time and money needed to convert an existing Flash or Flex site to Silverlight 1.0. If performance were an issue, I’d revisit the question when Flex 3 and Silverlight 1.1 are released.

If I had a site that displayed embedded videos from YouTube, I’d have to decide if the additional interactive features I could get from Silverlight made up for the additional bandwidth cost. If my videos fit within the free 4GB hosting restriction of Silverlight Streaming by Windows Live, bandwidth wouldn’t be an issue, and I’d strongly consider moving my content.

Advertisements
Categories: Ajax, Flash, Microsoft, Silverlight

Single Ajax Interface For Yahoo Mail & IM Coming

This morning Yahoo will announce that they will integrate an Ajax version of Yahoo Instant Messaging directly into the new Yahoo Mail beta. Unlike Google’s integration of Google Talk with Gmail earlier this year, Yahoo is combining the products into a single interface. Yahoo says the new features will launch in the next two months.I saw a beta of the product earlier today at the Web 2.0 Summit in San Francisco. When addressing a new email, a pop-up window appears to select an address book suggestion, along with the option to send an instant message if the person is currently online. If the user selects an instant message instead of an email, a slightly different interface appears that allows the two users to send instant messages to each other. If one user drops out of the conversation, the other user has the option to auto-paste the conversation into an email and finish the conversation. See the screen shot below for a visual of how the product will appear. This is all done in the browser with Ajax.

Users will quickly get used to flipping quickly between email and IM depending on “presence” – whether or not the person they are communicating with is online. IM conversations will eventually be archived and stored in the same manner as emails, allowing users to drag old conversations into folders in the sidebar.

An additional notation is also being made in the sidebar to let email users know which of their stored contacts are online currently. Multiple current IM conversations are organized by horizontal tabs.

Yahoo Mail continues to surge in worldwide and U.S. usage v. Gmail – Yahoo claims that Yahoo Mail gained more new U.S. users that in the first nine months of 2006 than total U.S. Gmail users to date. Comscore backs this claim up, reporting 250 million worldwise users of Yahoo Mail to Google’s 51 million (September 2006) (see chart to left).

The number of IM users worldwide is still very small compared to web-based email users – 80 million IM users v. nearly 500 million web mail users. Yahoo hopes to introduce IM to the large percentage of Yahoo webmail users who’ve never tried IM.

We continue to prefer Yahoo Mail over Gmail because Yahoo Mail allows POP access to third party email services, whereas Gmail only allows access to Google’s own email service.

Categories: Ajax, News, Open Source, yahoo