Ionic 2 vs Xamarin - xamarin

I have found a lot of articles (and forms) about Ionic vs Xamarin but they always talk about Ionic 1 or Xamarin when it was still paid for (so before march 2016 when it was acquired by Microsoft).
I have to research Ionic 2 vs (current) Xamarin and I know that both technologies have made huge advancements. Can anyone help me on my way with some sources or is it still too early to ask this question?

Xamarin: With one year of experience, I have realise it is really flexible IDE to use. The amazing part about Xamarin is you have 2 option, i) go native ii) go cross platform, this make it open on what kind usage you prefer and how you want to go about.
OS Support/Deployment to: Windows, iOS, Android, Mac
Languages Used: XML, C#
Ionic: especially Ionic-2, It amazing for all HTML, CSS, and JS users to build application for web, mobile applications. I haven't seen its deployment for windows phone(if it is, then i am not sure) With Ionic, forget all your MVVM structured coding. But the new implementation of version-2 parallel with angular-2(typescript) it might make it possible to implement.
OS Support/Deployment to: iOS, Android, Web(HTML/CSS)
languages Used: HTML, CSS, Angular-2
Star Rating
Xamarin - Mobile and PC Dev - 4/5 stars on usage of IDE and deployment. There are immediate help available upon stuck through Xamarin Forums. Documentation is little vague.
Ionic-2 - Mobile and Web Dev - 3/5 stars on usable and compatibility. Its hard to find some answers to specific question, rest ionic docs are great at documentation and implementation.
Hope this helps. PS: This is completely my own view as i have used both of this tools personally. Comments are welcomed.

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.

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

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

