Skip to main content
8 events
when toggle format what by license comment
Jun 10, 2020 at 13:24 history edited CommunityBot
Commonmark migration
Jun 7, 2017 at 4:54 comment added AnonProgrammer If you check out the link, you'll see how using multiple singleton networking classes propelled me to make this function of nested closures.
Jun 7, 2017 at 4:48 comment added AnonProgrammer Thanks. I'll provide a link to a question that gives more visualization into my simple approach. I will also look into MVCS. stackoverflow.com/questions/44381560/…
Jun 7, 2017 at 4:09 comment added user1118321 I don't generally have a problem with singletons. They're pretty common throughout much of Cocoa. (Things like [+NSNotificationCenter defaultCenter], or [+AVAudioCenter sharedInstance] for example.) The downside of a singleton is that it is global state, so it can be difficult to track where it is changed. But if it's used appropriately, then it doesn't seem problematic to me.
Jun 7, 2017 at 4:02 comment added AnonProgrammer Thanks for your insight. your refactored version is much cleaner. I'm also curious to know if you found it odd seeing the singleton 'ChatProvider'. I have a few more singletons like UserProvider, and ImageProvider, which handle interactions with server like networking helper classes i suppose. This approach seems to be frowned upon. Do you agree? Thanks for your time.
Jun 7, 2017 at 3:56 vote accept AnonProgrammer
Jun 7, 2017 at 2:25 history edited user1118321 CC BY-SA 3.0
added 2 characters in body
Jun 7, 2017 at 1:48 history answered user1118321 CC BY-SA 3.0