Upload
ash-mishra
View
429
Download
1
Embed Size (px)
DESCRIPTION
Presentation given to Vancouver iPhone Developers group on the technical implementation of new CBC Radio 2.0 app for iOS
Citation preview
CBC Radio App 2.0 - iOS
CBC Radio App 1.0 for iPhone development started
in March 2009 - Released July 2009
No major updates since that date
Several hundred thousand downloads
High user satisfaction
Requests for background audio playback
History
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Offer Radio 1, Radio 2, Radio 3, and TV Audio
Listen to live streams and music channels
Provide CBC podcasts
Favourite audio
View schedules
Find local frequencies
Embedded CBC.ca website
Functionality
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Offer Radio 1, Radio 2, Radio 3, and TV Audio
Listen to live streams and music channels
Provide CBC podcasts
Favourite audio
View schedules
Find local frequencies
Embedded CBC.ca website
Functionality
Support iOS 4.x background audio and remote
Scaled iPhone version for iPad
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Hmmm ... Boring! And not compelling
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Designed for iPad, not a giant iPod Touch
Auto Lo / Hi bandwidth switching for 3G / WiFi
Tracked episode playback positions
Auto-play, Sleep timer, Alarm clock
Share Audio by Email, Facebook or Twitter
Embedded Radio 3 Website with native playback:
100,000 tracks on demand from 23,000 artists
These are personal ideas
Hmmm ... Boring! And not compelling
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
What differentiates a design-by-committee product
and one that exceeds expectations?
Personal attention
Alot of thought given to design, features; Humans
are emotional, so apps need to speak to our
emotions
Many minute adjustments to animations, colour
choices, layouts, font sizing, shades of grey
Hours and hours of testing, actively seeking bugs
Delivering Success
Can’t stress this enough !
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
One developer / producer on loan
One part-time designer
One product champion
Resources
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
One developer / producer on loan
One part-time designer
One product champion
Resources
NO project manager
NO specification!
3 months
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Know your domain
Understand your audience
Be passionate
Explore, experiment
Get business support – product champions
Organise the work
Develop intelligently *
Iterate
Technical Process
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
CBC Radio 1.0
Interface completely coded – no Interface Builder
Controller, views, model mixed together, not MVC
No clear understanding of the problem domain
Over-engineered: localisation, caching
Plus... Lower the Technical Debt
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
CBC Radio 1.0
Interface completely coded – no Interface Builder
Controller, views, model mixed together, not MVC
No clear understanding of the problem domain
Over-engineered: localisation, caching
Plus... Lower the Technical Debt
CBC Radio 2.0 is an 85% rewrite
True MVC
Interface Builder when possible
Built on a reusable frameworkThursday, November 4, 2010
CBC Radio App 2.0 - iOS
Employ strategy of “Sufficient Design”
Convention-over-configuration & reflection to map
XML data into Model objects
MVC enforced by the use of protocols
UIWebView for relative positioning
Reuse of iPhone UIViewControllers for iPad
Optimise only when needed
Technical Approach
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
A convention to map XML elements and attributes
to Class properties
Fetch and digest XML; use reflection to determine if
a Class has a property that can be set
(NSKeyValueCoding protocol)
Benefits:
Dynamic mapping – no glue code
Less code – easy maintenance and extension
The Model Layer
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Multiple types of audio sources: Live Streams,
Music Channels, Podcasts, Audio from Websites
Plus multiple ways to present content visually
How to design?
If we use IF statements to differentiate between
types, we’re doing it wrong
Solution:
Design protocols that hide concrete classes
1 protocol for Audio playback, 1 for Visual display
Enforcing MVC
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Write controllers that operate on the Audio Protocol
Build views that use content from the Visual Protocol
Enforcing MVC
Live Radio
Music Channels Podcasts
Website Audio
Audio Protocol Visual Protocol
Controllers and Views
Model
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Interface Builder is good for:
basic resolution independence
orientation independence (important for iPad)
visual layout – can be used by designers
UIKit doesn’t permit relative positioning
So if you have UILabels with variable number of
lines, IB is difficult for relative layouts
One solution: use UIWebView, which supports
relative positioning
UI
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Many views don’t need a custom interface for iPad
Use UIPopoverController to reuse iPhone
UIViewControllers
Also use Modal views – presentModalViewController
Reuse iPhone UIViewControllers for iPad
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Classic issue – Business vs. Engineering:
Business wants a product as fast as possible at
lowest cost
Many places do not understand Software is an art
Developers want to craft great code – but that
takes time
Is a balance possible?
Approach to Architecture
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Under-design: Quick as possible cowboy coding
Only thinking about 1.0 release
Spaghetti code, bad coding style, buggy
No abstraction, no MVC, or even OOP
Throwaway code
Over-design: Building for worst-case scenarios
Added layers of complexity (too much abstraction)
Longer development cycles
More code to maintain, ironically less agile
The Extremes
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
Spend time designing for critical components
Example: the protocol for audio playback
Don’t spend time over-designing for components
that provide zero or no value
Example: caching where it’s not needed
Assemble parts when possible, instead of building
from scratch. Lower initial costs, as well as future
maintenance.
Example: Audio playback engine is 3rd party
Balanced or “Sufficient Design”
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
“Sufficient” doesn’t mean “compromised”. It means
lean and more maintainable.
We are still responsible for proper MVC and OOP;
these are critical parts of the architecture.
How to do it?
Protocol for Audio playback was not planned, but
developed when it was needed – iteratively
In a given problem, use the maturity of your
skillset to lower technical debt
Sufficient Design Continued ...
Thursday, November 4, 2010
CBC Radio App 2.0 - iOS
*See Industrial Logic for more on Sufficient Design
Questions?
Thursday, November 4, 2010