Live data from Hacker News

NativeScript with Universal Windows Platform Support

github.com

11–14 of 14 posts

Re: NativeScript with Universal Windows Platform Support

#11

Do yourself a favor and use C# or even C++\Cx instead. They're both a much better fit for XAML. Full disclosure: I work at Microsoft on XAML UI in C++. It's nice. Opinions are my own.

I agree. I think it's cool that somebody is trying to create a JS API runtime for Win32, but the same criticism for using RubyMotion to build iOS apps applies. It ends up feeling too unnatural and stressful to use, with an extra dependency you have to rely on for support.

I believe that using Win32 API in C/++/# (maybe one day with Go if all the OS functions are mapped) is much more natural than forcing yourself to do it in JS. A lot of the Windows APIs still require you to manage some memory (I'm not sure how much is abstracted in C#, but if you are doing it through DllImport, Win32 will still expect you to free memory if you are using OS API functions as it was designed for C).

On top of that, you will spend a lot of effort trying to box/re-package documentation intended for the C/++ (ATL/MFC/WTL/etc) or C# (WPF) audience. This is probably the greatest cost. In the end, I suspect NativeScript code looking a lot like the C equivalents. Consuming third party libraries written in unmanaged code is likely to produce very ugly code.

I tried using RubyMotion a long time ago for iOS development. All of the sample code I found was in Objective-C, and I pretty much spent most of my time rewriting the code in Ruby, or parsing docs in ObjC and figuring out the Ruby way to do things. In the end, it was simpler to just do it in ObjC.

Writing the app in a SDK with a lot more support is just much better. Your sanity will thank you. And if you are writing cross-platform code, C has endured the test of time.

Re: NativeScript with Universal Windows Platform Support

#12
post #9

Small recommendation for folks looking to use JS for Windows development (I understand this is just a runtime, but people may be inclined to combine these two things): do not use WinJS for any reason. It's undoubtably the worst UI "framework" I've ever used. Completely inflexible (HTML and styles defined in private and inaccessible methods, swallows events, monolithic functions) and riddled with bugs and incomplete f…

So, have you had a positive experience with any alternatives in the same use case?

Re: NativeScript with Universal Windows Platform Support

#13

Do yourself a favor and use C# or even C++\Cx instead. They're both a much better fit for XAML. Full disclosure: I work at Microsoft on XAML UI in C++. It's nice. Opinions are my own.

I agree. I think it's cool that somebody is trying to create a JS API runtime for Win32, but the same criticism for using RubyMotion to build iOS apps applies. It ends up feeling too unnatural and stressful to use, with an extra dependency you have to rely on for support. I believe that using Win32 API in C/++/# (maybe one day with Go if all the OS functions are mapped) is much more natural than forcing yourself to d…

NativeScript is targeting UWP, not Win32/WPF. The UWP API's are way better and C#, C++, and JavaScript are supported out-of-the-box. But if you go the JavaScript route, only HTML is officially supported for UI. You can get native-looking widgets using WinJS, but the XAML framework is the real deal. XAML sits directly on top of DirectComposition, so no DOM\Webview.

Re: NativeScript with Universal Windows Platform Support

#14
post #9

Small recommendation for folks looking to use JS for Windows development (I understand this is just a runtime, but people may be inclined to combine these two things): do not use WinJS for any reason. It's undoubtably the worst UI "framework" I've ever used. Completely inflexible (HTML and styles defined in private and inaccessible methods, swallows events, monolithic functions) and riddled with bugs and incomplete f…

So, have you had a positive experience with any alternatives in the same use case?

I'd recommend copying any particular CSS transitions they use, and looking at the computed properties of components in order to recreate any particular WinJS components you need. I'd also recommend you evaluate WinJS yourself and see if it fits your needs - but if you suspect you'll be doing anything more that the default then you may not have a fun time.
Post reply on HN