Creating Windows 8 Metro app (HTML5) without Visua

2020-02-11 03:26发布

问题:

I know this might be a stupid question but is there any way to build a Windows 8 Metro app (HTML5) without using Visual Studio? As I have understod it, an html5 metro app consists out of typical web files (html/js/css/images) and a manifest file. Is it possible to simply zip a directory with the required files and use that as an application? Or am I way off?

Best regards Vic

回答1:

Information on the PowerShell scripts you can use to package and deploy an app, then run it from the Start screen, can be found on http://social.msdn.microsoft.com/Forums/en-US/toolsforwinapps/thread/5013262a-2a18-4ce6-99d1-03451d6c9619. The problem is that this won't get you very far with debugging, which is one of the greatest values of a tool like VS. (And don't forget Blend...an excellent tool for styling and debugging CSS).

I've heard that people do get scared off by VS (myself included), but the Express edition for Win8 is straightforward to use, and the IntelliSense you get for JS, WinJS, and WinRT is exceptionally helpful. And did I mention debugging?

Honestly, when we were first able to write Metro style apps at all in Dec 2010, we only had the PowerShell scripts to do all of this, and did, in fact, write code in Notepad. It was utterly painful...had to debug HTML and script in a browser with F12 tools, but then you couldn't use WinRT APIs. Gradually VS got better and better and it's simply worth spending some time learning in lieu of other IDEs becoming available for the Win8 platform.



回答2:

Yes, it's possible. There's a very good tutorial here. It uses C# rather than HTML5/JavaScript, but for the most part it is the same. It was written for the CTP release of Windows 8 though, so a few things have changed with the Release Preview, but it should be a good starting point.