Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo

Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

Tue 18 Apr 2006

Cocoa Notifications and its importance to application design

Category : Technology/LucaNotification.txt

I would like to elaborate a bit more on what I wrote in the previous post, on the relation between technology and business needs.

Cocoa has a construct called notifications and it works like this : If any part of an application needs to be informed of an event that happens anywhere else in the application, it can register its interest with a Notification Centre. Then you can code your application such that when such events occur, you post a notification to the Notification Centre, who will forward that notification to all parties (and only those parties) who had expressed interest in it.

So, in a real world case, it works like this :

In the Accounting System, you may be looking at your Current Assets, which includes a Debtors' list. Then, from another window, you may be creating a Receivable Voucher for a particular debtor. If you happen to be also monitoring that debtor's list of transactions, its totals will be updated as soon as the data entry for that voucher gets completed.

If you're looking at the totality of all your transactions under Revenue, that figure will also get updated.

Switching back to the point of view a programmer, it's very hard to do this type of coding on your own - unless you hit upon the idea of having a Notification Centre to centralise, coalesce and dispatch all the notifications in an orderly way, which I thought was brilliant when I came across it because I had been doing this type of programming on my own and they were often a mess.

And look at the economics of the situation. It's a nice-to-have feature. So the amount of time you spend programming it should be kept in proper relation to the amount of code that really does the dog's work in the application. In other words it shouldn't be carrying too much weight, otherwise it would be like the tail wagging the dog. But what it gives your application, if you get it right, is a feeling of omniscience, and you know how God-like that feels.

So that's what the Notification Centre, and lots of nice touches in the rest of Cocoa, does - it tips the economics in the favour of the creative programmer, by making it possible to do this in the time you are allowed to allocate to it.

So, if you're a business owner and you hear your IT manager saying that he won't accept a language like Objective-C or a tool-set like Cocoa - "who has heard of it" and he can "pick up a Java or Visual-Basic programmer from any street corner" - rest assured that that street-corner programmer hasn't spent any time thinking through the economics of programming or scoured the world for the best programming tools to build the best business applications on.

That's the fight we are in. If we had stayed in organisations we'll never have been allowed to do this. There is a world of Mac users out there. There's no time to spend debating the issue. There's work to be done and let's just do it.

Business, art, and technology. If I had to spend too much time doing both the artwork and the text, I wouldn't have done it. As it is, my thoughts just flow and the art work gets done and it's up on the web. Choose your tool (sword) and we'll compete on execution.

Posted at 4:22AM UTC | permalink

Put your Mac to Work 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.