UIkit and AppKit unification

The latest fad in tech punditry is to claim the barrier to have iOS apps on the Mac is the fact these two graphical frameworks are so different that it makes the work of developers too complex. This is false.

Let’s start with the elephant in the room: an app generally has to bring more to the table than its UI. But the underpinning coverage is total. There is less than 5% of classes and methods that are available on iOS and not on the Mac. On the other hand, there are more methods in the same frameworks on the mac side. So for everything but the UI, “porting” only means recompiling. If your MVC is well implemented, that part at least won’t cause any issue.

The UI part is a mixed bag, but the paradigms are the same nowadays. It wasn’t the case until fairly recently but table views are cell or view based, the delegates are as expected, etc, etc. As an experiment, on uncomplicated examples, I did search and replace only, no tweaking, and it worked.

Now, of course, the issue isn’t technical: the iOS mono-window and mono-view is wasted on the mac. A lot of applications take the “landscape ipad” paradigm to make it less obvious, including Apple : you have the sidebar and the main view, and it works just like the master/detail project template that comes with Xcode.

Porting a successful app from iOS to the Mac is indeed a bit of work. The Mac is window centric and iOS is view centric. Some things you cannot do on iOS are possible on the Mac, like covering parts of your UI, or dragging and dropping elements. It is definitely a very different way to think about the user experience, and the design choices are certainly less constrained and less obvious. But there is no real technical hurdle, unless the vast majority of your app logic lives in the view controllers rather than in a separate codebase. And then again, the Mac now has NSViewController that works exactly like, who would have guessed, UIViewController, and apps can run in full screen mode, so who knows?

The tools (Xcode, IB, etc) are the same. The non UI frameworks are the same. The UI frameworks are similar where it makes sense (putting stuff on screen) and dissimilar where you have to (input methods and window management). That’s it.

Now, you can definitely agree that the Mac app landscape is very different from the iOS one. People are used to having giant things that install other things everywhere, demos, sharewares, unrestricted access to the filesystem, the possibility to copy and paste anything from anywhere, or drag and drop anything from anywhere, and to put it somewhere else, where it will do something. They have multiple apps that come and go depending on modal dialog boxes that show up, and pieces of stuff like palettes that they can arrange any damn way they please, thank you very much. For all these reasons, designing a successful Mac app is challenging. Big screens, small screens, people who like lots of little windows, a few big windows, people who use spaces, people who use keyboard shortcuts more than the mouse, people who don’t know how menus work, people who have a gazillion of menu items, fonts that can be changed systemwide, colorschemes, those are all valid reasons to dread an attempt at making an app that will appeal to most people.

But you don’t get to play the technical hurdle card. All these interactions have been studied, refined, and solved over 30 years of graphical interfaces. You have to choose what will work best for your needs, and yes, this is hard. But it’s not about code.


Useless security

Security this, security that… Lately, most of the new rules, laws, or software features include somewhere in their description the word “security”.

Trouble is, most of the time, it’s not about security, but rather stability and/or bullying. I have two examples that make me wonder if anyone other than me reads Bruce Schneier’s blog.

A few weeks ago, I was in the United States, and a friend of mine said she wanted a hotdog from the Yankee Stadium. You have to know that I must look like a terrorist or something, because I get searched in airports a lot. Besides, with all the TSA rules that get more and more cryptic and obtuse (again, read Cryptogram), it was a no-brainer that I would get busted or something.

What do you know? The guys saw the hotdog all wrapped up in my bag, asked me stuff about it, I explained it was for a yankee fan, etc, etc. They made me unwrap it, I had to beg a little, but they let me get on the plane with it (hey, a hotdog could be a very dangerous weapon). What they didn’t make a fuss about, though, was that I had two boxes of matches (from some NYC club), a Zippo, and a very nice electronic screwdriver about 15cm long, sharp and slim. When you think about it, even though there’s absolutely no way to stop a determined terrorist, I guess some dangerous items are more obvious than a hot dog. And yes, I know, it was a stupid bet.

The second thing that bugs me about security is the way people sometimes claim to handle security the easy way for my own sake. I have some sensitive data on my computer. I access some sensitive data from my (secure) servers at home through a (secure) VPN. Well, I never found an easy way to enforce the VPN at all times.

On my mac, whenever I change networks, the VPN disconnects. And I have to reconnect manually. Except that all the services (mail, remote storage, etc) try to reconnect (sending all my passwords, sometimes in the clear) before I can activate the VPN, automagically. It drives me nuts to see my mails downloading on my iPod Touch without the VPN, even though I had it activated just 5 minutes before and it turned off in the meantime. Agreed, I should choose a provider that uses SSL connections for the mails, but still.

Unless I get my hands dirty and hack it into believing that there is no route outside of the VPN one (which is hard to do, and tedious to implement), no one seems to think it’s a real issue.

People, security is not about show. Security is not just to reassure everybody and to pretend everything’s under control. Agreed, security sometimes is a heavy process and sometimes gives you more hassle than you really want to handle. But if security is what you mean, you have to think this through before you implement it.