The
Ultimate
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.

Fri 22 Jul 2011

OS X Lion's 3000 new APIs

Category : Technology/Lion3000APIs.txt

If you get to see Apple's Developer pages, you will see this page about the 3000 new APIs in Lion :

But the other side of the story, about the APIs that are lost or being pruned away (being deprecated in developer-speak) - that is not so well known.

Among those being deprecated are two specific API calls that I've used to build all these server setup apps. They're the calls that allow my system configuration tools to acquire admin privileges from the user so that they can move files into protected directories like /Library and /System/Library and /etc. These calls are going away and they don't look like being replaced. So if I don't find a way to get around this, I won't be able to build any more server setup apps going forward.

I would leave the conspiracy theories to others, like Apple wants to own everything (well, I'm not even allowed into the App Store with these apps - Apple specifically forbids apps that require escalation to admin privileges).

But I think I can build pretty good server administration tools, if at least only for my own use. So I will need to find another way. And soon.

But before that, I need to get Luca, my accounting app, working in Lion. It's not just a simple re-compile for Lion because Luca needs to go through database frameworks (like my version of Microsoft's ODBC calls) to get to the database servers and these frameworks need to be built from source for Lion and often they can fail to build when the Mac OS changes or the MySQL or PostgreSQL versions change. "So you want to charge even though you have no new features?" It's work, man, and I'll probably build this version of Luca only for the people who really need it.

(And I've got nib user-interface files that I can't now open in Lion because the system for building Interface Builder plug-ins change in Lion. There isn't even an Interface Builder.app in Lion. It's all built into Xcode which has changed, drastically.)

Posted at 10:09AM UTC | permalink

OS X Lion's AFP

Category : Technology/OSXLionAFP.txt

OS X Lion doesn't support FTP, i.e., you can't share files from one machine to another using FTP. It's all AFP (Apple Filing Protocol) now.

I've been building my own Adobe GoLive/Dreamweaver replacement because I want to be Adobe-free on my Macs. (I'm now totally free of any Microsoft product). It's called Duomo. But when I try to connect to my server, so I can upload this blog entry (I built a blog editor into Duomo so I can see what the blog entry looks like, exactly, as I am typing it), I got an error with AFP. But I'm sure I tested this with the developers' GM version of Lion and it was OK. So this is a mystery and it makes me worry about what else might break.

P.S. : I've been installing and re-installing Lion today. I thought I had finally settled on a fully equipped system on my iMac today, with the developer resources all set up properly so I can finally dive deeper (and much deeper) into Lion and Lion Server. But I found I made the partition too small for what I planned to do and, for some reason, I couldn't use Disk Utilities to increase the partition size. So back to doing another installation. Hope this will be really it, so I can get back to work.

Posted at 9:04AM UTC | permalink

Thu 21 Jul 2011

OS X Lion

Category : Technology/LionFinal.txt

Apple has released OS X Lion.

And I'm glad to say, I'm now also able to make these new OS X Lion versions of all my apps - MailServe, DNS Enabler, DNS Agent and WebMon, etc. - available here, right on time. There were times, during Lion's gestation, when I felt that my stuff were all breaking apart so much that I couldn't put them back together again, Apple being in the habit of changing its innards each time they upgrade their OS.

Even now, I fear things might still break with the shipping version of Lion. I've done the testing against the developers' Golden Master relaese of Lion. The shipping versin from the App Store appears to have the same build number. But once, when Apple released Leopard, the final shipping version was different from the GM release and my apps broke and I had to pull them from my site. That taught me never to take things for granted.

Am also really glad that OS X Lion is now upon us. I haven't slept much the last two days. I hope that the changes Apple has been making to the system's innards can now stabilise so that I can finally start to build on top of it.

Posted at 1:17AM UTC | permalink

Sat 18 Jun 2011

Lion Developer Preview 4

Category : Technology/UntiLionDevPre4.txt

I've installed OS X Lion Developer Preview 4. It restores the stability that was lost with release 3, especially with Safari. So it feels good to be working with Lion again. Not sure about the GUI changes though, especially the scroll bars. The iOS scroll bars feel clumsy on the Mac.

Posted at 2:01AM UTC | permalink

Fri 20 May 2011

New Lion, Dev Preview 3, Worst of the Lot

Category : Technology/LionDevPreview3.txt

Developer Preview 3 of Lion doesn't work on the Thunderbolt MacBook Pro. Fortunately I backed up all my Lion-related work before I did the Software Update. The MacBook Pro refuses to boot up after the update.

I dropped the Lion partition, re-created it, and then installed Developer Preview 3 from scratch. Again, the MBP hung on startup and I gave up at this point.

