welcometocse436s’ so/ware’engineering’workshop’ iphone’classtodd/cse... · extensible...

16
1 - CSE 436 – Software Engineering Workshop Welcome to CSE 436S So/ware Engineering Workshop iPhone Class2 - CSE 436 – Software Engineering Workshop Course Informa>on Instructor – Todd Sproull [email protected] – Jolley 538 – Office Hours by Appointment Classrooms – McMillan G052 – Whitaker 316 (Mac Lab) Time – Mondays and Wednesdays 10 – 11:30 AM Course Website – hNp://research.engineering.wustl.edu/~todd/cse436/ Head TA – Lyn Han [email protected]

Upload: others

Post on 20-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop

Welcome  to  CSE  436S  So/ware  Engineering  Workshop  

 “iPhone  Class”  

 

Extensible Networking Platform 2 2 - CSE 436 – Software Engineering Workshop

Course  Informa>on  •  Instructor  

–  Todd  Sproull  –  [email protected]  –  Jolley  538  –  Office  Hours  by  Appointment  

•  Classrooms  – McMillan  G052  – Whitaker  316  (Mac  Lab)  

•  Time  – Mondays  and  Wednesdays  10    –  11:30  AM  

•  Course  Website  –  hNp://research.engineering.wustl.edu/~todd/cse436/  

•  Head  TA    –  Lyn  Han      

•  [email protected]    

Page 2: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 3 3 - CSE 436 – Software Engineering Workshop

Requirements  •  CSE  332S  

–  Object  Oriented  SoTware  Development  Laboratory    

•  Access  to  an  Intel-­‐based  Macintosh  –  Running  Mac  OS  X  10.9  –  10.11  –  iPhone  SDK  Xcode  6.4  and  iOS  8  

•  Textbook  –  None,  we  will  use  lecture  slides  and  the  developer.apple.com  website    

•  Owning  an  iPhone  or  iPod  Touch  not  required  –  We  will  use  the  simulator  throughout  the  semester  –  Final  projects  may  target  an  iPhone  or  iPod  Touch  

Extensible Networking Platform 4 4 - CSE 436 – Software Engineering Workshop

Stanford  CS193p  

•  This  course  is  based  on  cs193p  taught  at  Stanford  by  Evan  Doll  and  Alan  Cannistraro  –  Lectures  and  slides    available  on  iTunes  

•  Many  of  the  lectures  and  programming  assignments  come  from  this  class  –  Ini`al  assignments  are  iden`cal  –  Later  assignments  somewhat  different  

•  Consider  taking  the  iTunes  course  if  that  suits  your  personality  

Page 3: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 5 5 - CSE 436 – Software Engineering Workshop

iPhone  Developer  University  Program  

• WashU  is  enrolled  in  the  program  –  Free  development  on  devices  for  students  – Valid  for  the  en`re  semester  

•  Each  student  will  need  to  enroll  online  at  developer.apple.com  – More  details  to  come  later  

•  This  license  does  not  allow  you  to  sell  your  applica>on  on  the  App  Store  

Extensible Networking Platform 6 6 - CSE 436 – Software Engineering Workshop

Copyrights,  Patents,  Fair  Use…  •  Everything  discussed  in  this  class  and  on  the  website  is  

completely  OPEN  and  FREE    –  Do  whatever  you  want  with  it  

•  The  goal  of  this  class  is  to  share  as  much  informa>on  as  possible  –  Open  discussion  of  topics  and  ideas  

•  If  you  have  a  great  idea  and  do  not  want  others  to  implement  it  and  sell  it  DO  NOT  discuss  it  here  –  If  you  choose  to  discuss  it,  we  can  probably  improve  it  

•  You  are  free  to  become  an  Apple  Developer  ($99/yr)  and  sell  anything  you  create  in  this  class  –  Or  implement  another  student’s  great  idea  and  sell  it  

Page 4: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 7 7 - CSE 436 – Software Engineering Workshop

What  is  this  class  all  about?  

•  So/ware  Engineering  –  Crea`ng  useful  soTware  to  solve  interes`ng  problems  

– U`lize  amazing  hardware  with  lots  of  cool  features  

•  Building  applica>ons  on  the  Apple  iPhone  and  iPod  Touch  with  Cocoa  Touch  

Extensible Networking Platform 8 8 - CSE 436 – Software Engineering Workshop

Cocoa  Touch  and  iPhone  SDK    

•  Based  on  Cocoa  – API  used  to  develop  soTware  on  Mac  

•  Provides  rich  star>ng  point  for  exploring  app  design  

•  Shows  real-­‐world  implementa>ons  of  OO  design  pa^erns  

•  Designs  learned  on  iPhone  translate  directly  to  Mac  OS  X  

Page 5: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 9 9 - CSE 436 – Software Engineering Workshop

