16

Some articles point to Windows 8 development being HTML-based instead of primarily using native code like C or C++ (as it has been until now) or .NET (as now, or even more so as it would have been in Longhorn, but never was.)

Is this true? Will the core APIs be accessible from Javascript then? What is the primary API / framework for Windows 8?

John Sheehan
  • 77,456
  • 30
  • 160
  • 194
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
  • 4
    HTML instead of C++? :) Sounds like a joke :) – peterm Jul 12 '11 at 00:30
  • 2
    There's never been a "main" developing framework for Windows. Programming is about choices. There will always be different options to choose from. – Thomas Li Jul 12 '11 at 00:31
  • 2
    I'm not sure if there is such a thing as a "*main* developing framework" for Windows. There are lots out there: MFC, ATL, WTL, WxWidgets, Qt, FLTK, Java, .NET, and one can even consider something like Flash to be a Windows developing framework. And I'm sure lots of people have their own little frameworks (me included). The one thing they all have in common is that they all interact with the Windows API at some point. The importance of the Windows API for Windows applications means there are bindings for it in almost every language. – In silico Jul 12 '11 at 00:31
  • @In silico and @mouser: many of those frameworks devolve to the Win32 API. The OP is questioning if the Win32 API - and by extension, those wrappers - will be the main / official Windows development API. This isn't as silly a question as it might sound if you haven't been listening to rumours recently. There was a Win8 presentation recently that many people thought implied Win32 was not the recommended API. More details in my answer below. – David Jul 12 '11 at 03:57
  • @Jader: I edited your question to clarify (you can see from some comments it probably wasn't clear) and fix some grammatical issues and stuff. I linked to one article of the "some" you refer to too. Hope this is ok, please edit back if I made any mistakes. – David Jul 12 '11 at 04:04
  • @David M: I obviously haven't heard the rumors, which is why I thought the idea of Microsoft deprecating the entire native Windows API in favor of some HTML5/JS API was ludicrous. Thanks for clarifying this. It seems to me that it'll still be the same, just with some additions and "unification". – In silico Jul 12 '11 at 06:56
  • see also http://stackoverflow.com/questions/7416826/how-does-the-new-windows-8-runtime-compare-to-silverlight-and-wpf – Ian Ringrose Sep 14 '11 at 14:29

5 Answers5

15

This is worth asking. When Windows 8 was demonstrated in June, a couple of comments by the presenter scared quite a few developers - or at least turned the Internet into panic mode. I'm surprised this question hasn't been asked here before.

The best article on the topic I have found is Windows 8 for Software Developers on Ars Technica.

The short answer is: it will remain the same.

The long answer is: it will remain the same, but several things will be added. You may want to pursue using those if you're willing to bet on new Microsoft technologies. One particularly interesting one is WinRT, which is a new object-oriented native code API exposed through COM, which is supposed to be a new version of the old flat Win32 API. Details are in the linked article.

It is very, very, very, very unlikely that anything that already exists, especially based on Win32 or .Net, would be removed. That means your existing programs written in .Net or native C++ or Delphi will continue to work fine. It is also unlikely that the primary development platform will be HTML. More likely is that HTML applications will be encourage for specific scenarios - perhaps touchscreen, kiosks and tablets.

I'd encourage you to read the article I linked to above - it covers this in far more detail than any answer here can.

David
  • 13,360
  • 7
  • 66
  • 130
9

There are three ways to develop for Windows 8, and they all access the same underlying API, the Windows Runtime.

  • Use C++ and call WinRT functions much like calling Win32 APIs back in the day (you know, yesterday)
  • Use C# or VB and call what appear to be .NET methods (but aren't)
  • Use Javascript and call WinRT functions

The UI is built with XAML using a pretty reasonable designer. More details are still coming out: check http://channel9.msdn.com/Events/BUILD/BUILD2011 for videos with detailed coding demos. http://channel9.msdn.com/Events/BUILD/BUILD2011/BPS-1005 is not a bad starting point.

Kate Gregory
  • 18,808
  • 8
  • 56
  • 85
  • Well, using C++ is not quite like "Win32 APIs back in the day", since there's those new and shiny language extensions that make it almost as easy as doing that from C#, and which (purely coincidentally, of course! ~) closely resemble C++/CLI - while still producing pure native code. – Pavel Minaev Sep 14 '11 at 23:58
6

There are 3 language/framework combinations that are all equally supported:

  1. C++ and XAML
  2. C#/VB and XAML
  3. JavaScript and CSS/HTML

All are first class ways to write Windows 8 Metro style applications. Windows Runtime provides direct access to each of these languages and so choice of development environment can be based on familiarity or feature set of the language and not on restricted availability.

Update: I forgot one: C++/Direct3D (for games).

Steve Rowe
  • 19,411
  • 9
  • 51
  • 82
4

The original quote, in the context of writing a tablet desktop weather gadget application, is that the application uses "our new developer platform, which is, uhh, it's based on HTML5 and JavaScript."

The demonstrator never said a gadget is the preferred type for applications (How many Vista sidebar gadget or Windows 7 desktop gadget have you written in your life? Even when you can write them in simple HTML!), or the platform is the preferred platform for desktop weather gadget applications (How many animation control have you add to your application with video playing requirement? It is THE control used by Windows Explorer to display video!).

Sheng Jiang 蒋晟
  • 15,125
  • 2
  • 28
  • 46
2

Today, after spending a few minutes playing with Windows 8 developer preview, I found that you can use Expression Blend 5 to easily auto-generate metro-styled applications in HTML and Javascript. Also in Visual Studio you can create exactly looking applications in Silverlight. :)

I am very excited!!! Go Windows 8! :)

Justin XL
  • 38,763
  • 7
  • 88
  • 133