I do have Preview 3 running on an older iMac Core 2 Duo. But Safari keeps getting stuck when loading web pages.

I hate the look of Lion. Will this be Apple's Vista? That's a distinct possibility. Has Apple been hiring a lot of refugees from Microsoft? Use Lion and you'll feel that thought creeping up on you.

I've no doubt that Apple has done a lot of performance tweaking in the innards of Lion. Lion does feel faster than Snow Leopard for tasks like mounting a remote shared volume. But the user interface really sucks, I finally decided, and that's not what you want to hear about Apple. (NeXT's grey interface has a dignified, understated elegance - if that's what they wanted to bring back, they failed).

Posted at 1:32AM UTC | permalink

Sun 15 May 2011

Postfix and Dovecot on Lion

Category : Technology/PostfixDovecotLion.txt

I've managed to get Dovecot and Postfix working again on Lion. This is version 2.0.12 of Dovecot. There were so many changes to Dovecot especially, and to Postfix, and also, most importantly, to the underlying operating system, that I despaired of ever being able to figure them all out again, at one stage.

But these are just the basics. There are still a whole lot of issues ahead - Fetchmail, SMTP authentication, POP and IMAP, SSL, spam filtering, user account creation, etc… 

Going from one cat to another, from Jaguar to Lion, has never been easy. Apple has never been one for staying still.

Now, on to Developer Preview 3. Expect more things to break :-) We're glutton for punishment.

Posted at 7:18AM UTC | permalink

Thu 12 May 2011

Running Lion on the Thunderbolt MacBook Pro

Category : Technology/LionOnMBP.txt

I'm now able to run the OS X Lion Developer Preview on my new 2011 Thunderbolt MacBook Pro (15 inch). Besides finding the MBP unable to wake from sleep a couple of times, plus a corruption of the screen when I tried to run the iPhone simulator (for some reason Spaces was triggered and the video output froze beween the two screens I had set up for Spaces), I'm enjoying the Lion experience. It feels somewhat zippier than Snow Leopard, plus there are many nice touches, though aesthetically, I miss the colourful exuberance of Aqua. Lion is unremittingly grey.

By now I've got DNS Enabler, DNS Agent, WebMon and Liya running again on Lion, so that settles the basics - DNS (because the DNS admin tool in Lion Server still looks wanting), the web server (so I know my PHP scripts still run and I can get at least get my web site up on Lion), and my access to MySQL and PostgreSQL databases.

Lion has a PostgreSQL database built-in. I'll get the code from Hai Hwee to make a Preferences Pane to turn that on

I'm using my own tool, which I'm tentatively calling DuoMo, to update my web site and weblog, and not a moment too soon because there is no FTP in Lion (or at least a GUI for starting FTP). It's all AFP now.

As usual there are changes under the hood for all three servers that I work with - the web, dns and mail servers. I've fixed the stuff for web and dns, and now I move on to mail. Only after I've made MailServe work again for Lion, can I come back to the question, what new stuff do I build for Lion?

I've got quite a bit of these "enhancements" done as experiments over the years, but it's time to put them together.

Especially the question - what do I do with Lion Server? How do the servers I set up coexist with it, and augment it - to take advantage of Lion Server's ability to set up a Calendar and Contacts server, etc...? These are things I've always wanted to do and so I'm looking forward to the challenge.

Posted at 1:49AM UTC | permalink

Mon 02 May 2011

DuoMo

Category : Technology/Duomo.txt

This my GoLive/Dreamweaver replacement. It's tentatively called DuoMo, as in the Duomo, a cathedral. I was reading Ken Follett's Pillars of the Earth, when I started work on it and felt that building a website, or an OS X/iPhone/iPad app, for that matter, is a lot like building a cathedral.

DuoMo1.png

I was using BBEdit to write my weblog entries but I've always wanted a wysiwyg (do people still say wysiwyg? what you see is what you get?) editor, that'll look exactly like my weblog entry on my actual web page, and where I don't have to enter HTML markups like <b>bold</b> for bold text, or to set the paragraph style, like :

This is a comment.

Or where I can simply drag an image into the blog entry and the app would bring the image over to the right folder (and possibly scale it to fit the weblog page). And where I can create a web link just by control-clicking on a text range and entring the link address. 

No more messing with HTML. Plus unlimited Undo support.

BlogEditor.png

It's all done with the magic of editable WebKit, which is the basis for the Safari web browser.

That's why I've been hoping for an editable WebKit for the iPhone or iPad from Apple. That'll allow me to build something like this to update my weblog while on the move, which, strangely, is when I've often felt like I've got something to say. So far, WebKit is still not editable on iOS.

