
NativeScript with Universal Windows Platform Support - andreashansen
https://github.com/NativeScript/windows-runtime
======
iLoch
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 features. Really surprised it's an official
Microsoft project. I don't mean to disparage the developers of it, but it's
really bad. Don't use it if you value your time or peace of mind and plan on
customizing it in any meaningful way.

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

~~~
iLoch
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.

------
Aleman360
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.

~~~
jasonjei
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.

~~~
Aleman360
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.

------
feylikurds
I have started to develop mobile applications with NativeScript and I am
absolute in love with it. It has an Angular feel to it (I despise all things
React). Before, I had only been doing backend work and I still have only taken
care of the Web API portion of our NS app, but I hope to do some GUI soon. I
am extremely impressed by NS.

