Feb 14

Microsoft Declares

Comic, Microsoft, Tech with tags: , 2 Comments »

Microsoft Declares

Paul Krill asked Bill Gates about declarative languages and how they are the future (and ironically the past!). Bill talked about some of the work happening at Microsoft:

“Most code that’s written today is procedural code. And there’s been this holy grail of development forever, which is that you shouldn’t have to write so much [procedural] code,” Gates said. “We’re investing very heavily to say that customization of applications, the dream, the quest, we call it, should take a tenth as much code as it takes today.”

“You should be able to do things on a declarative basis,” Gates continued. But this has not caught on partially because of weak data models — first Codasyl and then relational. Stronger data models since have emerged, such as rich schemas around XML as well as modeling work being done by Microsoft and others, Gates said. “We’re bringing the data models up to be much, much richer, and we think in that environment, a lot of business logic can be done in a declarative form. Now, we haven’t totally proven this yet. We’re doing a lot of internal developments ourselves that way,” including some Microsoft business applications, he said.

“We’re not here yet saying that [a declarative language has] happened and you should write a ton less procedural code, but that’s the direction the industry is going,” Gates said. “And, despite the fact that it’s taken longer than people expected, we really believe in it. It’s something that will change software development but more like in a five- to eight-year timeframe than overnight,” he said.

I am guessing that the work of Doug Purdy, ChrisAn, and Don Box is fitting into this world, as well the mentioned work of Brad Lovering.

But…. maybe the future is a port of Jelly ;)

Jan 13

It’s a lot of money

Google, Microsoft, Tech No Comments »

Microsoft as a company still posts considerably higher revenue than Google does. Microsoft’s executives last week trumpeted the fact that the company — consisting of everything from the Office productivity suite to the Xbox 360 game console — surpassed $50 billion in annual revenue for the first time in the fiscal year ended June 30.

Two companies. Lots of money.

Nov 04

Microsoft Sync Framework != Google Gears (even if the press wants to make it look that way)

Google, Microsoft with tags: , , 3 Comments »

I saw Microsoft’s Answer to Google Gears popup in my news feed, along with Mary Jo’s piece itself: Microsoft delivers first test build of its online-offline sync platform.

I was excited to read about the sync platform and see how it compares with the Database, LocalServer, and WorkerPool components that you get with Gears.

Instead I end up at the main documentation which makes the sync framework look nothing like Gears at all.

Instead you see the providers:

  • Sync Services for ADO.NET: Synchronization for ADO.NET enabled data sources
  • Sync Services for File Systems: Synchronization for files and folders
  • Sync Services for SSE: Synchronization for Simple Sharing Extensions (SSE) such as RSS and ATOM feeds

This looks interesting from a client-side perspective, and I want to take some time to look at the sync API itself and see what good stuff we could potentially use in Gears. Microsoft has had to do various sync protocols over the years, so I am sure there is a lot to learn, but this isn’t a Gears rival in its current form.

Oct 09

Silverlight is to RIA as Giuliani is to the Republican party?

Adobe, Microsoft, Tech No Comments »

I was speaking to a friend, who is an open Web kinda guy, and we had a giggle when we looked over at the Adobe and Microsoft Silverlight booths and he said “maybe Flash and Silverlight will split the Republican vote”.

Now, the idea of splitting the Republican vote is one I like to think about, but I hadn’t thought about it with the RIA context. By adding Silverlight as a platform we will see more flash rectangular boxes right? Maybe, maybe not.

Will the fight for good RIA people have some move from Adobe to Microsoft? Or will the entire pie grow by a large amount?

In the fight itself, will Silverlight win as it is a “new” look. This is where the Giuliani comparison really fails. Adobe has actually done a really good job. It can’t be linked to George Bush (who hasn’t). But maybe the social conservatives who don’t like Rudy because of his views on abortion, or the odd picture of him in a dress, can be linked to certain Adobe fans?

Watching the huge booths of both Adobe and Microsoft one thing is for sure, the primaries are here, and the general election is coming.

The Open Web needs to be ready.

Feb 12

Enso Launcher: Windows people can get quickly silvered

Microsoft, Tech 6 Comments »

You often hear Mac folk talking about Quicksilver and how they love it. It is more than a launcher.

Now there is something interesting in the Windows world (better than adding shortcut keys to your applications).