Why  Objec>ve-­‐C  

•  Exposure  to  other  languages  is  good  –  Probably  new  to  most  students  to  this  class  

•  ObjC  is  a  language  focused  on  simplicity  and  elegance  of  objected  oriented  design  –  Based  on  ANSI  C  –  Brings  many  object  oriented  principles,  but  with  a  minimal  amount  of  syntax  

•  Useful  data  point  to  compare  with  designs  of  C,    C++,  Java  other  languages  

Extensible Networking Platform 10 10 - CSE 436 – Software Engineering Workshop

Grading  

•  5  lab  assignments  during  the  semester  –  55%  of  your  final  grade  

 •  Mid-­‐term  

–  Covers  ObjC  programming  and  some  soTware  engineering  concepts  

–  20%  of  your  final  grade    •  Final  Project  

– Work  on  something  that  can  make  a  difference  •  Start  thinking  about  your  project  today!  

–  25%  of  your  final  grade  

Page 6: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 11 11 - CSE 436 – Software Engineering Workshop

Ques>ons?  

Extensible Networking Platform 12 12 - CSE 436 – Software Engineering Workshop

iPhone  OS  Overview  

Page 7: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 13 13 - CSE 436 – Software Engineering Workshop

iPhone  

Extensible Networking Platform 14 14 - CSE 436 – Software Engineering Workshop

Mac  OS  X  

Page 8: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 15 15 - CSE 436 – Software Engineering Workshop

Mac  OS  X  

Extensible Networking Platform 16 16 - CSE 436 – Software Engineering Workshop

iPhone  /  iPad  

Page 9: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 17 17 - CSE 436 – Software Engineering Workshop

•  Core  OS  – OS  X  Kernel  –  BSD  –  Sockets  –  Security  –  Power  Mgmt  –  Keychain  –  File  System  

Extensible Networking Platform 18 18 - CSE 436 – Software Engineering Workshop

•  Core  Services  –  Collec`ons  – Networking  –  SQLite  – Net  Services  –  Threading  –  Preferences  

Page 10: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 19 19 - CSE 436 – Software Engineering Workshop

•  Media  –  Core  Audio  – Audio  Mixing  – Audio  Recording  – Video  Playback  –  JPG,  PNG,  TIFF  –  PDF  – Quartz  (2D)  –  Core  Anima`on  – OpenGL  ES  

Extensible Networking Platform 20 20 - CSE 436 – Software Engineering Workshop

•  Cocoa  Touch  – Mul`-­‐Touch  Events  – Mul`-­‐Touch  Controls  – Accelerometer  –  Localiza`on  – Alerts  – Web  Views  

Page 11: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 21 21 - CSE 436 – Software Engineering Workshop

Development  

•  Tools  –  Xcode    

• Storyboard  (formerly  Interface  Builder)  

•  Frameworks  –  Founda`ons    – UIKit  

•  Languages  and  Run>mes  – Objec`ve  C  –  SwiT  

Extensible Networking Platform 22 22 - CSE 436 – Software Engineering Workshop

Cocoa  Touch  Architecture  

Page 12: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 23 23 - CSE 436 – Software Engineering Workshop

Object  Oriented  Programming  

Extensible Networking Platform 24 24 - CSE 436 – Software Engineering Workshop

Object  

Thing

Page 13: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 25 25 - CSE 436 – Software Engineering Workshop

Behavior  

Thing

doSomething behavior

Extensible Networking Platform 26 26 - CSE 436 – Software Engineering Workshop

Message  

Thing

doSomething

“doSomething”

Page 14: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 27 27 - CSE 436 – Software Engineering Workshop

State  

count flag

Thing

doSomething

state

behavior

Extensible Networking Platform 28 28 - CSE 436 – Software Engineering Workshop

Other  Objects  as  State  

count flag helper

Thing

doSomething

state

behavior

otherThing

doMore

Page 15: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 29 29 - CSE 436 – Software Engineering Workshop

Outlets  

slider label

Controller

updateLabel

Extensible Networking Platform 30 30 - CSE 436 – Software Engineering Workshop

Target/Ac>on  

slider label

Controller

updateLabel

target

action - ‘updateLabel’

Page 16: WelcometoCSE436S’ So/ware’Engineering’Workshop’ iPhone’Classtodd/cse... · Extensible Networking Platform 1 1 - CSE 436 – Software Engineering Workshop WelcometoCSE436S’

Extensible Networking Platform 31 31 - CSE 436 – Software Engineering Workshop

Demo  

Extensible Networking Platform 32 32 - CSE 436 – Software Engineering Workshop

Recap  

•  Keep  logic  separate  from  interface  elements      •  Outlets  connect  controllers  to  views    

•  Use  target/ac>on  to  customizer  behavior