Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bonjour and Dashboard Widgets



Thanks Christian, I thought as much :-)

I just have to adjust my design a bit - no problem.

Cheers mate

Andrew


On 10 May 2005, at 20:38, Christian wrote:


On May 10, 2005, at 10:46 AM, Andrew Knott wrote:


I've started experimenting with creating a widget that could talk to other widgets on a local network through Bonjour.

At the moment I have a working Cocoa app that browses for a particular service and a Widget that toggles the availability of a service with the service being instantiated by a widget plugin. And it works!

Which brings me to a quick question. I don't have a huge amount of Bonjour experience and so I'm not sure of the architecture I should use to get rid of the Cocoa app side of things and have the widget responsible for not only looking for a service of a particular type on the network but also instantiating one if one is not available. Actually, is it advisable to actually be designing a widget like this or is it all cool?



Andrew--

I wouldn't recommend it, based on practical and philosophical grounds.

Practically speaking, widgets aren't run until the user first shows Dashboard, so you can't count on the widget itself starting any processes at boot/login. Also, some installers place icons in the Dock, a process that involves killing the Dock. As you can guess, widgets aren't restarted automatically - the user needs to show Dashboard before they're running again.

Philosophically speaking, widgets tend to present information. A widget like yours should focus on getting the user the information he needs as quickly and effectively as possible and handing them off to applications or webpages when serious interaction is needed. In that sense, they're transitory - they can come and go and not have any effect on the system. Notice that none of the Apple widgets edit user data and that no system service depends on a widget?

Applications are better suited to running background processes and providing the functionality "meat-and-potatoes" - they can handle setting preferences more elegantly, provide better interfaces, etc. Use your widget to compliment an application, like this example from the docs:

"An example of judicious use of a widget is to provide a front end for a time card application. The application provides all of the features needed by the user, while a companion widget lets you clock in and out and choose the job that you’re currently working on."

Hope that helps...

_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden
References: 
 >Bonjour and Dashboard Widgets (From: Andrew Knott <email@hidden>)
 >Re: Bonjour and Dashboard Widgets (From: Christian <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.