So, this is a closeup of the blog editor I built into DuoMo :

DuoMoWindow.png

So far I've managed to make DuoMo workable even over a very slow web connection, as when you're using the iPhone 4's Personal HotSpot feature to share your 3G connection with your MacBook. In such a case, GoLIve won't even work, with the spinning beach ball going on and on forever and you have to Force-Quit GoLive when you try to connect back to your web server. 

Doing a sync with the home site is still rather slow with DuoMo (if via the iPhone's shared 3G connection, but it'll simply fly over WiFi because I've spent hours figuring out where the app spends its network connection time) but that's the great thing about writing your own code and building your own tools. I feel that I should be able to fix that also somehow, given time.

Posted at 11:39PM UTC | permalink

Some preliminary thoughts on OS X Lion Development

Category : Technology/OSXLionDev.txt

I've prepared one machine to run OS X Lion on one partition and Lion Server on another, so I should be all set to go to move all my apps over to Lion.

But it's not quite as easy as that.

First, all Lion development is done on the new version 4 of Xcode, which brings about significant changes to the way things used to be done. So far, I'm loving the new software development workflow in Xcode 4. After one month of work, I believe I'm really more productive on it than on Xcode 3.

Xcode4.png

But it's not all good, of course. Things inevitably break - e.g., my database access frameworks for MySQL, Postgres and SQLite. I needed some time to get used to the new Xcode build settings before I could figure out how to get them working again, including building for iPhone and iPad which are, of course, on another platform architecture altogether (i.e., Arm 6 and 7, as opposed to Intel x386, 32 or 64 bit). There are all these variations to build fat binaries for, and every time Apple changes something major like this, I go through this sinking feeling that I may never get things to work again.

Then there's this thing about FTP not being supported in Lion, i.e., you can't seem to be able to ftp onto a Lion server. There's no obvious way to turn it on - not in Sharing Preferences or even in Lion Server (I think).

I've been using this decade-old Adobe GoLive technology to manage my web site's static web pages, so this seems like the end of the road for it. I don't want to use any Adobe stuff when I move to Lion (or Microsoft stuff, for that matter). 

So I've been building this GoLive/DreamWeaver replacement for myself, that I'm now using to write this weblog on (among the things I've made it able to do), and that'll be my key web site creation/management tool in Lion.

More on all these developmen later. But, in summary, I've got the piececs I need to move on to Lion development in earnest now. Hope I won't be too late for its launch.


Posted at 7:40AM UTC | permalink

Fri 25 Mar 2011

Downloading Xcode 4.0.1

Category : Technology/DownloadingXcode4dot0dot1.txt

There's a new Xcode version 4.0.1 for download from Apple Developer Connection. Just in time to try my new download speed.

Everything is working well so far with my new broadband plan. Except for one thing. I don't seem to be able to connect my Mac directly to the broadband modem anymore via PPPoE, bypassing the Airport Extreme Base Station.

I think I've tried everything - like switching off the modem completely to drain it of all power and to clear out any "memory" problems with the previous connection - but the Mac refuses to connect.

Just to make sure it's not just a Mac-only problem, I tried it also with the Singnet technician's Windows laptop. Was perversely happy to see that that didn't work either.

Maybe I need to reset the modem. Hadn't tried that yet. But that would mean bringing the site down again. Didn't want to do that.

Will try again when maybe I get a parallel duplicate broadband line that I can devote to doing such testing. I do have a Mio TV connection that could have its Internet connection activated - maybe with the new 200 Mbps optic fibre connection (that comes with a 100 Mbps upload path, so downloads from my site go that much faster). That may look like quite attractive but I don't think I can afford that yet.

P.S.: In the time I took to write this, Xcode 4.0.1 is already halfway downloaded, at my new 15 Mbps download speed. That's a 4.3 GB download. If I have a 200 Mbps line, that would all have come down in a jiffy. Whatever speed you have, you will always want more.

Posted at 6:48AM UTC | permalink

Thu 24 Mar 2011

Our Site is Up Again

Category : Technology/SiteUpAgain.txt

OK, our broadband connection is up again and I do get 50% better line speed. The site was down for the last two hours. So if you've been trying to get in to download something a short while ago, that was the reason why.

Posted at 11:58PM UTC | permalink

Upgrading my Broadband Line

Category : Technology/BroadbandLineSpeedUpgrade.txt

I'm going to be upgrading my broadband line speed. I'm not sure exactly when but it should be done sometime from now till tomorrow.

So if you find the site down, it'll come right back up after my ISP has done the upgrade. Hope to get 50% more speed by then and make all this disruption worthwhile.

Posted at 12:20PM UTC | permalink

Read more ...

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.