Skip to main content

Learning to Code: The Month (and More) of Cocoa Begins

This week I am beginning a month (and more) of intense "Cocoa" immersion. Cocoa, for those outside the OS X/iOS development realm of Apple, is the framework created by Apple's wizards to make programming for Apple hardware a (tiny) bit easier.

Since I want to develop applications for Macs and iOS devices, I need to learn the Cocoa frameworks. It's going to be a long journey, and a fun one. On this blog, I'll be posting about programming as an educational experience. I'll also continue to explore programming as a form of writing.

I'm surely not going to do the topic justice, but allow me an attempt to explain how computer languages and frameworks are similar to other languages. When we write in any language, we start with a core of basic words and grammar. Computer languages are more concrete and simplistic than living languages, but you might compare them to the languages children speak.

I am not going to go über-geek in this post and explain the translation of a computer language to executable code. Let's just accept that the simplistic brain (CPU and other computer components) does like the human brain and converts words to thoughts and actions. (I will in a later post, which I have already outlined.) I'm going to keep this discussion at the higher level (relatively speaking) of the programming languages most mortal coders use. The art of assembly language coding is limited to a sect of high priests of hardware in the modern coding universe.

Most programmers developing for Apple hardware use the Objective-C programming language. As with human languages, Obj-C represents an evolution from other languages. Scholars can trace the family tree of English, and we can trace the family tree of Obj-C. Most programming texts for OS X/iOS include a short history of Obj-C, explaining that the language was developed as an extension of the "C" programming language, borrowing ideas from Smalltalk and other object-oriented languages.

See:


Computer languages evolve, even after they are initially designed. Objective-C, already C with ideas from Smalltalk, continues to pick up words and syntax elements from other languages. American English adds words from other languages, and new words are created. Objective-C has done the same. And, sometimes, a language loses a word or the syntax changes over time. The original Obj-C was extended when Apple introduced OS X, based on the NeXTSTEP (or NextStep) operating system. Obj-C was updated again significantly in 2006, but overall the language core has remained relatively stable (unlike the cores of some other languages).

By itself, Objective-C is okay but not very useful for creating complex OS X/iOS application. Apple developers need to use the Cocoa frameworks to craft applications. Because Cocoa is so fundamental to Apple programming, many refer to all coding for Macs and iOS devices as "Cocoa programming" — an accurate description, since calling Cocoa code is essential to the process. The Cocoa frameworks are numerous and seemingly ever-expanding as Apple adds to their libraries.

For example, Apple's Cocoa frameworks include the "Cocoa Touch" framework for touch-screen development. Instead of creating a new way to deal with touch screen interactions, a programmer uses the Cocoa Touch framework. Again, when I write about computer languages later this month, I will explain how frameworks (for better and worse) extend programming languages. For now, you can read Apple's pitch to developers:


This first post is short; you can expect me to explore the preceding topics in greater detail throughout the month. Writing about what I learn and observe will help me — and my readers.

Comments

Popular posts from this blog

Practical Technology Skills

This blog is a revision to a column I wrote for Direct Media publications. Normally, I wouldn't repost something I wrote for hire, and I certainly don't wish to anger one of my publishers. However, since this blog is primarily accessed by one of my graduate seminars, I think the publisher will appreciate that I am extending my thoughts for educational purposes. I'm also more than willing to encourage businesses to visit the Direct Media home page . Page numbers seemed to be a half-inch lower on each successive page. I stared at the mid-term paper, handed in to me by a junior at the university, and thought back to my fights with dot-matrix printers. When I was an undergrad, my Epson FX/80 printer jammed often and would sometimes rip pages after the sprockets slipped out of alignment with the punched holes of the perforated paper. Surely the undergraduate author of this paper suffered the curse of a similarly possessed printer, I told myself. “I guess when I changed the ma...

Pursuing a University Degree Online

Visalia Direct: Virtual Valley February 2008 Issue January 7, 2008 Pursuing a University Degree Online When a star high school student graduates in Tulare County, the difficult reality is that he or she most likely will leave to attend a four-year university. For an eighteen-year-old student, leaving the Central Valley, or at least Tulare County, is part of the educational experience. But, after returning to Visalia some of us find out that our undergraduate educations are not quite enough. For those in education, Fresno State, Fresno Pacific University, Chapman University, and others have offered courses in Visalia for a number of years. This makes it possible to work and still complete a teaching credential or an advanced education-related degree. I have been thankful for the options we have in the Central Valley. But, as others have learned, if you are interested in some fields you must commute to Fresno — or even further. With the drive to Fresno taking just under an hour...

MarsEdit and Blogging

MarsEdit (Photo credit: Wikipedia ) Mailing posts to blogs, a practice I adopted in 2005, allows a blogger like me to store copies of draft posts within email. If Blogger , WordPress, or the blogging platform of the moment crashes or for some other reason eats my posts, at least I have the original drafts of most entries. I find having such a nicely organized archive convenient — much easier than remembering to archive posts from Blogger or WordPress to my computer. With this post, I am testing MarsEdit from Red Sweater Software based on recent reviews, including an overview on 9to5Mac . Composing posts an email offers a fast way to prepare draft blogs, but the email does not always work well if you want to include basic formatting, images, and links to online resources. Submitting to Blogger via Apple Mail often produced complex HTML with unnecessary font and paragraph formatting styles. Problems with rich text led me to convert blog entries to plaintext in Apple Mail ...