The
Ultimate
Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo






Latest Joy of Tech!

Joy of Tech ... from Geek Culture



Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

The Ultimate Business Machine - Archives

List of Categories : Commentary * Database * Singapore * Technology * Travel *

Sun 26 Dec 2004

Cocoa Bindings

Category : Technology/CocoaBindingsAndJava.txt

I'm trying to understand Cocoa Bindings, to see if I can write less code. My starting point is Michael Beam's O'Reilly article, "The Cocoa Controller Layer". I've been playing around with extending the sample code and it's starting to become clearer - like when and how to step in and do custom things, like interfacing with a database.

This will make a great demo (of the jaw-dropping kind). But my databases are all accessed through Java JDBC drivers, and we've got tons of Java code I'd like to plug into. So, I started on a Java-Cocoa version and got things to the point where the Table View shows the right data but the application crashes soon after.

Reminds me of Aaron Hillegass' "Don't write Cocoa applications with Java" comment. It's a fair point. But you may have code that already work well in Java - modelling the business rules, putting stuff in and out of databases, running off web servers, and providing web services - and that's often the case in the enterprise.

It's possible to map out a large enough part of the Cocoa framework to allow Java programmers to work safely and predictably, putting Cocoa front-ends on top of their Java code. You don't have to be able to build things like Create and OmniGraffle. Enough of Cocoa already work well in Java to allow us to do productive things with it. If that could help us bring a lot of that enterprise data onto the desk of Mac users, wouldn't that be a good thing?

Downsides to Java-Cocoa at the moment - like poor documentation, bugs, and lack of speed - ought to go away with time. It shouldn't stop people doing Cocoa using Java.

But back to Cocoa Bindings. Other good sources of information include "Introduction to Cocoa Bindings", "Cocoa Bindings Examples and Hints", and the "Cocoa Bindings" discussion at cocoadev.com. I'll put up more links when I find them.

I'll leave you with another comment from Aaron Hillegass. Cocoa Bindings look great in demos, but may be less than useful in practice. However, this is a most interesting development with a lot of potential. Hope Apple continues to build on it.

When I was working at our Ministry of Defense, we used to put new hires in front of a Mac and watch their eyes - watch if they light up. If they don't, we didn't want them in the Technology Group. These Cocoa Bindings demos can serve the same purpose. Put a developer in front of these demos and watch his eyes. There's probably a measurable correspondence between intelligence quotient and the degree to which the eyes light up.

Posted at 11:37AM UTC | permalink


Mac@Work
Put your Mac to Work

Sivasothi.com? Now how would you do something like that?

Weblogs. Download and start a weblog of your own.

A Mac Business Toolbox
A survey of the possibilities

A Business Scenario
How we could use Macs in businesses

VPN Enabler for Mavericks

MailServe for Mavericks

DNS Enabler for Mavericks

DNS Agent for Mavericks

WebMon for Mavericks

Luca for Mavericks

Liya for Mountain Lion & Mavericks

Postfix Enabler for Tiger and Panther

Sendmail Enabler for Jaguar

Services running on this server, a Mac Mini running Mac OS X 10.9.2 Mavericks:

  • Apache 2 Web Server
  • Postfix Mail Server
  • Dovecot IMAP Server
  • Fetchmail
  • SpamBayes Spam Filter
  • Procmail
  • BIND DNS Server
  • DNS Agent
  • WebDAV Server
  • VPN Server
  • PHP-based weblog
  • MySQL database
  • PostgreSQL database

all set up using MailServe, WebMon, DNS Enabler, DNS Agent, VPN Enabler, Liya and our SQL installers, all on Mavericks.