Understanding Xamarin [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
As a complete beginner to Xamarin and new entrant to mobile app development, I have some questions about Xamarin and about the way it works which I was not able to find on the internet
How does Xamarin Cross-platform actually work? Is it any use? I was told Xamarin told Xamarin is a cross-platform mobile development solution, but when I Start off, I see it actually encourages you to create separate projects for iOS and Android. I understand that is to give us more power and there is always Xamarin Forms if we want cross-platform UI. In that case, however, I would expect the Portable Class libraries to handle all the backend logic while the native projects are used only for the UI. But when I started out, the most basic library for accessing mobile functionality (Xamarin.Mobile), is not compatible with PCL. What is the use of PCL even in that case?
How are cross-platform apps generally made in Xamarin? What is the role of the PCL and how do we get it to do cross-platform stuff?
Is there no pre-built Xamarin API which allows to do most mobile-related stuff platform independently? Seems we have to download new libraries from nuGet for every little thing we want to do which is quite painful
I hate to ask this. But is the only real advantage of Xamarin the fact that we can code in C# instead of native languages? What I was expecting is actual cross-platform shared code-base. If unity can do it, why can Xamarin not do it?
As someone who's worked with Xamarin (certified) for more than 2 years I will try to answer your questions:
1) Xamarin is a .NET framework that compiles to native code for both platforms. 2 years ago you'd create projects for every 'type' of app you built (Android, iOS, etcetera). In practise this meant you writing Activities for android (in the .NET way of doing things, but with the exact same native android types) and UIViewControllers for iOS. Xamarin.Forms has been out for a while and is a solution that will allow you to share UI Code as well as Business logic.
2) Depending on the app, one chooses either Xamarin.Forms or the native route. In case of the native route you'd create views for every platform (Android AXML and iOS Storyboarding). Additionally a PCL would be added containing all the business logic. This way you can call
var authResult = AuthService.Login(username,password);
var settings = SettingsService.GetUserLocalDbSettings();
from both iOS and Android, and the business logic for logging someone in - only has to be written once. Xamarin.Forms allows you to also share UI, by building XAML-layouts in the Xamarin.Forms project. These get transformed to the right screen type in either OS. Note: This only works properly with simple layouts (think lists, tabs etcetera). Complex layouts take way more time in forms to the point you switch to native.
3) Xamarin is only the framework allowing you to write .NET for these platforms. There's a lot of plugins available (e.g. Connectivity check) that are available. Install them in your native projects AND the PCL, and you'll be able to check whether the app has connectivity from within the PCL, or not). Xamarin is the hammer, Nuget offers the nails.
4) You can share a lot of code (PCL). My honest experience though is that most of the time you'll be building layouts (views) for both platforms. The business logic (signing in, saving items to a SQLite database) costs the least time to build. UI / design however,....requires a lot more patience. So YES you can share all business logic (as far as the used libraries respect the PCL profile).
5) Protip: Xamarin offers some free university training since they have been part of Microsoft.
I agree with the comment made by Lex Li above that you seems to be quite new not only in Xamarin space but also in C# development space, but will still try to add to the points mentioned by Eric J which I think he has missed in his answers.
Answer to Question 1:
How does Xamarin Cross-platform actually work? Is it any use?
Already answered by people before me.
What is the use of PCL even in that case?
You didn't found the use of PCL because you didn't tried to use it correct way. It's not for accessing mobile feature from common code, It's used for writing code which is common for all the platforms example for such type of code can be 'Web Service call', 'Business Logic' etc.
Answer to Question 2:
This is a very generic question whose answer is given many times, by many people. The best place to know more about Xamarin is by following the Xamarin Developer Guide
Answers to Question 3:
As mentioned by Lex Li Nuget is core of .Net package distribution and you should use it not only because of this reason but also because it makes development and deployment more easy.
Like :
1) You need not to worry about where to store DLLs (GAC/Local)
2) No need to store a particular version of DLL in fear of loosing it, all the versions are stored on Nuget Servers and Visual Studio automatically downloads the one which is mentioned in you Package config.
3) You can choose to use pre-release version of any DLL in one project and Stable version in other with out worrying about any clash.
Answers to Question 4:
I think all the advantages are already mentioned in above answers, I would request you to first try working with Xamarin sincerely and then start ranting about it.
Unless you learn Xamarin as part of the larger C# ecosystem, the questions and answers will be hard for you to digest.
1 and 2: Kind of the worst questions. So many use Xamarin. PCL is dying if you really know how C# and .NET ecosystem go. .NET Standard and Standard Library will be the future, and have already been supported by the latest beta builds from Xamarin.
3: NuGet is the core of .NET package distribution (like npm for JavaScript) and every C# programmers should use it. If you cannot get used to that, well, nobody forces you to start your own tool chain.
4: Then why not use Unity? What are you waiting for then? Xamarin has its own target user groups, and those guys do appreciate that only the meaningful code should be shared. People do love platform dependent UI, as that can blend perfectly into native platforms.

Xamarin C# and Mobile Platforms

I started Xamarin and I'm beginner. Since there is no documentation about Xamarin, when I have crash I can't find solution.
Anyway, I want to ask some question to you.
There are 2 choices: you can either use only Xamarin code with C# and this code yields to work with Android, IOS and Win Phone, or you can use separate code for Android, IOS and Win Phones. Is this information true or false? (I don't know I am exactly true.)
When I create a .xaml file with C# to yield Android, IOS and Win Phones, how can I use native pages, libraries (ex: SharedPreference). For example, I have a .xaml page and I want to navigate to an Android.Activity page - is this possible?
Thank you for your responses.
Your best friend for bugs and errors is google and stackoverflow. You can find almost everything as xamarin started to grow a lot after microsoft's acquisition.
You can either choose a unified solution like a PCL (Shared or Portable) or seperate projects.All of them are written in C# because that is what Xamarin is doing.
I don't think you have the ability to do that, but i am not sure.
You must do your research in order to find which way of coding is appropriate for your application. If you want to build something very unique with complex ui in each platform, you would probably choose separate projects. Else you can use xamarin forms to have a unique UI across all of your projects.

Resources