Blogger Widgets

Total Page visits

Tuesday, February 19, 2013

Dumping .NET - Microsoft's Madness


Microsoft seem to be set on adopting HTML5 and JavaScript as its main application development tool  for Windows 8 - is this the end of .NET?

Microsoft feels itself to be under attack in a post-PC world.

The problem is that the current boom is in mobile and Microsoft doesn't really do mobile. The PC is so passe and with it Windows is going out of the door and Microsoft seems to want to throw the entire .NET subsystem along with it.

Microsoft clearly has to do something, but at the moment it looks like insanity has taken hold. To bet the farm on HTML and JavaScript being the next big thing is a good bet, but its not a bet that Microsoft can easily take and make good. Even if the world does turn to JavaScript and platform-independent apps this still means that Microsoft loses.

The problem is that Microsoft needs a technology that gives it an edge and HTML/JavaScript is everybody's edge.

Microsoft developers feel left in the dark and very angry at the way they are being treated. You only have to browse the Microsoft forums to discover how strong the feeling is:  forum post 1, forum post 2 and an open letter.

Will Microsoft listen?

On past behaviour the answer it likely to be no, but it might provoke some conciliatory words about how the "old technologies" will be supported in the future.

After all it's not the first time that Microsoft has dumped developers to bring in something that might or might not be better - see Visual Basic 6 for example. Microsoft tends not to come out in the open and say that a technology is dead instead it tends to simply ignore it and allow it to wither.

This particular story started some time ago when Silverlight was sidelined and described as being only the development platform for Windows Phone 7. Now we have previews of Windows 8 and in this case it isn't just Silverlight that sidelined but the whole of the .NET framework.

The .NET revolution

It is difficult to explain how radical an innovation the .NET framework is.
When it was introduced it changed the way that developers worked under Windows. Before .NET Windows was a crude platform with an extensive and very idiosyncratic API that you could really only work with via C or C++. Its component technology was COM and again this really only worked well in C or C++ although VB6 managed to tame it enough to make it useful for some tasks.

The introduction of .NET, Intermediate Language, the CLR, C#, managed code and the ever-growing class library brought Windows programing into the 21st century.

C# started out as a simple language that looked a lot like Java or C++ but it has grown into a sophisticated language - arguably one of the best available. In addition over time technologies have been added to the system such as WPF, WCF, LINQ, Entity framework and so on. It is a rich environment and one that has take a lot of time and effort to implement.

Indeed WPF the .NET graphics system is a complete rewrite of the Windows windowing mechanism using the DirectX 3D graphics engine. It was for many years assumed that WPF would eventually replace the underlying Windows API to produce a new super-object oriented Windows.

But no more.

Silverlight may have been sidelined but at least it had a role to play in that it forms the development environment for Windows Phone 7. WPF on the other hand is dead in the water with no where to go.

The change has been rapid and remarkable. In just a few months WPF has gone from being the "must have" project technology to something you really don't want to bet your future on.

I for one have gone back to using Windows Forms for new projects and as it is based on the underlying Windows technology it looks a lot more secure.

HTML/JavaScript

The problem is that Microsoft for some reason seems to think that the future is the HTML5/JavaScript app.

While it is true that there has been an app revolution that revolution is not based on HTML5/JavaScript. Apple's iOS is based on Objective C and a class library.  Android is based on Java and a class library. Windows Phone 7 is based on C# and a class library. HTML5/JavaScript apps account for a very small proportion of apps running on anything.

If Windows 8 adopts an HTML5/JavaScript app infrastructure there wont be a lot of apps ready for it to run.

To be clear HTML/JavaScript is unproven technology.

So why does Microsoft think that HTML5 apps are the future?

Part of the answer is that they are platform independent - which is what Silverlight was supposed to be.

After failing to a get Silverlight adopted as a popular alternative to Flash, Microsoft seemed to give upon it, leaving the Mono open source team to try to put a little platform independence into the mix. You can see the start of where we are today in the speed with which Microsoft stopped pushing Silverlight as the solution to everything.

The crazy thing is that Silverlight probably is the solution they are looking for.
After all Silverlight is Windows in a browser.

You can easily develop a desktop application and move it to Silverlight without making any deep architectural changes and it will work just as well.

Really! Silverlight IS Windows in a browser.

So what is wrong with Silverlight that it has to be dumped in favour of HTML/JavaScript?

The only real answer, as mentioned earlier, is that it isn't platform independent. Of course by adopting a platform- independent solution Microsoft makes Windows and any technology it produces completely replaceable. If you can run an HTML/JavaScript app under Windows you can move it over to any system runs a browser.

