by Charles Ying

Archive for April, 2010

Fortune Favors the Brave

Sunday, April 11th, 2010

Section 3.3.1 of the iPhone SDK Agreement:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

The thing to understand about Section 3.3.1. is that it is the legal letter of the SDK agreement, but not the desired intent.

Developers are allowed to use SQL for database operations. Developers are encouraged to use GLSL via OpenGL ES 2.0 for fast graphics. SQL and GLSL are not languages in the Objective-C family and they are compiled / interpreted. But they also don’t directly link against the Documented APIs (e.g., there’s no “SELECT subviews FROM UIView”).

Regular expressions and XSLT (ugh) are also similarly permitted.

How I intend to interpret Section 3.3.1., as an independent iPhone developer is as follows: Use Objective-C where it makes the most sense: directly interfacing with the iPhone SDK. When I need different tools to achieve something application specific, like an AI in Lua or printing commands in PostScript, I’m going to use them.

For me personally, I feel that this is what Apple permits and practices in the course of mobile software development.

Practices? Yeah. Have you looked at what iPhone OS itself uses? XML and JSON for data serialization. Nibs, property lists, XSLT in XML domain specific languages. TinyScheme to interpret Scheme code for sandboxed process permissions. hunspell‘s DSL drive the spell check dictionaries.

For sure, Apple has impure motives. But that doesn’t mean they’re wrong. Mobile constraints are different. Battery life and performance matter. A lot.

Use the right tools for the job: Objective-C when talking to iPhone OS. But whatever your application’s brain needs to think different.

Technorati Tags: , , , , ,