Android开发中MonoDroid VS Java?
我非常了解 C#,并且喜欢将 Visual Studio 作为 IDE。 :) 但现在我想开始为 android 开发...
我发现了 MonoDroid 并想问它是否可以它有什么缺点可以让 Java 更受欢迎,或者我应该卸载 Eclipse 并直接进入 MonoDroid?
如果我理解正确的话,MonoDroid 部署/编译本机 Android 应用程序,不需要任何额外的 .net 之类的框架或任何东西?
MonoDroid 的功能有什么重大限制吗?例如,让应用程序在后台运行或使用一些外部 .net 库进行图像编辑等?
I know C# rather well and just love Visual Studio as IDE. :) Yet now I want to start developing for android...
I found out about MonoDroid and wanted to ask if it has any downsides to it that would make Java more preferable, or should I uninstall Eclipse and dive straight into MonoDroid?
If I understand right, MonoDroid deploys/compiles native android applications and does not need any additional .net-like framework or anything?
Are there any significant limitations to what I can do with MonoDroid? For example, having the app run in the background or using some external .net libraries for image editing, etc. ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我一直在担心同样的事情 - C# 的生产力,而不是使用不熟悉的语言,而不是按照操作系统开发人员的预期进行开发。
很容易列出优缺点 - 优点
(monodroid,对于 C# 开发人员)
缺点 -
I've been worrying about the same thing - productivity in C# instead of playing with an unfamiliar language, vs developing how the OS developers intended it to be.
Its easy to list pros vs cons -
pros (of monodroid, for C# developers)
cons -
大多数可用文档都是用 Java 编写的:因此,如果您在使用 MonoDroid 时遇到电话行为方面的困难,您将不会真正找到太多帮助或调试信息,因此您可能需要坚持使用 Eclipse。
Much of the documentation available is in Java: so if you run into difficulties with phone behavior when using MonoDroid you won't really find that much help or debugging information so you may want to stick with Eclipse.
说实话,在 davlick 下运行的不仅仅是一组包装器,MonoDroid 和 Android 之间还有更多的横向关系;
与操作系统开发人员使用相同的语言何时成为一个大问题?有很多 C++ 程序员想知道如何使用 BSD 或 SVR5,还有很多 C 程序员想知道在 Windows++ 上到底能做什么...
There's a lot more than just a set of wrappers running under davlick, truth to be told, there is much more of a horizontal relationship between MonoDroid and Android;
When did using the same language as the OS developers become a big issue? There's lots of C++ programmers wondering how to use BSD or SVR5 and many C programmers who want to know what the heck to do on Windows++...
如果您无论如何都要用 C# 编写,则必须将其包装成 Java 代码,那么有什么意义呢?此外,在尝试理解为 Java 编程编写的 API 时,您可能会遇到非常困难的问题......
If you will write in c# anyway you will be have to wrap it into a Java code, so what's the point ? Also you may head with a very difficult issues while trying to understand the APIs who written for Java programming...
以下是您可以仔细考虑的一些要点:
Android 应用程序主要是用 Java 编写的。 Android SDK 本身是用 Java 编写的。
使用 Mono 可能无法提供 Java SDK 中提供的所有功能。
如果您是 C# 开发人员,您将无法在 Java 中找到 C# 中可用的一些(很酷)功能(如属性委托等)。
用 .NET 编写的代码可以在其他环境中重复使用 - 这可能会节省大量学习新语言/环境(如 Objective C)和在其中进行编码的时间。
.NET 使用其现有的库和 API 扩展了 Android 开发堆栈。
我认为出于某些原因两者都很好。很难说哪一个更适合 Android 开发——最终这也取决于你的决定。
Here are some points that you can mull over:
Android applications are predominately written with Java. The Android SDK itself is natively written in Java.
Working in Mono may not provide all the functionality available in the Java SDK.
If you are a C# Developer you wont be able to find, in Java, some of the (cool) features available in C# (like Property Delegates etc).
Code written in .NET can be re-used for other environments - this may save a lot time that would have been spent learning a new language/environment (like Objective C), and coding in it.
.NET extends the Android development stack with it's existing libraries and API's.
I think both are good for certain reason. It will be very hard to say which one is preferable for Android development - in the end that is up to you too decide.
另请注意,使用 monodroid 的任何发布版本都会使 apk 文件大小额外增加 4mb,并增加应用程序启动时间几秒钟。
对于简单的应用程序,这可能意味着文件大小增加 500-800% - 这在我看来是相当糟糕的。
Also note that any release build using monodroid adds an additional 4mb to the apk filesize and increases app startup time with a few seconds.
For simple apps this can mean a 500-800% increase in filesize - whic is pretty bad in my book.