Enso Launcher is now out in the wild.

I first saw Enso Launcher at the last Ajax Experience, as Aza Raskin was showing it off (and his love for Python).

They also released Enso Words showing off spellcheck everywhere.

So, if you hate the mouse and you are a Windows bloke, open http://www.humanized.com/products/enso/launcher/ and go.


Oct 02

LINQ 101 to Ruby 101 to Groovy 101

Groovy, Microsoft, Ruby, Tech 2 Comments »

Jon Udell posted some code that he was playing with to test out LINQ.

The code takes his blog format, and filters based on the XML, and some internal datastructures.

Then Sam Ruby ported it to Ruby.

For some reason I just ported it to Groovy:

def d = ["2005-09" : "September 2005", "2005-08" : "August 2005"]
def a = ["greasemonkey", "ajax"]

def rss = new XmlParser().parse("blog.xml")

def xml = new groovy.xml.MarkupBuilder(new PrintWriter(System.out))

rss.channel.item.findAll { item ->
d.keySet().any { day ->
t(item.date) =~ day;
} && a.any { tag ->
t(item.tags) =~ tag;
}.sort { x, y -> t(y.date) <=> t(x.date) }.each { i ->
xml.item() {
month(d[d.keySet().find { key -> t(i.date) =~ key }])

def t(node) { return node[0]!=null ? node[0].text() : '' }

There are some uglies in there (especially the “node to text” pain), but I do prefer the native build syntax that we have in Ruby and Groovy, compared to nesting new XElement("item", ....). They could easily add more sugar to make that work on the .NET side of course.

The other interesting differences are that I didn’t use XPath in the Groovy version, and the lack of SQL like stuff. Here it is just method chaining. No need for a special orderby, you simply do a sort. Of course, the beauty of LINQ is its polymorphism across XML, SQL, etc etc.

Update: New Version

John Wilson took out his namespace aware XmlSlurper (to access dc:date vs. date), and a new builder syntax that handle multiple objects:

def d = ["2005-09" : "September 2005", "2005-08" : "August 2005"]
def a = ["greasemonkey", "ajax"]

System.out << new StreamingMarkupBuilder().bind {
mkp.declareNamespace(dc: "http://purl.org/dc/elements/1.1/")

new XmlSlurper().parseText(blog).channel.item.findAll {item ->
d.any{entry -> item.date.text() =~ entry.key} &&
a.any{entry -> item.tags.text() =~ entry}
}.list().sort{x, y -> y.date.text() <=> x.date.text()}.each {i ->
item([{month d.find{entry -> i.date.text() =~ entry.key}.value}, i.date, i.title, i.tags])
Sep 25

War of the Web: Revenge of the Dynamics

Ajax, HTML, Java, JavaScript, Lightweight Containers, Microsoft, PHP, Perl, Ruby, Tech, UI / UX, Web Frameworks 933 Comments »

As I was watching “24 hour party people” on DVD, I heard the main character talk about the ebbs and flows of the music business. He is talking about the scene in Manchester at the end of the 70’s, and into the eighties. Moving from Joy Division to Happy Mondays and New Order.

I think that we are in a new chapter for the web, and as is often the case, the wheel of time is repeating history for us.

There are a few dimensions to the current war though. They are on the client side (DHTML Ajax vs. simple HTML vs. Flash/PDF vs. XAML) and on the server side (Rails vs. Java vs. PHP vs. .NET).

Let’s start at the beginning.

Perl: Birth of CGI

Do you remember how the web changed as it moved from static HTML connected content to dynamic websites? That came about due to CGI, and how our nice web server would now fork off our programs to generate the HTML.

I remember my first CGI programs were written in C, and Scheme. I quickly moved on though, and found the beauty, and craziness of Perl.

I spent quite some time with Perl, trying to get by without writing too much NSAPI and ISAPI code (oops, I guess that core dump hurts the entire server?).

I really enjoyed the community at that time. #perl was interesting (some of the time), and CPAN became the holy grail. As soon as you thought you needed something, someone had kindly put that functionality up into CPAN. I even have some of my own modules hanging out there, and helped with others.

Over a short time period, we had developed some fairly rich web modules. We didn’t have to work with $ENV{’SOME_CGI_ENVIRONMENT’}, or STDIN or the like. Our framework abstracted all of that for us, and gave us a simple model. We lauched at the folks who generated html via methods such as b("whee") and we stuck close to HTML itself, allowing our design teams to simply open the html files and see what their stuff looked like. We even had the notion of components, and special tags that you could create. <$mytag name=”…” /> was nice because the name of the tag was the key for the framework to dynamically discover that functionality. No config files, or interfaces, in the strict sense. The coupling was based on a name.

In retrospect, life was pretty simple for web development, a lot simpler than some of the frameworks we have today!

But, we moved from Perl. CGI was not the nicest for our high load servers. It was crazy to think that we would fork a process for every little request that came in, and that a Perl interpreter would start up, load the program, do the work and then die off.

We naturally moved to solutions such as mod_perl, and that helped. It was so new though that it was buggy and we had a lot of problems. Some of the problems had nothing to do with mod_perl itself, but due to laziness and side-effects.

When you work in an environment like CGI you can be a very bad man indeed. If you don’t close something correctly, or don’t play totally nice with resources, baaaah who cares? The server is going to kill me in 2 seconds anyway, so I will get my job done and have him kill me. In mod_perl world though, these programs start to live longer, and they get fat and oily.

Java: No more stinking processes!

Remember the beginning of Java (Oak!). We were building applets, and feeling the pain very early on.

Servlets were the big thing though. We ported our Perl based framework over, and were able to see significant performance improvements at the time. Some of the team loved the change, others hated the verboseness and static typing.

The nice threading model that Java gave us was huge though, even with the poor JVMs back then (Microsofts was by far the best remember!).

This is when we moved from the world of Perl to having Java start to take over. That isn’t to say that there wasn’t competition. In the waters we saw the lurkers of ColdFusion, ASP, and the beginning of the PHP revolution. Java came up with JSP to compete with these tag based approaches, but it was the advent of the rich MVC style frameworks that really spurred everyone on.

In my opinion Java is still in the hot-seat, especially in the corporate world.

Preparing for the server war

The troops are being gathered. Strategies are being worked out. We are currently getting ready for a new battle on the server side.

What’s happening?

  • Ruby on Rails: Whatever you think about Rails, it has lit a fire under the server side web development community. Many have jumped on the bandwagon, claiming real productivity improvements. Some of the PHP converts enjoy a richer language, which is still nice and dynamic, with a framework that enforces clean MVC techniques. Some of the Java community are frankly a little bored of Java, and enjoy the new challenge. They also love the freedom of the language, and the fact that they now have just ONE stack to worry about. Will the Rails buzz keep growing? Will it be the Perl of Web 2.0?
  • Java: Java isn’t going down without a fight. Some argue that the problem with web development in Java is that it has been too complicated and heavy for much usage. I have personally called for the need of a common stack for Java, and people have stepped up to the plate. On one side we have companies that will certify a set of technologies (JavaServer Faces + Spring + Hibernate). Then we get frameworks taking on simplicity themselves (WebWork now embedding Spring). Finally we have initiatives like JBoss Seam, which is trying to combine the component models of JavaServer Faces and the backend. Seam aims to give you the power of the Java tier, but also giving you a simple productive environment. So, Java frameworks are rising to the challenge of Rails, and we will soon see how much of the success of Rails is Ruby, and how much can be duplicated in other platforms.
  • PHP: We can’t discount PHP. A lot of “serious engineers” (read: anyone who isn’t a PHP developer thinks they are serious) poo poo the PHP world. Yet, by all accounts, there is a LOT of PHP development going on out there. PHP has the advantage of being something written JUST for the web. Take a look at how Wordpress came along (PHP based blogging software) and in no time at all there were thousands and thousands of plugins that you could simply drop into your Wordpress system. Literally, you drop in a file and you are done. There are numerous PHP frameworks that are aiming to mimic, and compete with Rails, so we can’t forget about these guys. The question with the PHP community is: will it grow more into the enterprise, or will it be for script-kiddies.
  • .NET: Never discount Microsoft. ASP.NET keeps getting more productive, and it is hard to compete with their end to end story, which includes fantastic tooling in their latest Visual Studio. And, we get Avalon and XAML along for the ride, as well as the futures of C# 3.0 which takes a lot of ideas from the dynamic languages and puts them into a static structure (such as: var foo = new Bar(); and the relational/xml integration)

It is going to be an interesting couple of years, as all of these platforms mature, and take eachother on, trying to get mindshare!

Client Side: JavaScript is cool again

But what about Ajax? The battle for the client side is going to be just as hot as on the server. And they will even intertwine with eachother.

Firstly we have the big debate of how far Ajax is going to go. Is it a one hit wonder? or will it become a standard part of our toolbox and even just be called dhtml again?

As an Ajaxian, I obviously have my thoughts on this matter. But there is a lot of competition inside and outside of Ajax:

  • Flash/PDF: Adobe/Macromedia are a definitely force to be reckoned with. Flash is almost ubiquitous, and PDF is used everywhere. Now the companies are combined, what do they have in store for us?
  • Avalon/WPF/E/XAML: Microsoft announced WPF/E, which is a subset of XAML that will be ported on various platforms and available in many browsers. This means that you can build your rich application in the .NET set of tools, and have it run in Safari on Mac OSX. Impressive. When are we actually going to see this in a form that we can deploy to the real world?
  • HTML: How much do we want to work in the open (ish) world of HTML. A large group of developers do not want to jump into any monopoly, and will therefore want to stick to a more open environment. But, another set will just want to use the best tool to add business value. What will the split be?

JavaScript will play a big role in this war. JavaScript 2.0 offers big improvements, that many people will cheer for. Also, the same people who poo-poo’d JavaScript in the past have come to realise that it really is a great language. It may not be what they are used too (it uses prototype-based OO vs. class-based OO), but it is powerful and robust. There are some features missing, and a big question around libraries. JSAN and others are trying to build a CPAN for JavaScript. We also worry about the black box of the JavaScript VM in the browsers, and cross-browser bugs are truly real painful. Fortunately, frameworks like Dojo and Prototype are trying to help us out on that front.

We are also seeing that we need to take JavaScript from the former:

“That is just crappy code that the web dood View-Source’s and pastes into the web pages”

to the future:

“JavaScript also needs to be engineered, and is a first class citizen”

Thus we finally see more unit testing of JavaScript code, and professional ways of creating modules and namespaces for our code. We also see great advantages with features like E4X where XML becomes a native type.

JavaScripts increased popularity, thanks to Ajax (and Flash/ActionScript) has also drawn it into the server side. Mozilla Rhino gives you a quality Java-based approach, so why not use a cool dynamic scripting language for certain tasks on the server side? You don’t have to use JavaScript for everything, but it has its place, and that place is growing.

The Battles Join

This is where the battles are joining. We have JavaScript bleeding across the layers, and we have the need for server-side frameworks to support the new Web. It isn’t enough to generate simple HTML and be done with it.

Today’s frameworks need to be able to help us build Ajaxian components, and help us write this applications quickly and cleanly.

There are various directions that frameworks are going in here.

  • JavaScript Code Gen: Why not give you a simple macro that splits out the ugly JavaScript that you would have to write?
  • JavaScript Framework Code Gen: Spitting out low-level JavaScript is too much work. Many frameworks are writing on top of a higher level JavaScript framework like Dojo or Prototype. Now the code-gen is less, and you get the benefits of the rich functionality, browser compatibility, and visual effects available from these frameworks.
  • Tools and Widgets: Should developers even care if a piece of their page is Ajax or not? Some frameworks give you drag and drop editors that let you setup widgets or components. Some happen to be ajaxian. Some are not. Who cares?
  • Markup based: A lot of frameworks are giving us markup based solutions. That is one of the strengths of Microsoft Atlas, not the fact that they added support for $() etc. Are we going to want to build using markup or via programatic APIs?


It is hard to predict the winners of the new battles, and the losers will not die off totally, but it is an exciting time to be watching web development. The dynamic languages of Ruby, JavaScript, and PHP are making a big run, and people are realising that they aren’t just cheesy scripting languages that can’t be used. It’s time to take them serious.

We are going to start really working out what makes sense for usability on the web with rich interfaces. And, at the same time we will get simpler and simpler backend tools to make the generation of rich web experiences easier and easier.

I am looking forward to seeing this battle!

Sep 14

Gadgets vs. Widgets: The war starts

Apple, Microsoft 25 Comments »

Microsoft has gotten into the Widget/Gadget DHTML component game.

We have the players:

You want to write a cool dhtml widget for your desktop, what do you choose? Partly it will depend on your OS of course, but what about cross platform via Yahoo! Widgets?

Imagine if we had ONE standard, so you could write one widget that worked in all docks and platforms?

Sure, this would mean that you couldn’t tie into the OS specific side of things…

Sep 13

Implicit Local Variables and Lambda comes to C#

Microsoft, Tech 17 Comments »

Anders is a smart man. He has seen good ideas that are taking hold in the dynamic language space, and has pragmatically chosen those that can make sense in a statically typed world and applied them.


  • C# 3 has lambda. True closures.
  • C# 3 has implicitly typed local variables

Implicit variables

As Ben says, if your IDE knows to put in a (Cast), can’t the compiler?

The C# 3 one can, and does:

var x = 7;
var s = “This is a string.”;
var d = 99.99;
var numbers = new int[] { 0, 1, 2, 3, 4, 5, 6 };

foreach (int n in numbers) Console.WriteLine(n);

var lowNums = from n in numbers where n < 5 select n;

Now, this doesn’t mean that C# is a script language and you can put anything you want into these variables. The compiler works out the type, and statically binds it. If you try to assign an incorrect type later on you will get an exception.


C# 2 offered good old delegate() which was a nice step forward. Now they have gone the whole hog though, and allow you to create lambda expressions.

A lambda expression is written as a parameter list, followed by the => token, followed by an expression.

// Explicit
(int x) => x + 1

// Implicit. If there is one, then the parens can be ommited
x => x + 1

// Two, implicit
(x, y) => return x * y;

Some more examples:

var evenNumbers = list.FindAll(i => (i % 2) == 0);

// multiple parameters
var matches = fruit.FilterBy((string name, double price) => name == “banana” && price < 2.00);

Java 7 anyone?

C# 3.0 New features

  • Implicitly typed local variables, which permit the type of local variables to be inferred from the expressions used to initialize them.
  • Extension methods, which make it possible to extend existing types and constructed types with additional methods.
  • Lambda expressions, an evolution of anonymous methods that provides improved type inference and conversions to both delegate types and expression trees.
  • Object initializers, which ease construction and initialization of objects.
  • Anonymous types, which are tuple types automatically inferred and created from object initializers.
  • Implicitly typed arrays, a form of array creation and initialization that infers the element type of the array from an array initializer.
  • Query expressions, which provide a language integrated syntax for queries that is similar to relational and hierarchical query languages such as SQL and XQuery.
  • Expression trees, which permit lambda expressions to be represented as data (expression trees) instead of as code (delegates).

LINQ Project

LINQ Tech Preview

C# 3.0 Language Specification

Sep 13

Microsoft LINQ Announced: Merging mismatches with XML, SQL

Microsoft, Tech 98 Comments »

PDC 2005 is up and running, and Microsoft announced LINQ (Language Integrated Query Project).

To reduce complexity for developers and help boost their productivity, Microsoft today announced a solution for the .NET Framework called the Language Integrated Query (LINQ) Project, a set of language extensions to the C# and Visual Basic programming languages that extends the Microsoft .NET Framework by providing integrated querying for objects, databases and XML data. Using LINQ, developers will be able to write queries natively in C# or Visual Basic without having to use other languages, such as Structured Query Language (SQL) or XQuery, a query language for accessing XML data. The announcement was made here at the Microsoft Professional Developers 2005 Conference, where Microsoft is making available a Tech Preview containing pre-release versions of the various components of the LINQ Project.

PressPass spoke with Microsoft’s Anders Hejlsberg, technical fellow and chief architect of C#, and Paul Vick, technical lead for Visual Basic, to learn more about the LINQ Project.

Ander has been talking about how he wants to bring together the mismatches of XML, SQL, and OO.

Now we are seeing the fruits of trying to merge things together so developers do not need to jump to SQL or XQuery.

LINQ has several components, the first of which is a set of specifications that define how queries are expressed in API form. These specifications are key because they establish the rules for adding language support to any LINQ-enabled language and for adding query support to any LINQ-enabled objects. Then, based on these specifications, Project LINQ includes a set of language extensions to C# and Visual Basic and a set of libraries that provides integrated querying for objects, databases and XML data using native language syntax.

By default, LINQ