njoubert / DropVox

DEPRECATED PROJECT: A Vox-like music player for the iPhone built around keeping files in DropBox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DropVox
==================
DropBox Music Player for iPhone

Created by Niels & Pierre-Henri Joubert



==============
Back-End organization:

Manager is a Controller that is not a View.

After considering options for how to handle back-end interaction from front-end:
1 - stick things into appDelegate (already a singleton)
2 - create singleton "manager" objects
3 - dependency injection by passing pointer to "manager" down
I went with 3. This is the correct, OO way of doing things. C++ makes this unnecessarily hard since its importing sucks and you have to forward define shit but hey! it is definitely the cleanest way with the most clear dependencies.

After considering how to have front-end respond to changes in back-end:
1 - stick update functions into appDelegate
2 - pass object conforming to callback protocol from front to back-end
3 - create intermediate object responsible for updating front-end, pass to back-end
I went with 2.


In general, if a controller needs access to a manager, inject it into the controller:
  [controller setManager:manager];

If a view needs to set up callbacks to its controller, pass it the controller:
  [view initWithFrame:... andController:(Controller*)controller];

Controllers that require each other:
  header: @class otherController
  code: #include "othercontroller.h"

Controllers that require models:
  header: #include "model.h"

About

DEPRECATED PROJECT: A Vox-like music player for the iPhone built around keeping files in DropBox


Languages

Language:Objective-C 74.3%Language:C 25.7%