中间件和第3.3.1节

Miguel de Icaza撰写了一篇深思熟虑,内容丰富的文章本周关于如何MonoTouch的有效,以及如何避免与Apple的冲突new Section 3.3.1它是两天前发布的,因此,之前 史蒂夫乔布斯的“关于Flash的思考”论文发表De Icaza关于新的,更具限制性的3.3.1节的商业案例的理论几乎被乔布斯证实 - 苹果公司不希望在Cocoa Touch之上构建跨平台最低通用标准的应用程序。

De Icaza的第二个理论认为新的第3.3.1节的UI案例:

As I mentioned before, using cross-platform solutions like Flash or Silverlight would make every application look alienBut also like Steve Jobs alluded to, developers would not have access to new features on the iPhone OS if they had chosen a technology that did not expose it.

For example, when Apple introduced in iPhone OS 3.2 the new split views that the iPad uses extensively when rotating your screen, that functionality would have taken too long to bring in a satisfactory way to say Silverlight on iPhone or Flash on iPhone. Or when Apple introduced the UIView that can be used to render maps, it would also have been challenging to embed this control. Or when Apple introduced GameKit, an API to connect iPhones and exchange messages between them.

我们知道,Flash的交叉编译器已被新的3.3.1节明确排除然而,MonoTouch的地位尚不清楚正如de Icaza所解释的那样,与Flash不同,MonoTouch不是创建一次性运行任何跨平台的UI:

MonoTouch brings the C# language and the core of .NET to the iPhone, but does nothing to provide a cross-platform UI experience or for that matter any sort of mobile device cross-platform APIs[...]

We released the iPad support 24 hours after Apple released the SDKWe released the iPhoneOS 4.0 support within days of the release (mostly because every one of us was pretty bummed out).我们的API是与iPhone API的1:1映射

Just like C and C++, if developers want to reuse code between MonoTouch, Windows 7 or MonoDroid, they will have to split their UI and device-specific code from their business logicMonoTouch does not provide such an abstraction layer.

MonoTouch是与Flash的iPhone编译器在同一条船上,因为它不是一个跨平台的框架如果你愿意的话,这是一个较浅的灰色阴影但它仍然是开发人员和Apple自己的API之间的一层中间件是的,MonoTouch今天与Apple的原生API保持同步,但是如果MonoTouch发生了三年,四年,五年后会发生什么停止keeping up and hundreds (or thousands) of popular iPhone OS apps are dependent upon it? That’s the scenario Apple wants to avoid.

以下是乔布斯的“关于Flash的想法”:

We know from painful experience that letting a third party layer of software come between the platform and the developer ultimately results in sub-standard apps and hinders the enhancement and progress of the platformIf developers grow dependent on third party development libraries and tools, they can only take advantage of platform enhancements if and when the third party chooses to adopt the new featuresWe cannot be at the mercy of a third party deciding if and when they will make our enhancements available to our developers.

从苹果公司的角度来看,就是这样一种“痛苦的经历”Metrowerks的PowerPlant框架PowerPlant是经典Mac OS的GUI工具包和应用程序框架,随Metrowerks的CodeWarrior编译器和IDE一起提供这是非常好的,非常受欢迎 - 许多流行的Mac应用程序是使用PowerPlant框架构建的。

几年后问题出现了,转移到Mac OS X.1PowerPlant的设计并未考虑到Mac OS X,也未充分利用Mac OS X的最新进展例如,Carbon Events的支持直到2004年才出现在PowerPlant上基于PowerPlant的应用程序没有简单或直接的方式来过渡到同类最佳的原生Mac OS X应用程序抛开Cocoa,PowerPlant应用程序无法利用最新和最好的Mac OS X Carbon API。

