How to Structure Applications for Mac OS X?

2010-10-27 20:00:00 -0400


There’s a really telling thread active on the cocoa-unbound mailing list right now, regarding the difficulty in grasping how to structure applications in Mac OS X, especially as compared to its sibling iOS, and the materials that are available, a subject with which I’ve become quite familiar as I hack on STRIP for Mac OS X:

When I create a new Rails application or Ruby Gem, there’s a clear, predefined application structure. Its obvious what things go where. It’s the same structure every time,

When I first created new iPhone projects, picking a “Navigation-based app” or such like gave you all the structure you’d really need for that type of app. You could see exactly where the VCs lived, how they hooked up to NIBs and how they talked to each other. I don’t need the templates now, but they were very instructive in the beginning.

I’m missing the same thing for Mac applications.

Exactly. List users are starting to add their suggestions for reference material and tutorials, some good resources there. But really, we could use some better, more comprehensive materials from The Source for Mac OS X. The WWDC video sessions are invaluable, the small app examples are great, the API documentation is fantastic, but we devs really could use some beefier, more complex, real-world reference materials.

Update: It’s not really a how-to document, but I did get a lot out of Matt Gallagher’s article, The design of every Mac application.


Getting Bottom Bar Buttons to Follow an NSSplitView Pane (Code, wonky)

2010-10-26 20:00:00 -0400


In working on Strip for Mac OS X, I came across a scenario in which I wanted to get the bottom bar buttons on an NSWindow to follow the left-margin of panes about them in an NSSplitView with which they are associated. That sounds like a mouth full, so I’ll use a picture to illustrate, it’s an idea I’m looking to borrow from Apple’s Address Book application (click image to embiggen):

Adressbook Splitview 500w

What I’m trying to suggest with the annotations I’ve made on the image is that the [+] button under that middle pane (highlighted in green) will move as the left margin of the pane is moved, either by the user, or by the window being resized—which cascades down to the subview being resized, since the split view is basically the entirety of the window’s contents.

In any event, I wasn’t sure how to hack this out and didn’t see any examples out there, so I put one together. There might be a better, faster way of handling this, perhaps by responding to NSView notifications about a change in frame, but here I just used an NSSplitViewDelegate method that fires every time subviews are resized (thus, every time the margins of the panes might have been adjusted by a resize or a divider moving). Sample project is here on Github, but this is the meat of it, in the NSSplitView’s delegate:

// gets call after the NSSplitView is resized OR after the divider(s) are moved
- (void)splitViewDidResizeSubviews:(NSNotification *)aNotification
{
[self repositionBottomBarButtons];
}

- (void)repositionBottomBarButtons
{
// we don't actually have to do anything for the left-most button and the left pane
// because we've got it pegged in IB to maintain it's position in relation to the
// window's bottom and left bounds

// first tell the superview that it will need to redraw the frame we'll be moving
NSRect oldFrame = [rightButton frame];
[[rightButton superview] setNeedsDisplayInRect:oldFrame];

NSPoint newOrigin = rightView.frame.origin;

NSRect newFrame = NSMakeRect(newOrigin.x, oldFrame.origin.y, oldFrame.size.width, oldFrame.size.height);
[rightButton setFrame:newFrame];
[rightButton setNeedsDisplay:YES];
}

And there we go, button now follows the pane’s margin, moves nice and smooth.


Announcing Zetetic Connect

2010-10-07 20:00:00 -0400


Today I'm very excited to announce Zetetic Connect, a fast, super-flexible way to get information out of (and into) LDAP directories and relational databases databases for the web, iPhone, BlackBerry, and Android.

Desktop Lead 380Connect grew from a need to publish Active Directory data to the web; so many businesses and schools rely on directory systems, but there just aren't a lot of mature applications that help people take full advantage of those directories or to spot and correct missing data. Connect does that and, going two steps farther, hosts an extremely robust, high-performance engine that can unify multiple directories and data stores behind the scenes, and allows users from any of those directories to sign in.

