Live data from Hacker News

Microsoft introduces Universal Windows apps

wmpoweruser.com

81–90 of 187 posts

Re: Microsoft introduces Universal Windows apps

#81
post #61
post #58

Earlier quoted context omitted.

The amazing thing is that you can potentially write all your code in C and have backend/frontend logic for the web, Windows, Windows Phone, OSX, FreeBSD, OpenBSD, Tru64, VAX, Arduino, Linux Kernel, Windows Kernel, Mach, Hurd, and practically every processor or operating system ever built, and even iOS/Android (via Xamarin). Wow. You can even link to and reuse that code from languages such as: C++, C#, Java, Ruby, Per…

C# is a much higher-level language than C, with a much richer set of libraries that can be relied upon to be everywhere. That's why it matters.

C# is ..., with a much richer set of libraries...

Citation please. AFAIK, there are significantly more C libraries than C# libraries.

Re: Microsoft introduces Universal Windows apps

#82
post #46
post #27

Earlier quoted context omitted.

The real key here is sharing business logic. Microsoft apps are written using the MVVM (Model View, View-Model) framework. The idea here is that you would share almost all of your model code, and really only rewrite the view layer (XAML) per platform. You're also allowed to share the exact same views across platforms, but it's unlikely that will be a good experience for users, given the differences: screen sizes, inp…

How is this really different from what exists today? You can write in C# for pretty much every MS platform already. If you're smart you're already writing your business logic with as little dependencies as possible on view specific logic so it's more testable, portable, etc.

Not sure if you have tried doing this. In practice, it's quite painful as you need to have a separate visual studio project file for each platform (phone vs tablet).

Further, the Phone implementation of WinRT is a subset of the tablet's, so sticking to the WinRT API alone isn't enough. Complicating matters further, the phone lets you actually use a Win32 subset which is not allowed on tablet.

This (appears to atleast) unify everything towards more of a write once, run on all windows platforms world.

Re: Microsoft introduces Universal Windows apps

#83

I am wondering whether they can make Windows Runtime's GUI avaliable for existing desktop appliacations. There are many professional applications needs a brand new API for user interface.

I believe they also had a segment about this for sideloaded apps.

Re: Microsoft introduces Universal Windows apps

#84
post #66

Earlier quoted context omitted.

You can rely on C# being on all platforms by default? Linux and OS X? Really? Last time I used Windows (several years ago), there were always apps that needed to download and install the latest version of the .NET runtime... - is that still a thing?

int main(){ puts("Hello World"); } This doesn't work in Windows. The standard entry point to Windows is "int CALLBACK WinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow );" C never really "ran" on Windows. C is built on top of abstractions to even run on Windows. A SegFault in standard C is supposed to be passed to a signal handler (in Linux/ OSX). A SegFault in W…

Microsoft seems to think that it'll work: http://msdn.microsoft.com/en-us/library/bb384838(v=vs.110).a...

Re: Microsoft introduces Universal Windows apps

#85
post #70

One thing I don't see mentioned, do universal apps support C++11? I can understand why it's not as easy to support native code across platforms (i.e. need to do some kind of fat binary thing), but think it's a little sad to see all the work done to support modern C++ app development kind of abandoned. Really annoying if you have to choose between an app being universal or written in modern C++.

Microsoft is one of the biggest supporters of C++11, and C++14 for that matter.

http://msdn.microsoft.com/en-us/library/hh567368.aspx

Re: Microsoft introduces Universal Windows apps

#86
post #66

Earlier quoted context omitted.

You can rely on C# being on all platforms by default? Linux and OS X? Really? Last time I used Windows (several years ago), there were always apps that needed to download and install the latest version of the .NET runtime... - is that still a thing?

int main(){ puts("Hello World"); } This doesn't work in Windows. The standard entry point to Windows is "int CALLBACK WinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow );" C never really "ran" on Windows. C is built on top of abstractions to even run on Windows. A SegFault in standard C is supposed to be passed to a signal handler (in Linux/ OSX). A SegFault in W…

> The "OS Language" of Linux and OSX is C.

Not quite. Significant parts of XNU (the Mac OS X kernel) are written in C++.

Re: Microsoft introduces Universal Windows apps

#87
post #58

The amazing thing is that you can potentially write all your code in C# and have backend/frontend logic for the web (ASP.NET), Windows, Windows Phone, and even iOS/Android (via Xamarin). Wow.

The amazing thing is that you can potentially write all your code in C and have backend/frontend logic for the web, Windows, Windows Phone, OSX, FreeBSD, OpenBSD, Tru64, VAX, Arduino, Linux Kernel, Windows Kernel, Mach, Hurd, and practically every processor or operating system ever built, and even iOS/Android (via Xamarin). Wow. You can even link to and reuse that code from languages such as: C++, C#, Java, Ruby, Per…

Have you ever actually used C in a real project? I can't seem to get away without using any compiler specific constructions, much less operating system specific call routines.

There isn't even a Boost for C.

Honestly, I'd be surprised if you actually knew C with a statement like that.

Re: Microsoft introduces Universal Windows apps

#89
post #70

One thing I don't see mentioned, do universal apps support C++11? I can understand why it's not as easy to support native code across platforms (i.e. need to do some kind of fat binary thing), but think it's a little sad to see all the work done to support modern C++ app development kind of abandoned. Really annoying if you have to choose between an app being universal or written in modern C++.

AFAIK they do. WinRT apps can be written in many languages including C++. And this is pure native C++ and not "managed" C++.

Re: Microsoft introduces Universal Windows apps

#90

Earlier quoted context omitted.

int main(){ puts("Hello World"); } This doesn't work in Windows. The standard entry point to Windows is "int CALLBACK WinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow );" C never really "ran" on Windows. C is built on top of abstractions to even run on Windows. A SegFault in standard C is supposed to be passed to a signal handler (in Linux/ OSX). A SegFault in W…

> The "OS Language" of Linux and OSX is C. Not quite. Significant parts of XNU (the Mac OS X kernel) are written in C++.

And significant parts are written in Assembly as well. But Assembly isn't the "OS Language" of either Linux nor OSX :-p

What I mean by OS Language, is the language that interacts with core OS Libraries. The OS Language of Android is Java. iOS is ObjC. OSX core is either ObjC or C. Linux is definitely C based. (ioctl)

Microsoft is either C++ or C#. (DirectX, Ribbons, etc. etc. are behind COM interfaces that are most easily interfaced by C++ or C# code)

Post reply on HN