Now, the comparison isn’t quite apples-to-apples, because one of the biggest differences between classic Mac OS and Mac OS X is that classic Mac OS didn’t have a built-in One True App Framework like Mac OS X does with Cocoa(And, it’s worth emphasizing that Carbon was a first class toolkit for Mac OS X for the first half of the decade — Cocoa wasn’t really officially positioned as the One True Framework until, arguably, WWDC 2007, when Apple abruptly cancelled 64-bit Carbon, which had been announced for Mac OS X 10.5 just 9 months earlier在2006年WWDC上.) The Metrowerks developers who created PowerPlant couldn’t have foreseen Carbon and Mac OS X, let alone foresee Cocoa, and the Mac developers who decided to use PowerPlant weren’t spurning any sort of “No, this is what you should be doing” advice from Apple.

但是因为PowerPlant(a)很受欢迎而且(b)没有跟上Mac OS X中最新的平台进展,它成为苹果公司的一个锚点,它减慢了它们的速度Apple花费了大量时间,金钱和精力来支持PowerPlant开发人员并将他们带到Apple想要采用该平台的地方。

所以我在这里的比较并不是说PowerPlant是坏的,或者依赖它的开发人员做错了什么更确切地说,苹果公司了解到让苹果公司的API和第三方开发商之间采用任何技术存在重大风险Apple无法修复PowerPlant他们无法将其移植到Mac OS X本身它不在他们手中,摩托罗拉(它在1999年买下了Metrowerks)有其他优先事项。

De Icaza认为,这是第三方开发者应该做出的决定:

As a developer, I feel that I should be responsible for my technological choicesIf I pick a cross-platform toolkit that looks horrible on the iPhone, it will just leave the space open for a competitor to do a better jobOr if my application does not take advantage of a new API in iPhone OS, I am also leaving a flank open for a competitor to take overApple does not need to intervene with guidelines as the application quality, the App Store, magazines, reviews and word of mouth are creating the conditions for an all-out darwinian survival of the fittest.

我认为上面的段落很好地表达了许多开发商的观点,他们强烈反对,并且在许多情况下完全被苹果新的3.3.1节限制所冒犯。“让我冒险在我想要使用的中间件和底层的Cocoa Touch框架之间打开一个鸿沟,“ 或多或少。

这是完全合理的但Apple的观点也是合理的 - 过去当流行的开发者工具和框架已经无法控制时,他们已经遭受了损失此时,苹果公司有能力通过法令禁止这些“平台与开发商之间的第三方软件层”如果他们等到将来出现实际的兼容性问题,那可能为时已晚 - 在这一点上,如果不兼容的中间件系统足够流行,那么影响将依赖于集体第三方开发人员依赖于中间件,而不是AppleApple can ban them by fiat now; they can’t ban them by fiat in a future where they’re in widespread use.

使用中间件层,底层平台可能会遇到困难Apple希望尽可能多地控制原生iPhone应用程序,而且正如乔布斯所说,它正在使用这种控制来推动“平台的增强和进步”。

John Siracusa hit these same points two weeks ago, in a piece titled “Apple的赌注“:

Like the Mac, the iPhone debuted with a huge technical lead over its competitorsBut this time, Apple is determined not to squander its advantageInstead, it’s front-running as hard as it possibly can任何有可能放慢速度的东西“the progress of the platform“只是得走了And the best way Apple knows to ensure platform progress is by controlling its own destiny in every way that it canThat means, among other things, no middleware vendors, no encouragement of cross-platform development (either explicit or implicit), and complete, arbitrary control over every application’s presence on the platform.

It’s Apple’s contention that other mobile platforms that allow these things, most of which developers adore, do so at the cost of slowing the speed with which they advance upon their competitors.

我不知道Apple是对的正如我上面所说的那样,de Icaza的观点 - 这些决定和风险应由个体开发者制定 - 是完全明智的锡拉库扎完全正确,这是苹果的赌注Apple认为其整个移动未来的开发者平台优于其他所有人。


  1. 这篇文章的原始版本错误地说明了PowerPlant根本不兼容Carbon:“PowerPlant不兼容碳基于PowerPlant的应用程序没有简单或直接的方式来过渡到Carbon这些是在Mac OS X上以经典模式运行的应用程序。“这是不正确的,例如,从1999年5月开始看这个PRI regret error, but the example, I think, still stands. ↩︎