What if the Singleton is a Facade or a Mediator? :)
10.03.2011 1:44 пользователь "Scott Davies" <code-p...@hotmail.com> написал:
>
>
> On 11-03-09 5:30 PM, "Kenny Riddile" <kfridd...@gmail.com> wrote:
>
>>On 3/9/2011 5:13 PM, TreKing wrote:
>>> On Wed, Mar 9, 2011 at 4:10 PM, Kenny Riddile <kfridd...@gmail.com
>>> <mailto:kfridd...@gmail.com>> wrote:
>>>
>>> Singletons are global variables.
>>>
>>>
>>> Uh ... no ... no they're not.
>>>
>>>
>>>-------------------------------------------------------------------------
>>>------------------------
>>> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
>>> transit tracking app for Android-powered devices
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>Assuming the singleton is modifiable via its interface, then for all
>>intents and purposes, yes, they are.
>
> I think the idea is that because the singleton is encapsulated, you at
> least have some business logic around mutating them, whereas the "classic"
> global variable is visible AND mutable without restrictions.
>
> - Scott
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to