When will Nativescript for Windows mature past the proof of concept stage? - nativescript

The readme.md at https://github.com/NativeScript/windows-runtime says that the Windows runtime for Nativescript is in proof of concept stage, and then lists what I understand to be very deep language features that are not implemented yet.
The tone on the https://www.nativescript.org/blog/nativescript-runtime-preview-for-windows-10 announcement seems a bit more enthusiastic about the current feature set.
Being able to use Nativescript on Windows Phone (and any other platform) is incredibly appealing.

TJ, a core team member, recently posted on the forums about this:
Hey #NezzaGrey,
Thanks for reaching out, and awesome that you’re liking NativeScript :smile:. >Straight to the point though—we’re not actively working on UWP support because >1) it’s a ton of work to add a new platform and commit to supporting that >platform indefinitely, and 2) we’re not seeing nearly enough demand from our >community to justify taking on that work.
That doesn’t mean that UWP support in NativeScript will never happen, but it’s >not coming in the short term because we’re just not seeing the demand. That can >always change though. I’d encourage you to add your use case to the GitHub >issue open for adding UWP support in NativeScript: >https://github.com/NativeScript/NativeScript/issues/254. Yes, the issue is >somewhat ancient, but we really do pay attention to well-thought-out comments >during roadmap discussions.
I’ll note two other things. First, our initial work on making a Windows runtime >is completely open source and available on GitHub: >https://github.com/NativeScript/windows-runtime. We’d love to have community >?>help to make the new runtime a reality.
Second, one option you have is to build your iOS and Android apps with >NativeScript and Angular, and to use our code sharing approaches (see ?>https://www.nativescript.org/blog/code-sharing-between-web-and-mobile-with->angular-and-nativescript1) to share your Angular code with other apps. You >could take that approach to share Angular code between your NativeScript apps >and your UWP apps if you use something like Electron. This approach isn’t >ideal, as you’d probably prefer to build a completely native UWP app, but it’s >something to consider if you’re open to using Electron.
Anyways, hopefully you found some of this helpful. If you have any other >questions feel free to follow up.
Source: https://discourse.nativescript.org/t/windows-uwp-support/2659/3

Related

NativeScript roadmap: Desktop support no longer on the cards?

I notice that desktop support isn't mentioned in NativeScript's future roadmap any more.
Has this been dropped for good, or is it still on the cards?
If it is still on the cards, for when is it planned?
NativeScript under Progress ownership
While NativeScript was owned by Progress, desktop support was never a priority; developer surveys did not show strong enough demand for it, and the NativeScript Core team were stretched too thinly to tackle it as a curiosity.
Of interest, before the death of Windows Phone, NativeScript did get very far on implementing a Universal Windows Platform runtime for NativeScript: https://github.com/NativeScript/windows-runtime
The NativeScript iOS runtime (https://github.com/NativeScript/ios-runtime for JSC, https://github.com/NativeScript/ns-v8ios-runtime for V8) is also close to delivering Catalyst support, although it's essentially undocumented for now.
I spoke with the NativeScript iOS runtime team and they said it would be pretty trivial to generate JS bindings to macOS (AppKit/Cocoa), too – though one would still have to implement all the UI components as AppKit ones, so it would only be the start of the journey.
Unofficial support
Kamen Bundev (on the Progress/Telerik NativeScript team) has been building a Qt-based desktop implementation of NativeScript as a hobby project for a long time:
https://github.com/bundyo/nativescript-platform-desktop
It has access to Node.js's APIs rather than, say, the Obj-C runtime on macOS, however.
NativeScript under nStudio ownership
NativeScript was recently handed over to nStudio, who may have a different stance. This question did in fact receive an official answer recently on Twitter:
They have also expressed love for the idea of creating Windows 10 apps with it (the tweet links to this issue, https://github.com/NativeScript/NativeScript/issues/8643):
My personal speculation
Note that I do not work for nStudio, and the dust is still settling after the NativeScript handover, so everything from here is just speculation:
So I think there's no question that the passion is there – the real question is whether they have the resources to back it. I personally think that there won't be any movement on it anytime soon, as nStudio need at least a few months just to get used to driving the NativeScript ecosystem and sorting out the long-standing open-source frictions. I think that they'd absolutely welcome a community-driven effort on this, of course. I imagine that by 2021 they'll feel more ready to take on projects of that scale.

Migrate Xamarin.Android app to Xamarin.Forms app

I'm on the cusp of beginning a Xamarin project. I have been doing loads of research on what the best starting point would be and i have come to the conclusion that i need to learn the Android framework and begin by building a native Android app in Xamarin instead of Xamarin.Forms.
However, looking to the future i would want to be cross platform for this app. I have searched high and low on any information about what it would take to take a Xamarin.Android app and migrate it into a Xamarin.Forms app so that i can then build out the iOS app for my project.
Does anyone have any information on if this process is easy or hard to do? Can you take a Xamarin.Android app and someone migrate it to a Xamarin.Forms project? And if not would the approach be to rebuild the apps under a Xamarin.Forms project? Is there a easy approach to this?
Any info on this would be greatly appreciated.
With more than two years of experience with Xamarin (Native and Forms), I have never seen a tool or anything of any sort that will help you with migration but I can give you my personal opinion on this and maybe help you a little. Let's begin.
I have been doing loads of research on what the best starting point would be and I have come to the conclusion that I need to learn the Android framework and begin by building a native Android app in Xamarin instead of Xamarin.Forms
I would say this was a good decision Since my personal experience tells me that it is crucial for you to know either Android or iOS before you start working with Xamarin Forms otherwise there will be points in time where you will be lost af seeing the code, thinking how did you get yourself into this mess ;)
I have searched high and low on any information about what it would take to take a Xamarin.Android app and migrate it into a Xamarin.Forms app so that I can then build out the iOS app for my project.
There is no direct way of doing this you will have to do it the old fashioned way...
Converting(Manually) Android XML to XAML is quite easy so the design won't be an issue.
The C# part might be a problem as a native Android code is quite different to forms, But you can do it with ease with time.
Note: That there will be a lot of stuff that you would want to keep in mind for eg how Xamarin.Forms works. Because when you start doing the changes you will face a lot of issues finding equivalents and stuff but it will get easier
Does anyone have any information on if this process is easy or hard to do?
It's not about hard or easy it's about time taking or not and trust me it takes time.
Can you take a Xamarin.Android app and someone migrates it to a Xamarin.Forms project?
I am a little bit confused by this part of the question but if you mean is it possible yes it is.
My comments:
You will need good knowledge of how Xamarin.Forms work and by that I mean you should at least go through all the Xamarin.Forms guides in Xamarin University which can be completed in a week or so with proper understanding.
Going forward I would say use an MVVM framework for your Forms app, it will help you have a well-structured code and will keep you up to date with the industry standard.
Also, note that MVVMCross for a beginner in MVVM is too complex, so avoid it if you have no idea what MVVM is, going with Prism or FreshMVVM would be comparatively easier.
Don't depend too much on Xamarin.Forms NuGet's for doing certain functionalities.
Rather write your own code using Plugins for everything is too much dependency and becomes a problem at crucial times.

How to print the current UI of Xamarin form crossplatform application

I want to print the current UI of a Xamarin.Forms cross-platform application. Are there any plugins or libraries available which support both android ios and uwp projects to do this? I'd really appreciate being pointed in the right direction to get started on implementing this kind of feature in my application.
I would approach this in two steps. Firstly you need to convert the current visuals into a printable file type. So assuming we are working with primarily mobile devices then we should make use of the 'screenshot' mechanisms.
There is a very good answer to another stack overflow account HERE that guides you through setting up screenshots in xamarin forms using dependancy injection. The chaps answer is straight forward and easy to follow.
Once you have that screenshot as a png or jpeg etc. It's time to print it. There are a lot of threads on xamarins developer forums dedicated to the issues around printing from xamarin, a collection of these can be found HERE.
So to start with it's worth mentioning that every platform xamarin forms (XF)supports has it's own mechanism for printing. XF does not provide any abstractions for printing in a cross-platform manner. You will need to write printing logic for each layer and expose it to XF using DependencyServices.
Android Printing - this is a link to printing in android.
iOS Printing - this is a link to printing in iOS (Heres a sample app to help you as well.)
As I previously mentioned, because xamarin hasn't created a simple cross-platform mechanism for this in Forms, it's not quite as simple as you'd think and does require some work to implement. But none of the work is overly complicated, it uses standard dependancy patterns, it's really just the bulk of code required that can seem a bit daunting.

How does Xamarin MVVMCross tie in with Xamarin.Forms?

I'm fairly new to Xamarin development, but I've started doing some experiments with Xamarin.Forms and I'm really liking it.
Now, I've discovered MVVMCross, and it sounds interesting for developing apps that have separated UIs for each platform, but I'm trying to find updated information regarding how (and if / why) it may tie in with Xamarin.Forms (mvvm's docs has a page for this, but it's empty ATM).
Is there any currently-relevant information I'm not being able to find? (all results I'm finding seem to be too old and not really helpful, please correct me if my google-fu is just not strong enough)
Well, for lack of better replies. From this blog post:
(...) it is crucial to understand that neither MvvmCross nor Xamarin.Forms is a replacement for one another. While both of them provide infrastructure modules that help developers in their mobile application projects, Xamarin.Forms is a UI technology stack that enables common XAML declarative UI implementation for target platforms; MvvmCross is a framework that enforces clear distinction between the UI elements and core logic implementation. Either of them alone or together can increase the shared amount of code in cross platform projects.

Xamarin cross-platform user experience vs. native development

I am trying to evaluate whether Xamarin would be a good option for my project. The project is a large, complex app for Android and iOS with a lot of client-server communication. The user interface is a major focus and has to be really fast and smooth. Also, we plan to make large use of UX graphic effects (comparable to the Spotify app).
For now we are planning to go for two separate native apps using Java/Objective-C. However, the possibility of cross-platform code sharing would be very convenient for us of course.
Most opinions I've heard so far say that Xamarin - although far better than HTML5 apps - cannot match the UX of a native app. Also, I tested the following applications made with Xamarin (on Android):
Rdio
MarketWatch
Busch Gardens Discovery Guide
Sqor
Storyo
From my impression, none of them could quite match the speed and smoothness of a good native app.
If our focus is on a top notch user experience, would Xamarin really be a viable option? Can it really match a native UX? I am particularly looking for opinions from developers who have experience with large and complex cross-platform Xamarin applications. A few critical voices would be very helpful.
Thank you a lot!
I'm on the Rdio mobile development team, so I can make some personal reflections from that standpoint.
Xamarin allows you to write native applications in C#. Any slowness, jankiness, ugliness or bad-appiness usually has nothing to do with the Xamarin layer itself.
You save some time being able to share core business logic between your different clients, but you're still writing the UI from scratch, specific to the platform. You're just writing it in C#.
But while you save that time, you're spending it in other ways. All of those SDKs you want to use probably aren't compatible with Xamarin out of the box. You won't be pod install'ing that iOS framework, and you might be reinventing the wheel for handfuls of things. Xamarin takes advantage of the NuGet repo so you have a library of components that handle many of the things most people need (Analytics, Testing, Facebook SDK, JSON parsing, Database, etc etc) but it doesn't cover everything. And it certainly doesn't cover stuff that's out the day of an Apple or Google product announcement.
Any 3rd party code that you do want to import into your project will be done through writing custom bindings. While not usually difficult, it is time consuming. Xamarin has a team of people that specialize in assisting you in this. This fact speaks to the process being messy at times.
So while the slowness, jankiness, ugliness or bad-appiness probably isn't the fault of Xamarin, it might be the fault of you spending time in places you normally wouldn't, or not being able to take advantage of features you normally would. If that 3rd party partner SDK is giving you problems, your troubleshooting may take twice as long because there's a layer that you don't control.
UI is a wash. You're writing it from scratch anyway.
Business logic is shared. Depending on the app that might be a win if you architect your application to take advantage of it.
Compatibility / bleeding edge ability will be lacking. That might not matter to you at all, or you might be the person wanting to take advantage of that hot new API in the next OS release the day it's announced.
My personal thought, without knowing specifics, is if you want to build an application that you plan on being around years from now, and that will take advantage of the latest and greatest, I'd tell you to write natively for each platform. Unless you can really see huge gains in sharing that business logic the upfront gains are minimal. Or if you really like C#.
Xamarin uses native controls. So you design a fully native UI per platform. The users can't see that your App is made with Xamarin or Java/Objective-C.
There are sometimes performance issues in conjunction with the platform independent UI wrapper Xamarin.Forms. But you're not forced to use it. When you have still performance issues in your Xamarin.Android or Xamarin.iOS app then you produce them in your code.
There are benchmark results for Android apps comparing Xamarin.Android and Java apps: Does anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?
As you can see Xamarin's internal performance became better and better over the time.
Conclusion: Yes, you can write smooth native Apps using Xamarin.

Resources