Cocoa, Carbon and the Human Factor
Lately there was some discussion, initiated by Wil Shipley about Carbon (C API) and Cocoa (Objective-C API) and which one provides a better abstraction.
I love Cocoa and I love to have as much APIs as possible available in Cocoa. But one fact that was forgotten in the discussion is the influence of the framework developers.
I code - But am I a framework developer?
The language a programmer chooses to implement an API/Framework has an effect on the elegance and interface of an API. But his personal experience in the topic and in framework development in general has a much greater effect. Framework development is a hard job. If you are in luck you have written three or four applications and you get the chance to extract the common parts.
If you are out of luck (that’s more typical) you have to guess. You have to guess which functionality is needed most, which would be the best abstraction layer and if your future users would prefer a state-full or stateless API, and so on. You have to decide a number of things and you have to do it right in the first place. You don’t want all your users to change their code with your next update, won’t you? If you are a Java developer you know what I mean when you look at java.util.Date…
Compatibility is the enemy of the framework developer. When you guess wrong in the first run you might not get a chance to correct your error soon.
Experience Matters
Knowledge about the topic, the users and the technology is essential in order to do great frameworks. The more frameworks you do the more knowledge you get about patterns that are helpful to get more flexibility, minimize coupling and increase abstraction. And don’t expect to get a great framework from an Java expert when he does one in Ruby for the first time.
Experience is essential
Therefore instead of releasing lame, half-baked frameworks, take your time to refine lower abstraction layers first. If there is enough experience and time to do the next abstraction layer than do it. But don’t forget that there will be a lot more maintenance, too.
I love Cocoa, I love Carbon, I love Java, I love Ruby, … but I hate inflexible, half-baked, undocumented, lame frameworks and APIs. It’s not a language thing alone.