Welcome to Conveniently Cocoa

More developers are converting over to Cocoa programming every day. It started back in the 1980's with software development gurus who used it to use its rapid application development (RAD) toolset to create model-view-controller (MVC) graphical user interface (GUI) applications. They produced some of the earliest investment banking applications, as well as the World Wide Web.

Today, a new generation of iPhone and Mac developers are finding it the way to create apps for rapidly growing software markets for these platforms, as well as the new iPod Touch. If you know what OOP, MVC, RAD, and WYSIWYG mean - you just might become one of them!


fitting in well with a person's needs, activities, and plans

Tuesday, December 29, 2009

What I hope to provide here

Conveniently, Cocoa brings together a lot of powerful, elegant, proven software techniques and technologies into one place.

I have learned a lot of programming & document languages and a lot of GUI and non-GUI user interface APIs & frameworks over the year.

Some have been very easy: Pascal, BASIC, C, CSS, FORTRAN, Java, LISP, LOGO, PILOT, x86 assembly language, XSLT.  Others were unexpectedly difficult until a certain point, for a reason I think I at last understand. This means you,  Prolog, SQL, etc.

I learned them and a bunch of other ones.

I think what makes a language or a framework easy to learn, once you have good documentation - tutorials, examples, and reference material - is the tools.  That is what got me unstuck at these languages.

Once you have a good tool that lets you try things out in realtime, you can go from being a decent programmer/author to a guru.

What I would like to do initially, is point out to people really excellent documentation.

That way, they will have a good foundation of knowledge to start experimenting with Cocoa on their own if they are a beginner.  If they are already an advanced Cocoa developer, they might discover a handy yet unfamiliar blog or web page by glancing at the sidebar.

Once I am proficient at Cocoa, both the framework and the Interface Builder, I would like to do some posts that provide decent tutelage.  That is where you come in.

For the next couple weeks, I will have a poll open on this blog.  You can make your desires known with it. That will give me some guidance about what type of information you find you are most in need of at this time.

Cocoa brings

Conveniently, Cocoa brought Apple its own cleverly-designed, object-oriented Model-View-Controller programming framework for rapid application programming.

Thanks to its acquisition of co-founder and CEO Steve Jobs NeXT computer company, Apple enabled itself to leap into desktop applications programming with rewed vigor.  The acquisition granted Apple exactly what it needed to create completely compelling consumer electronics products.

  • a solid, UNIX-based OS (NeXT OS was written on top of Unix) - Mac OS X is written on top of FreeBSD UNIX and Mach 3 kernel
  • a rapid application development environment:  Interface Builder and Xcode (formerly called Project Builder) - Interface Builder is truly unique, going far beyond the Microsoft world of wizard-wizards
  • the Cocoa framework (originally called NextStep) that easily gives applications an MVC GUI architecture - for programmers who invest the time to learn to use it
Convenience is a two-edged sword. Cutting corners can have negative consequences in computing.  However, skillful architecture and design can make things both easy and safe.

Cocoa was created in the 1980's, building upon the best-known "classic" object-oriented patterns such as the MVC triad. It was used to create the original web browser by Tim Berners-Lee,  the inventor of the World Wide Web and the founder of the W3.

MVC is a very simple idea. Write data-centric programs.  It is very counter-intuitive to do this when you are striving to create  a terrific GUI application.

However, it turns out to be the right thing to do.

User interfaces change rapidly and frequently.  As quickly as users can change their minds and for as long as it takes for them to make up their minds as to what they really need.  Trust me, that produces a lot of changes.  As long as things stay within the intended scope of the project and everything is converging on the original goal, that is a good thing.

But to make that happen, developers need an architecture that can make that happen.  A good programming language, good development support tools, and a good class framework library are essential.  That is where Cocoa fits in.

Cocoa programmers typically create their user interface in a WYSIWYG, RAD tool named Interface Builder.  IB lets them directly assemble the GUI using the same drag-and-drop techniques pioneered by the Macintosh in the 1980's.

Not only do they do that, but they also connect together those components with the data model they design to hold the application's business objects.  Modern Cocoa even includes a framework with it named CoreData which can automatically load/store the business objects in a database.

Using Cocoa takes more learning than a lot of programming APIs.  However, once you learn it you are able to create/modify applications much faster and more easily than usual.

Cocoa has not only built on a lot of classic patterns and blazed a few innovative trails of its own, it has adopted new trend setting patterns that have come along over the decades.  One of these is unit testing.  Cocoa and Xcode come with a unit testing framework, OCUnit.

The Xcode IDE is not just a regular IDE. It comes with data modeling tools so that visualizing your data object model is easy.  In fact, it can create a class model diagram of it for you.  It can also do a static analysis of your program and point out definition-usage (DU) errors, like spots where the value in a variable can possibly be undefined.

Xcode is multilingual too.  It supports many programming and document languages, not just one or two. Cocoa is too.

Objective-C is generally the best language to use for Cocoa programming since that is what it is written in.  However, Apple includes a terrific scripting language named AppleScript with the Mac named.  Scripting languages like Python, Ruby, and Perl cropped up during the 1990's around the same times as ApplesScript.  Cocoa and Xcode support them too, not just its proprietary AppleScript language.

Forcing you to always use one tool, one language, or a single company's technology is not the Apple way. Apple has fostered an open environment on the Macintosh where programmers can be productive and users can reap the rewards.

Conveniently, Cocoa brings the power of all of these things right to your fingertips.