Google and Apple aren't stupid enough to make their mobile platforms universal. There are Android apps an there are iPhone apps .. but now there wont be any Windows apps.

Yet quite insanely there will be Windows Phone 7 apps and these are mostly what we would have called Windows apps not so long ago!

If the future of Windows apps is HTML5/JavaScript then Windows has no future.
Windows 8 is going to have a tile-based UI, copying the look and functionality of Windows Phone 7. This is a good move - or it would be if the tile-based "Metro" look was actually stylish. To my eye it looks clunky and a complete mess but there are people who disagree.

It doesn't really matter because the issue of the Windows 8 interface isn't really about the type of application that can run in a "live tile". Choosing to focus on the JavaScript app is a completely separate decision. After all Silverlight is just fine in the touch-based environment of Windows Phone 7 - so why not make it the main technology for Window 8?

A recent  press release:describes the new interface in glowing terms but the key item for developers is:

Web-connected and Web-powered apps built using HTML5 and JavaScript that have access to the full power of the PC.

To try and reassure developers that commitment to old technology is still there we have:
We also showed effortless movement between existing Windows programs and new Windows 8 apps. The full capabilities of Windows continue to be available to you, including the Windows Explorer and Desktop, as does compatibility with all Windows 7 logo PCs, software and peripherals.
Reassuring?
Not really.

Backward compatible

The point isn't backward compatibility - the loss of which would make Windows into something that was no longer Windows and would be even crazier than the current plans.

It should come as no surprise to any developer that Microsoft are not going to dismantle the infrastructure needed to run old fashioned Window apps. What really cuts deep is that I am already referring to them as "old fashioned Windows apps". How can you get anyone excited about an app that is based on last year's technology. Where we once enthused about WPF and then Silverlight it is going to be HTML5 and JavaScript on the front page making headlines.

Our .NET technology might be supported in some sort of backward compatible mode but it clearly isn't going forward anymore.

The final madness

I find that I have already made frequent use of "insane" and "insanity", but I need a stronger term for the final part of the deal - JavaScript.

As it happens I'm a great JavaScript fan and have been for some time. It makes a really nice change from other languages - it's fun, it's clever and rewarding but it simply isn't in the same league as C# or Java or...

So how crazy is it to bet the entire company on it's use?

Now it might be that Microsoft has some technology up its sleeve such as a C# to JavaScript cross compiler or something similar, but if it has it's keeping it very, very, under wraps. In fact the vagueness and silences coming out of Redmond suggest that they really don't have a "big idea" apart from the one that they have placed on the table - use JavaScript!

This whole situation couldn't have come at a worse time. In the opinion of many Java is compromised by being mismanaged by Oracle. and now the .Net language are being sidelined in favour of an idiosyncratic language that until recently wasn't even considered for writing an a complete application.

Many are already jumping ship but to go to what?

The only credible language that remains is C/C++ as it is what most of the systems, including the mobile system we use, are built with.

Not only am I avoiding using WPF for future projects I have been seriously considering going back to C++.

This is a long and complicated argument, so to summarize:
  • Windows 8 is making a big thing of HTML5/JavaScript apps but most apps run on specific platforms and are not JavaScript based. Windows 8 could launch without much running on it but "legacy apps".
  • Making Windows apps JavaScript apps makes Windows just the same as all the other platforms that can run JavaScript - why do I need to stick with Windows? 
  • Silverlight is "Windows in a browser" and is probably the solution Microsoft is looking for - it's powerful and gives them an edge that others just don't have.
  • JavaScript is fun but it's primitive compared to C# or Java and it will take time to develop tools that make it all work - assuming it can be made to work.
  • Adopting JavaScript as the development language for Windows 8 is a huge step backwards in terms of available technologies such as Linq, 3D graphics, Entity Framework etc.
  • If Silverlight is good enough for the touch environment of Windows Phone 7 why isn't it the development environment for Windows 8?
The more you think about it all the more you have to come to the conclusion that something doesn't "smell right" in the jargon of the agile fraternity.

Why is it we are the only ones who notice it so clearly?

Of course Microsoft almost certainly thinks that we are just complaining about having to change what we know and what we have invested years learning. After all its a very similar reaction to what they got when they forced .NET on the Windows programming community. The difference is that .NET was progressive - HTML5/JavaScript is regressive.

I can only hope that Microsoft has some ingenious plan that it will reveal to make it all right - but somehow I doubt it.

Thanks www.i-programmer.info


No comments: