[Sugar-devel] New method for Activity class to send notifications

James Cameron quozl at laptop.org
Wed Mar 26 17:12:59 EDT 2014


On Wed, Mar 26, 2014 at 09:40:41AM -0300, Martin Abente wrote:
> His work is almost done [2,3,4], but it introduces a new method to
> the base Activity class, therefore I wanted your opinions regarding
> the name of this method, the current options are [4]:
 
> * send_notification
> * add_notification
> * shell_notify
> * sugar_notify

"shell_" and "sugar_" prefixes are superfluous given that the base
Activity class is already a part of Sugar, and the Shell isn't the
eventual target of the notification; the user is.

"_notify" and "_notification" are ambiguous, because they don't say
what is being notified; the system, the class instance, or the user.

"add_" prefix exposes an implementation detail; that notifications are
a list.  This exposure is unnecessary.

Of the ones you listed, "send_notification" fits best.

Of the ones you didn't list, "notify_user" would be best.

"sugar_shell_add_notification_and_send_to_user" would be the worst.

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list