Should I use Mono + c#? Or I'm better off learning and using objective c? Thanks
我应该使用Mono + c#吗?或者我最好学习和使用目标c?谢谢
7 个解决方案
#1
1
This is going to be a bit of an opinion question but my take is that you're better off sticking with C#. Switching to objective-C is increasing the amount of new information you must learn before you can be productive in your environment.
这将是一个意见问题,但我认为你最好坚持使用C#。切换到objective-C会增加您必须学习的新信息量,然后才能在您的环境中提高工作效率。
Even keeping with C# you'll still have to ...
即使与C#保持一致,你仍然需要......
- Learn the iPhone API
- Learn the quirks of developing with the iPhone itself
了解iPhone API
了解用iPhone开发的怪癖
There are some downsides to using C# though
但是使用C#有一些缺点
- Most iPhone samples will be in Objective-C. Because you don't know the language it will be harder to apply them to your problem set
- There are bound to be little quirks in using static compilation in Mono that you'll need to get used to.
大多数iPhone样本都在Objective-C中。因为您不了解该语言,所以将它们应用于您的问题集会更加困难
在Mono中使用静态编译肯定会有一些小问题,你需要习惯。
My intuition though is these will be minor compared to the cost of learning a new language.
我的直觉是,与学习新语言的成本相比,这些将是微不足道的。
EDIT
I wanted to clarify my thoughts on learning a new language. I think learning languages is fun and a necessary part of a programmers life. You should be at least experimenting with a new language once every year. This year I'm toying with F#.
我想澄清一下我学习一门新语言的想法。我认为学习语言很有趣,也是程序员生活中必不可少的一部分。你应该至少每年尝试一次新语言。今年我和F#玩弄。
The only reason I recomended against it for this question was the OP said "the easiest way ...". Learning a new language does require extra time and will take a bit more effort so I qualified it as easier to stick with C#.
我推荐这个问题的唯一原因是OP说“最简单的方法......”。学习一门新语言确实需要额外的时间,需要花费更多的精力,所以我认为它更容易坚持使用C#。
#2
24
This will probably offend some but to be honest, if you are going to do any serious development, you should learn Objective-C. Not knowing Objective-C in iPhone development will just be a hindrance. You won't be able to understand many examples; you have to deal with the quirks of Mono whereas if you had a working knowledge of Objective-C you could get a lot more out of the platform documentation.
这可能会冒犯一些,但说实话,如果你要进行任何认真的开发,你应该学习Objective-C。不了解iPhone开发中的Objective-C只会成为一个障碍。你将无法理解许多例子;你必须处理Mono的怪癖,而如果你有Objective-C的工作知识,你可以从平台文档中获得更多。
Personally, I don't understand the position that says increasing the amount of information you need in favor of using Mono over the platform's native language. It seems somewhat counterproductive to me. I think if this is a very expensive proposition (learning a new language) then it may be worthwhile spending some time on fundamental programming concepts so that learning new languages is a fairly cheap proposition.
就个人而言,我不理解这样的立场,即增加您需要的信息量,以支持在平台的母语上使用Mono。这对我来说似乎有点适得其反。我认为如果这是一个非常昂贵的命题(学习一门新语言),那么花一些时间在基础编程概念上可能是值得的,因此学习新语言是一个相当便宜的命题。
#4
7
Monotouch is easier for you now. But harder later.
Monotouch现在更容易。但后来更难。
For example, what happens when new seeds come out you need to test against but break MonoTouch for some reason?
例如,当新种子问世时你需要测试但是出于某种原因打破MonoTouch会发生什么?
By sticking with Mono, any time you are looking up resources for frameworks you have to translate mentally into how you are going to use them with Mono. Your app binaries will be larger, your development time not that much faster after a few months into Objective-C, and other app developers will have that much more of an advantage over you because they are using the native platform.
通过坚持使用Mono,只要您在查找框架资源,就必须在心理上将其转换为如何将它们与Mono一起使用。您的应用程序二进制文件会更大,在开发Objective-C几个月后,您的开发时间不会那么快,而其他应用程序开发人员将比您更具优势,因为他们使用的是本机平台。
Another consideration is that you are looking to use C# because you are more familiar with the language than Objective-C. But the vast majority of the learning curve for the iPhone is not Objective-C, it is the frameworks - which you will have to call into with C# as well.
另一个考虑因素是您希望使用C#,因为您比Objective-C更熟悉该语言。但是iPhone的绝大部分学习曲线都不是Objective-C,而是框架 - 您也必须使用C#调用它。
For any platform, you should use the platform that directly expresses the design philosophy of that platform - on the iPhone, that is Objective-C. Think about this from the reverse angle, if a Linux developer used to programming in GTK wanted to write Windows apps would you seriously recommend that they not use C# and stick to GTK because it was "easier" for them to do so?
对于任何平台,您应该使用直接表达该平台设计理念的平台 - 在iPhone上,即Objective-C。从相反的角度考虑这个问题,如果一个习惯于在GTK中编程的Linux开发人员想要编写Windows应用程序,你会认真地建议他们不要使用C#并坚持使用GTK,因为他们“更容易”这样做吗?
#5
3
If you want to be able to use all of the APIs of the iPhone and have access to native code debugging, you probably are going to want to learn Objective C.
如果您希望能够使用iPhone的所有API并且可以访问本机代码调试,那么您可能希望学习Objective C.
There is, however, Mono-Touch which for a small price lets you develop iPhone apps using C# but lacks debugging support currently. There are also limitations on certain uses of generics and other high-end features. Here's a link to the limitations.
但是,Mono-Touch只需很小的价格就可以使用C#开发iPhone应用程序但目前缺乏调试支持。仿制药和其他高端功能的某些用途也存在局限性。这是限制的链接。
Also, to use Mono-Touch you still need Xcode and a Mac environment set up to develop for iPhone. And it goes without saying you need to join the Apple iPhone developer program if you're actually going to want to deploy anything to an actual device.
此外,要使用Mono-Touch,您仍需要为iPhone开发Xcode和Mac环境。毫无疑问,如果您真的想要在实际设备上部署任何内容,则需要加入Apple iPhone开发人员计划。
#6
0
MonoTouch I think is the way to go but keep in mind it's still in it's infancy. I was able to install the Mono development tools and get the MonoDevelop IDE working but the IDE in it's current state is incredibly slow and almost unusable; at least running on Snow Leopard for Mac OSX. I did some googling and it looks to be that this is a known issue but is fixed in the bleeding edge repositories of MonoDevelop. I think Novell is on to something but I also feel that you will be wrestling with the entire framework while it's still in the early stages.
MonoTouch我认为是要走的路,但请记住,它还处于初期阶段。我能够安装Mono开发工具并使MonoDevelop IDE工作,但处于当前状态的IDE非常慢且几乎无法使用;至少在适用于Mac OSX的Snow Leopard上运行。我做了一些谷歌搜索,看起来这是一个已知的问题,但修复在MonoDevelop的前沿存储库中。我认为Novell正在努力,但我也觉得你将在整个框架中挣扎,而它仍处于早期阶段。
So bottom line, if you want to go to the C#/MonoTouch route, be prepared to put in a lot leg work, and ghost chasing because of instabilities or incompleteness of the framework. I think this is true for any new framework.
所以,如果你想要进入C#/ MonoTouch路线,准备投入大量的工作,并且因为框架的不稳定性或不完整性而追逐幽灵。我认为任何新框架都是如此。
#1
1
This is going to be a bit of an opinion question but my take is that you're better off sticking with C#. Switching to objective-C is increasing the amount of new information you must learn before you can be productive in your environment.
这将是一个意见问题,但我认为你最好坚持使用C#。切换到objective-C会增加您必须学习的新信息量,然后才能在您的环境中提高工作效率。
Even keeping with C# you'll still have to ...
即使与C#保持一致,你仍然需要......
- Learn the iPhone API
- Learn the quirks of developing with the iPhone itself
了解iPhone API
了解用iPhone开发的怪癖
There are some downsides to using C# though
但是使用C#有一些缺点
- Most iPhone samples will be in Objective-C. Because you don't know the language it will be harder to apply them to your problem set
- There are bound to be little quirks in using static compilation in Mono that you'll need to get used to.
大多数iPhone样本都在Objective-C中。因为您不了解该语言,所以将它们应用于您的问题集会更加困难
在Mono中使用静态编译肯定会有一些小问题,你需要习惯。
My intuition though is these will be minor compared to the cost of learning a new language.
我的直觉是,与学习新语言的成本相比,这些将是微不足道的。
EDIT
I wanted to clarify my thoughts on learning a new language. I think learning languages is fun and a necessary part of a programmers life. You should be at least experimenting with a new language once every year. This year I'm toying with F#.
我想澄清一下我学习一门新语言的想法。我认为学习语言很有趣,也是程序员生活中必不可少的一部分。你应该至少每年尝试一次新语言。今年我和F#玩弄。
The only reason I recomended against it for this question was the OP said "the easiest way ...". Learning a new language does require extra time and will take a bit more effort so I qualified it as easier to stick with C#.
我推荐这个问题的唯一原因是OP说“最简单的方法......”。学习一门新语言确实需要额外的时间,需要花费更多的精力,所以我认为它更容易坚持使用C#。
#2
24
This will probably offend some but to be honest, if you are going to do any serious development, you should learn Objective-C. Not knowing Objective-C in iPhone development will just be a hindrance. You won't be able to understand many examples; you have to deal with the quirks of Mono whereas if you had a working knowledge of Objective-C you could get a lot more out of the platform documentation.
这可能会冒犯一些,但说实话,如果你要进行任何认真的开发,你应该学习Objective-C。不了解iPhone开发中的Objective-C只会成为一个障碍。你将无法理解许多例子;你必须处理Mono的怪癖,而如果你有Objective-C的工作知识,你可以从平台文档中获得更多。
Personally, I don't understand the position that says increasing the amount of information you need in favor of using Mono over the platform's native language. It seems somewhat counterproductive to me. I think if this is a very expensive proposition (learning a new language) then it may be worthwhile spending some time on fundamental programming concepts so that learning new languages is a fairly cheap proposition.
就个人而言,我不理解这样的立场,即增加您需要的信息量,以支持在平台的母语上使用Mono。这对我来说似乎有点适得其反。我认为如果这是一个非常昂贵的命题(学习一门新语言),那么花一些时间在基础编程概念上可能是值得的,因此学习新语言是一个相当便宜的命题。
#3
#4
7
Monotouch is easier for you now. But harder later.
Monotouch现在更容易。但后来更难。
For example, what happens when new seeds come out you need to test against but break MonoTouch for some reason?
例如,当新种子问世时你需要测试但是出于某种原因打破MonoTouch会发生什么?
By sticking with Mono, any time you are looking up resources for frameworks you have to translate mentally into how you are going to use them with Mono. Your app binaries will be larger, your development time not that much faster after a few months into Objective-C, and other app developers will have that much more of an advantage over you because they are using the native platform.
通过坚持使用Mono,只要您在查找框架资源,就必须在心理上将其转换为如何将它们与Mono一起使用。您的应用程序二进制文件会更大,在开发Objective-C几个月后,您的开发时间不会那么快,而其他应用程序开发人员将比您更具优势,因为他们使用的是本机平台。
Another consideration is that you are looking to use C# because you are more familiar with the language than Objective-C. But the vast majority of the learning curve for the iPhone is not Objective-C, it is the frameworks - which you will have to call into with C# as well.
另一个考虑因素是您希望使用C#,因为您比Objective-C更熟悉该语言。但是iPhone的绝大部分学习曲线都不是Objective-C,而是框架 - 您也必须使用C#调用它。
For any platform, you should use the platform that directly expresses the design philosophy of that platform - on the iPhone, that is Objective-C. Think about this from the reverse angle, if a Linux developer used to programming in GTK wanted to write Windows apps would you seriously recommend that they not use C# and stick to GTK because it was "easier" for them to do so?
对于任何平台,您应该使用直接表达该平台设计理念的平台 - 在iPhone上,即Objective-C。从相反的角度考虑这个问题,如果一个习惯于在GTK中编程的Linux开发人员想要编写Windows应用程序,你会认真地建议他们不要使用C#并坚持使用GTK,因为他们“更容易”这样做吗?
#5
3
If you want to be able to use all of the APIs of the iPhone and have access to native code debugging, you probably are going to want to learn Objective C.
如果您希望能够使用iPhone的所有API并且可以访问本机代码调试,那么您可能希望学习Objective C.
There is, however, Mono-Touch which for a small price lets you develop iPhone apps using C# but lacks debugging support currently. There are also limitations on certain uses of generics and other high-end features. Here's a link to the limitations.
但是,Mono-Touch只需很小的价格就可以使用C#开发iPhone应用程序但目前缺乏调试支持。仿制药和其他高端功能的某些用途也存在局限性。这是限制的链接。
Also, to use Mono-Touch you still need Xcode and a Mac environment set up to develop for iPhone. And it goes without saying you need to join the Apple iPhone developer program if you're actually going to want to deploy anything to an actual device.
此外,要使用Mono-Touch,您仍需要为iPhone开发Xcode和Mac环境。毫无疑问,如果您真的想要在实际设备上部署任何内容,则需要加入Apple iPhone开发人员计划。
#6
0
MonoTouch I think is the way to go but keep in mind it's still in it's infancy. I was able to install the Mono development tools and get the MonoDevelop IDE working but the IDE in it's current state is incredibly slow and almost unusable; at least running on Snow Leopard for Mac OSX. I did some googling and it looks to be that this is a known issue but is fixed in the bleeding edge repositories of MonoDevelop. I think Novell is on to something but I also feel that you will be wrestling with the entire framework while it's still in the early stages.
MonoTouch我认为是要走的路,但请记住,它还处于初期阶段。我能够安装Mono开发工具并使MonoDevelop IDE工作,但处于当前状态的IDE非常慢且几乎无法使用;至少在适用于Mac OSX的Snow Leopard上运行。我做了一些谷歌搜索,看起来这是一个已知的问题,但修复在MonoDevelop的前沿存储库中。我认为Novell正在努力,但我也觉得你将在整个框架中挣扎,而它仍处于早期阶段。
So bottom line, if you want to go to the C#/MonoTouch route, be prepared to put in a lot leg work, and ghost chasing because of instabilities or incompleteness of the framework. I think this is true for any new framework.
所以,如果你想要进入C#/ MonoTouch路线,准备投入大量的工作,并且因为框架的不稳定性或不完整性而追逐幽灵。我认为任何新框架都是如此。