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

Manuel Quiñones manuq at laptop.org
Wed Mar 26 17:36:05 EDT 2014


2014-03-26 18:12 GMT-03:00 James Cameron <quozl at laptop.org>:
> 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.

I agree.  Thanks for the detailed comments on each proposal.

>
> 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/
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..


More information about the Sugar-devel mailing list