For example, if part of your company uses Microsoft Exchange, another division uses Lotus Domino, and you've just acquired a third group that uses Zimbra for messaging, Zetetic Connect can quickly create an online phonebook merging all three. Just launch Connect, search for "Smith", and you'll get the contact and organizational details for all the Smiths across all systems, live. The same powerful simplicity applies to contacts, groups and distribution lists, sites and locations, and virtually any other data in your directories. (Of course, you can choose what to include or exclude from each.) Users can easily maintain their own data, such as phone and mobile numbers, according to rules you define.

Interested? »

We're currently running a small number of commercial evaluations for interested customers, including system deployment by Zetetic's LDAP-meisters. Contact us now if you'd like a demonstration and evaluation of the system.

Your mobile users will be impressed by Connect's user interface, which is tailored especially for the iPhone, BlackBerry, and Android, and has the look and feel of a native application. (See: screenshots.) Connect is internationalization-friendly too, so your users get Connect in their native languages, top-to-bottom.

Behind the scenes, we've leveraged many years of directory experience to build an extremely robust framework that actively monitors your directory servers' performance and availability, so users won't notice if individual servers go out of service. Connect also does some pretty serious and smart caching and threading, and features a wealth of special optimizations for Active Directory. That said, it works great with any LDAP server, SSL on or off, and any schema.

You can even use the Zetetic Connect core as a pure-LDAP, federation-capable membership and role provider for any ASP.NET application, a topic upon which I'll touch in a future blog post.


Some Updates to Tempo 10/2010

2010-10-06 20:00:00 -0400


Last night we pushed some minor updates to Tempo, and I want to take a quick moment here to tell you what they were.

Excel XLS Exports (and new listing)

Tempo Exports List

We’ve been fielding the UTF-8/Excel complaint about our CSV exports for a loooong time, and now the nightmare is over. We’ve implemented a new conversion filter that dumps the current report into a native .xls Excel spreadsheet. We also re-labeled the exports to make it a bit easier to find the one you want.

The UTF-8 problem was never an issue with our CSV exports, by the way. Microsoft Excel has always had a bug importing CSV files (one they will apparently never, ever fix), and it treats the characters in your file as ASCII data no matter what. So it goes. Now you’ve got the good stuff.

Bug fixed: Bad Figures in Exports!

At some point we added pagination to our reports’ data sets. This caused a bug in our Time by People and Time by Projects reports. The Total row in each was correct, but the reported hours for each project or person was incorrect in some cases — limited to the total for the currently paginated set. All fixed now, our apologies.

Improved Print Preview

Temo Update Preview

The print preview on the Reports screen was getting a little bit heinous, this should improve things for the time being.

Invoice Memo

When our billing system bills tempo accounts, it sends a receipt, or invoice, by email to the account owner documenting the charges. One of our German companies recently asked if they could include custom information on this document in order to be “in compliance with German law.” We have no idea what it takes to be in compliance with German law, but we did provide a way for them to do it in this release.

If you are logged in as the account owner, or an account manager, go to the Account screen and you’ll see a new field, Invoice Memo, in which you can put anything you like and it will appear under Memo: on your billing receipt.

That’s it for this round of minor adjustments. More are planned for the near future, based on our customers’ feedback, bug reports, and our desire to make Tempo easier to use and more intuitive. As always, if you have ideas, complaints, or suggestions, get in touch


Tempo / Zetetic Server Maintenance, Oct 6, 11pm EDT

2010-10-04 20:00:00 -0400


We’re planning to do some preventative server maintenance tomorrow night to ensure the reliability of our systems and the security of our customers’ data. At 11pm EDT on Oct 6, our various websites will become inaccessible and remain that way until 11:30pm. This affects our time-tracking system Tempo, as well as zetetic.net, getstrip.com, and getcodebook.com.

To find out exactly when this will happen in your time zone, click here. If you have any concerns about this, please get in touch!

Update: we’re back in action. Thanks for your patience.