February 12, 2008 | Comments: (0)
You can't know how much it excites me to hear that Microsoft is designing yet another computer language. Why, what a novel idea! It isn't like there were hundreds of new computer languages designed every year. If that were the case, there would be conferences about the subject. Oh, wait: that's how we first heard about this one, at the Lang .NET conference on the Redmond campus.
But it's a declarative language! Ah, yes: that eliminates maybe half of the languages proposed every year. "Declarative" is an awfully broad term, with multiple meanings. Standard ML is considered declarative, and so are its derivatives OCAML and F#.
Prolog and rule-based AI systems are considered declarative. You declare the rules: the logic engine decides how to run them. SQL queries are declarative: you describe the data you want to see, and the query optimizer figures out how to get it out of the database.
Haskell is considered declarative as well as functional, not to mention that it has monads. Don't ask me to explain monads in the context of functional programming: it's not a short answer. The "Summarizing Proust" contest isn't on today, thank you very much.
Back to declarative languages. XAML is a declarative language for the domain of graphics. It was designed as an extension of XML. It's such an expressive language that Charlie Petzold, arguably one of XAMLs most vocal proponents, built himself a alternative to Microsoft's XAMLPad called XAML Cruncher, so that he could "interactively type XAML code and see the object it creates." In Visual Studio 2008, Microsoft included a bidirectional, split-screen XAML designer, so that you can create XAML by dragging and dropping objects and by typing XAML code, with the ability to freely switch back and forth between the two methods. I freely admit to needing these tools; I can almost never write XAML that will display correctly on the first try.
Watching the Connected Systems Division (CSD) at Microsoft over the years, it has been clear that they have been on a code-reduction path. Why? SOAP was invented by Don Box and others to be an XML-based lingua franca for communication among disparate computer applications and systems. The functional deficiencies of SOAP were addressed by the WS-* series of standards, to give it security, authentication, reliability, and so on.
All of those standards made it harder to write conformant client and server code, raising the complexity by orders of magnitude. CSD engaged in a series of efforts to counter this by raising the level of abstraction for programmers developing connected systems. Web Services Enhancements (WSE) for Microsoft .NET cut the amount of code you needed to write drastically, but not enough for mere mortals.
Windows Communication Foundation (WCF) brought the amount of code down by another order of magnitude or so, partly by using attributes in code and by depending on XML-based configuration files. Attributes are of course one approach to making a language more declarative, and configuration files are another.
Looking at WCF in Visual Studio 2008, it seems like the classes and attributes and design tools are fairly mature, but are still built on top of the general-purpose C# language and the .NET Framework. I wouldn't be at all surprised to hear that the CSD architects decided to try starting over from scratch with a new language that would raise the level of abstraction and reduce the amount of code that needed to be written for a connected application by another order of magnitude. But it's not like nobody else has ever tried that: there's a robust research community working on that kind of problem.
I can guess about the process they're going through, but I can't guess what the outcome will be. It's an emergent experiment, and there are a dozen ways it could go. Nevertheless the criteria are kind of obvious:
High level of abstraction? Check.
Regularity of syntax? Check.
Easy to write? Check.
Easy to read and understand? Check.
Suitable for connection to disparate systems over multiple protocols? Check.
Posted by Martin Heller on February 12, 2008 07:35 AM
August 24, 2007 | Comments: (0)
Charlie Petzold was one of the pioneer Windows development writers, along with Paul Yao and a few others. I didn't write my first Windows development book until 1992, and by then Charlie's books were so well-established that I consciously positioned Advanced Windows Programming as the book to read after you had already grokked Petzold's Programming Windows.
Charlie's latest book is 3D Programming for Windows (Microsoft Press, 2007, 448 pp., $39.99, ISBN 9780735623941). It's no surprise at all to me that the book is a beauty of clear explication, filled with illuminating examples, and backed by a Media3D library that implements many of Charlie's techniques.
If you like 3D programming, aren't averse to XAML, and have access to Windows Vista or Windows XP, go buy this book. If you're in any doubt, try reading Charlie's blog, where he has been discussing the library and other material from this book for the past few weeks.
Posted by Martin Heller on August 24, 2007 02:47 PM
August 09, 2007 | Comments: (0)
Silverlight: How to Set Up for Development
After downloading all the new Microsoft tools I told you about on August 1st, I was a bit confused about how best to set up for Silverlight development. It was clear to me that Visual Studio 2008 beta 2, the Silverlight Alpha add-ins for Visual Studio 2008, and the Expression Blend v2 August Preview were the right tools for developing Silverlight 1.1 applications with the Silverlight 1.1 Alpha refresh SDK.
But what about Silverlight 1.0? Do the two SDKs install side by side? What are the best tools for Silverlight 1.0 development? So I asked Microsoft, through the PR person assigned to the Silverlight account.
The advice I got back was simple: use the Silverlight 1.1 development tools to target either 1.1 or 1.0. The two SDKs do not install side by side, although you can certainly install them on separate machines or in separate Virtual PCs on the same machine. However, Silverlight 1.0 is a proper subset of Silverlight 1.1, and the tools let you target either one.
There is one small disadvantage of doing this: the Silverlight 1.0 RC client updates itself automatically, but the Silverlight 1.1 client does not. Technical Evangelist Tim Sneath explains:
If you're running the 1.1 builds (as I'm sure most developers are), we don't auto-update your machine. Since you're on the "development" fork, we require you to manually update your machine (simply run the install from the link here and your machine will get the latest bits). The current 1.1 bits are v1.1.20806.0 (the build number matches, just the major and minor version numbers are different).
Posted by Martin Heller on August 9, 2007 07:15 AM
May 11, 2007 | Comments: (0)
Silverlight Examples that Actually Work
When I posted about the book Getting Started with Silverlight last Friday, I made the incorrect assumption that the Silverlight examples mentioned in Shawn's book would work. Unfortunately, some of them were for a previous version of Silverlight, and Microsoft made breaking changes for the beta release. Oops.
In fact, the only Silverlight samples I have found that actually do work are the SDK samples listed on the MSDN Silverlight Dev Center page, the samples listed on the Silverlight home page, and the samples in the Silverlight community gallery. There is quite a bit of overlap between the Dev Center and the gallery, by the way, although that should change as more people contribute to the gallery.
Scott Guthrie has posted a long blog entry that covers the Silverlight development plan for 1.0 and 1.1, and talks about the .NET Dynamic Language Runtime (DLR). Scott also includes links to a lot more content: MIX talks, an interview, some video tutorials, and a poster.
Also, Rob Unoki has posted a tantalizing blog entry about Silverlight and the .NET Compact Framework. Would you believe Silverlight on a smart phone?
Posted by Martin Heller on May 11, 2007 06:00 AM
May 04, 2007 | Comments: (0)
Getting Started with Silverlight
Shawn Wildermuth, who wrote the excellent book Pragmatic ADO.NET (Addison-Wesley, 2003, 357 pp, $44.99, ISBN 0-201-74568-2), has been working closely with the Silverlight team at Microsoft. Just in time for the release of Silverlight at MIX07, O'Reilly has released Shawn's "short cut" on Silverlight electronically on the Web.
Getting Started with Silverlight (O'Reilly, 2007, 62 pp, $9.99, ISBN 0-596-51068-3) "introduces you to Silverlight's key features and shows you how to tap into its functionality to spice up your HTML and ASP.NET pages." The book is written to the February Silverlight CTP, which was a preview of Silverlight 1.0, so it covers programming Silverlight with JavaScript, but not programming Silverlight with managed code or using extensible controls.
I'm a fan of Shawn's technical writing, and Getting Started with Silverlight confirms my high opinion. Shawn has a good feeling for what you need to know, and how to present it clearly.
Here's the table of contents:
Why Silverlight? ............................ 2
What Is Silverlight? ........................ 3
Working with Silverlight XAML........... 7
Comparing Silverlight and WPF......... 17
Development Model ..................... 19
Using Silverlight with ASP.NET ........ 42
Using Tools ................................ 54
Finding Examples in the World ........ 61
Summary ................................... 61
For Further Reading ..................... 62
Here's a very short excerpt:
Finding Examples in the World
Beyond the resources that are available from the Silverlight DevCenter (http://msdn.microsoft.com/silverlight), there are a number of very good examples of Silverlight working on the Web today. They include:
• Dr. Greenthumb (a Silverlight Game): http://labs.blitzagency.com/?p=50 (http://tinysells.com/82)
• Silverlight Scratchpad: http://notstatic.com/archives/65 (http://tinysells.com/83)
• Silverlight Egg Timer: http://blogs.interfacett.com/simon/2006/12/11/wpfe-egg-timer.html (http://tinysells.com/84)
Posted by Martin Heller on May 4, 2007 07:00 AM
May 01, 2007 | Comments: (0)

At Microsoft's MIX07 conference, the keynote was mostly about Silverlight. What is Silverlight, and why should we care about it?
Officially, Silverlight "is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web." In other words, it's a browser plug-in that enables a subset of the capabilities of the Windows Presentation Foundation over the Web. It was previously called WPF/E.
From the user's viewpoint, to enable Silverlight, you download and install a 1.4 MB plugin, and then you can view Silverlight content in IE, Firefox or Safari. From a developer's viewpoint, once you have the tools installed, you instantiate Silverlight by including some JavaScript helper files from your HTML, and then you can display and script XAML files in your Web pages.
Microsoft cites four key benefits of Silverlight:
1. Compelling cross-platform user experiences
2. Flexible Programming Model with Collaboration Tools
3. High-quality media, low-cost delivery
4. Connected to data, servers, and services
Two versions of Silverlight were announced Monday: the V1.0 beta, and the V1.1 Alpha. What's the difference? The diagram below summarizes what's in each release:
.png)
Again, why should we care? If you're a cynic, Silverlight just looks like Microsoft's answer to Flash. But if you like the idea of XAML-based display, or the idea of programming in managed code, then Silverlight offers a compelling model for programming the Web client.
Posted by Martin Heller on May 1, 2007 12:38 PM
TOP STORIES
ADDITIONAL RESOURCES

- Do you have the power to resolve technical issues with one call?
- Take control of your content- leverage Microsoft SharePoint
- Keeping the E-Mail Flowing

- Monitor the core and troubleshoot the access layer
- SGI Adaptive Data Warehouse: Building a High-End Oracle Data Warehouse
- Five Steps to Secure Outsourced Application Development


