What is the difference between html5 and xamarin?

雨燕双飞 提交于 2020-01-01 12:13:20

问题


I'm a C# .NET developer.

I want to develop mobile apps that can run on iphone, android, and windows phone.

As far as now, I found that www.xamarin.com provides a solution that can develop iphone and android using C#.

What is the difference between html5 and xamarin?

Which technology should I use that I can develop once and run on all platform?


回答1:


The main difference is that HTML5 works on a browser and xamarin does not (for as far as I researched it). With HTML5 it is easier to develop on multiple devices. But xamarin who makes native apps, can access native functions on your device (like notifications and so on). But the downside is that xamarin is a bit harder to make it work on multiple devices. Also a native app has to be installed, a HTML5 app does not. So what you should be asking yourself is, what kind of app do I want to make. Furthermore something as an app that runs on all platforms does not exist yet. Some HTML5 frameworks offer a large support (like JQmobile) but all platforms is nearly impossible.




回答2:


I think that a better description of your choice would be between MonoTouch (created by Xamarin) and PhoneGap (which provides a native wrapper to HTML5). Both generate native applications. Both work on multiple platforms. Both permit external Objective-C libraries to be linked in.

If there's external libraries needed - I think that PhoneGap might be more platform-independent than MonoTouch - I've only done iOS development but I believe that the Android Mono libraries are structured a bit differently so it's not reasonable to have the same codebase for the UI portion of your app. But in this case you might just stick to HTML5 and put all the code on a server.

If you need to link in external libraries - I found PhoneGap much easier than MonoTouch. I can create a PhoneGap project in the same Xcode workspace as the rest of my code and everything just compiles and debugs nicely. With MonoTouch I have a number of script files that make universal static libraries and then they are linked in via awkward gcc flags.

If you can stay in the HTML5 world I would recommend hosting all your files on a server so you avoid all the deployment headaches associated with native apps. But if you need a native app you can make amazing applications in either environment.




回答3:


well, they are two COMPLETELY different things.

briefly:

-HTML5 is a standard for web pages, still under review (this means that it is not final and may vary ANYTIME)

-xamarin is a framework to develop cross-platforms applications. This means that it is a set of tools that will allow you (in this case) to code from C# and .net and get a mobile application (yeah most probably it will be a set of HTML5 with js webpages, but i have never actually used it)

So you can say that xamarin (probably) uses HTML5 for the final output, but that's it. has pratically nothing in common with html5




回答4:


Below link will give more insight about Monodroid (which is Xamarin's solution to develop Android applications by using .NET):

http://monodroyd.wordpress.com/2011/12/04/introduction-to-mono-for-android/

Hope this helps!



来源:https://stackoverflow.com/questions/9408992/what-is-the-difference-between-html5-and-xamarin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!