ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
1   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
Introduction to iOS Application Development
                Architecture overview and development principles
                 Juan Luis Buenosvinos
                 Enterprise Architect
2   |
                 juan.buenosvinos.zamora@oracle.com
        ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
Agenda
?? Introduction
?? iOS History
?? iOS Architecture
?? iOS Development
?? Demo
?? In Conclusion




3   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
Introduction




4   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                          4
                                                                                               EWC REPRESENTATIVES COPY
Introduction
        Introduction




5   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History




6   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                          6
                                                                                               EWC REPRESENTATIVES COPY
iOS History
        iOS versions > Timeline



                iOS	
 ?1	
 ?                                                                   iOS	
 ?2	
 ?   iOS	
 ?3	
 ?


                iOS	
 ?4	
 ?                                                                   iOS	
 ?5	
 ?   iOS	
 ?6	
 ?
7   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
        iOS History > Timeline

                  Version	
 ?                      Released	
 ?                                   Device	
 ?                Key	
 ?Func4onality	
 ?
                                                                                                                            Core	
 ?iOS	
 ?UI	
 ?
                                                                                                                            Mul4touch	
 ?gestures	
 ?
                                                                                                                            Mobile	
 ?Safari	
 ?
                    iOS	
 ?1.0	
 ?                  06	
 ?/	
 ?2007	
 ?                         iPhone	
 ?2G	
 ?            iPod	
 ?
                                                                                                                            Visual	
 ?Voicemail	
 ?
                                                                                                                            Maps	
 ?
                                                                                                                            iTunes	
 ?Sync	
 ?
                                                                                                                            iTunes	
 ?Wi-?©\Fi	
 ?Music	
 ?Store	
 ?
                                                                                                iPhone	
 ?2G	
 ?
                    iOS	
 ?1.1	
 ?                  09	
 ?/	
 ?2007	
 ?
                                                                                                                            iPod	
 ?Touch	
 ?compa4bility	
 ?
                                                                                         iPod	
 ?Touch	
 ?1st	
 ?Gen.	
 ?



8   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
        iOS History > Timeline

                  Version	
 ?                      Released	
 ?                                   Device	
 ?                Key	
 ?Func4onality	
 ?
                                                                                                                            Na4ve	
 ?3rd-?©\party	
 ?apps	
 ?
                                                                                                iPhone	
 ?3G	
 ?
                                                                                                                            App	
 ?Store	
 ?
                    iOS	
 ?2.0	
 ?                   07/2008	
 ?                                iPhone	
 ?2G	
 ?            MicrosoK	
 ?Exchange	
 ?support	
 ?
                                                                                                                            MobileMe	
 ?
                                                                                         iPod	
 ?Touch	
 ?1st	
 ?Gen.	
 ?   Contact	
 ?Search	
 ?

                                                                                                iPhone	
 ?3G	
 ?            BaOery	
 ?life	
 ?and	
 ?speed	
 ??xes	
 ?

                                                                                                iPhone	
 ?2G	
 ?
                    iOS	
 ?2.1	
 ?                   09/2008	
 ?                                                            iTunes	
 ?Genius	
 ?playlists	
 ?
                                                                                        iPod	
 ?Touch	
 ?2nd	
 ?Gen.	
 ?
                                                                                         iPod	
 ?Touch	
 ?1st	
 ?Gen.	
 ?   Dropped	
 ?call	
 ??xes	
 ?




9   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
     iOS History > Timeline
                  Version	
 ?                      Released	
 ?                                  Device	
 ?                Key	
 ?Func4onality	
 ?
                                                                                                iPhone	
 ?3G	
 ?           Google	
 ?street	
 ?view	
 ?
                   iOS	
 ?2.2	
 ?                    11/2008	
 ?                                iPhone	
 ?2G	
 ?
                                                                                                                           Podcast	
 ?downloads	
 ?
                                                                                        iPod	
 ?Touch	
 ?1st	
 ?Gen.	
 ?
                                                                                                                           Cut,	
 ?copy,	
 ?paste	
 ?
                                                                                                iPhone	
 ?3G	
 ?
                                                                                                                           Voice	
 ?Control	
 ?
                                                                                                                           MMS	
 ?
                                                                                                iPhone	
 ?2G	
 ?
                                                                                                                           Spotlight	
 ?search	
 ?
                   iOS	
 ?3.0	
 ?                    06/2009	
 ?
                                                                                                                           Push	
 ?no4?ca4ons	
 ?
                                                                                        iPod	
 ?Touch	
 ?2nd	
 ?Gen.	
 ?
                                                                                                                           USB	
 ?&	
 ?Bluetooth	
 ?tethering	
 ?
                                                                                                                           Landscape	
 ?keyboard	
 ?
                                                                                        iPod	
 ?Touch	
 ?1st	
 ?Gen.	
 ?
                                                                                                                           Find	
 ?my	
 ?iPhone	
 ?



10   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
     iOS History > Timeline


                  Version	
 ?                      Released	
 ?                                   Device	
 ?                Key	
 ?Func4onality	
 ?
                                                                                                iPhone	
 ?3GS	
 ?           Genius	
 ?features	
 ?

                                                                                                iPhone	
 ?3G	
 ?
                                                                                                                            Ringtone	
 ?downloads	
 ?
                                                                                                iPhone	
 ?2G	
 ?
                    iOS	
 ?3.1	
 ?                   09/2009	
 ?
                                                                                        iPod	
 ?Touch	
 ?3rd	
 ?Gen.	
 ?    Remote	
 ?lock	
 ?

                                                                                        iPod	
 ?Touch	
 ?2nd	
 ?Gen.	
 ?
                                                                                                                            Voice	
 ?Control	
 ?over	
 ?Bluetooth	
 ?
                                                                                         iPod	
 ?Touch	
 ?1st	
 ?Gen.	
 ?




11   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
     iOS History > Timeline
                  Version	
 ?                      Released	
 ?                                   Device	
 ?               Key	
 ?Func4onality	
 ?
                                                                                                                           Support	
 ?for	
 ?iPad	
 ?resolu4on	
 ?
                                                                                                                           New	
 ?app	
 ?views	
 ?for	
 ?iPad	
 ?
                   iOS	
 ?3.2	
 ?                    04/2010	
 ?                                     iPad	
 ?              Loca4on	
 ?based	
 ?on	
 ?Apple	
 ?data	
 ?
                                                                                                                           Bluetooth	
 ?keyboard	
 ?support	
 ?
                                                                                                                           iBooks	
 ?

                                                                                                 iPhone	
 ?4	
 ?           Mul4tasking	
 ?
                                                                                                                           Home	
 ?screen	
 ?folders	
 ?
                                                                                                iPhone	
 ?3GS	
 ?
                                                                                                                           FaceTime	
 ?video	
 ?chat	
 ?
                   iOS	
 ?4.0	
 ?                    06/2012	
 ?                                iPhone	
 ?3G	
 ?           Uni?ed	
 ?email	
 ?inbox	
 ?
                                                                                                                           Threaded	
 ?email	
 ?messages	
 ?
                                                                                         iPod	
 ?Touch	
 ?3rd	
 ?Gen	
 ?
                                                                                                                           Re4na	
 ?Display	
 ?support	
 ?
                                                                                        iPod	
 ?Touch	
 ?2nd	
 ?Gen	
 ?    iAd	
 ?support	
 ?


12   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
     iOS History > Timeline



                  Version	
 ?                      Released	
 ?                                    Device	
 ?              Key	
 ?Func4onality	
 ?
                                                                                                 iPhone	
 ?4S	
 ?          Siri	
 ?

                                                                                                iPhone	
 ?3GS,	
 ?         No4?ca4on	
 ?Center	
 ?

                                                                                                     iPad	
 ?              PC-?©\free	
 ?
                   iOS	
 ?5.0	
 ?                    10/2011	
 ?
                                                                                                    iPad	
 ?2	
 ?          iTunes	
 ?Wi-?©\Fi	
 ?Sync	
 ?

                                                                                        iPod	
 ?Touch	
 ?4th	
 ?Gen,	
 ?   iMessage	
 ?

                                                                                         iPod	
 ?Touch	
 ?3rd	
 ?Gen	
 ?   iCloud	
 ?




13   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS History
     iOS History > Timeline

                  Version	
 ?                      Released	
 ?                                   Device	
 ?               Key	
 ?Func4onality	
 ?
                                                                                                 iPhone	
 ?5	
 ?           Homegrown	
 ?Maps	
 ?and	
 ?turn-?©\by-?©\turn	
 ?
                                                                                                                           naviga4on	
 ?
                                                                                                 iPhone	
 ?4S	
 ?          Siri	
 ?enhancements	
 ?

                                                                                                 iPhone	
 ?4	
 ?           Facebook	
 ?integra4on	
 ?

                   iOS	
 ?6.0	
 ?                   Fall	
 ?2012	
 ?                            iPhone	
 ?3GS	
 ?          Passbook	
 ?

                                                                                                   iPad	
 ?3	
 ?           iCloud	
 ?Tabs	
 ?

                                                                                                   iPad	
 ?2	
 ?           Mail	
 ?enhancements	
 ?

                                                                                         iPod	
 ?Touch	
 ?4th	
 ?Gen	
 ?   FaceTime	
 ?over	
 ?cellular	
 ?




14   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Architecture




15   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           15
                                                                                                EWC REPRESENTATIVES COPY
iOS Architecture
     iOS Architecture > Introduction


                                                OS	
 ?X	
 ?                                           iOS	
 ?
                                              Cocoa	
 ?                                         Cocoa	
 ?Touch	
 ?

                                              Media	
 ?                                              Media	
 ?

                                   Core	
 ?Services	
 ?                                         Core	
 ?Services	
 ?

                                           Core	
 ?OS	
 ?                                          Core	
 ?OS	
 ?


16   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Architecture
     iOS Architecture > Core OS


                                                                                                 Core	
 ?OS	
 ?
         Manage	
 ?the	
 ?virtual	
 ?memory	
 ?system,	
 ?threads,	
 ?the	
 ??le	
 ?system,	
 ?the	
 ?network,	
 ?and	
 ?
         inter-?©\process	
 ?communica4on	
 ?with	
 ?the	
 ?frameworks	
 ?in	
 ?the	
 ?Core	
 ?OS	
 ?layer.	
 ?This	
 ?
         layer	
 ?encompasses	
 ?the	
 ?kernel	
 ?environment,	
 ?drivers,	
 ?and	
 ?basic	
 ?interfaces	
 ?of	
 ?iO.	
 ?
                                                                                                                                                  Power	
 ?
         OS	
 ?X	
 ?Kernel	
 ?                 Mach	
 ?3.0	
 ?                         BSD	
 ?            Sockets	
 ?            Security	
 ?
                                                                                                                                                Management	
 ?
                     Keychain	
 ?                                   Cer??cates	
 ?                          File	
 ?System	
 ?                  Bonjour	
 ?




17   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Architecture
     iOS Architecture > Core Services


                                                                                                Core	
 ?Services	
 ?
         Gain	
 ?access	
 ?to	
 ?fundamental	
 ?iOS	
 ?services	
 ?with	
 ?the	
 ?frameworks	
 ?in	
 ?the	
 ?Core	
 ?
         Services	
 ?layer.	
 ?With	
 ?these	
 ?services,	
 ?access	
 ??les,	
 ?low-?©\level	
 ?data	
 ?types,	
 ?Bonjour	
 ?
         services,	
 ?network	
 ?sockets,	
 ?and	
 ?more.	
 ?Use	
 ?the	
 ?frameworks	
 ?in	
 ?this	
 ?layer	
 ?if	
 ?those	
 ?
         in	
 ?the	
 ?Cocoa	
 ?Touch	
 ?and	
 ?Media	
 ?layers	
 ?aren't	
 ?su?cient	
 ?for	
 ?your	
 ?needs.	
 ?
             Collec?ons	
 ?                         Core	
 ?Loca?on	
 ? Address	
 ?Book	
 ?                            Net	
 ?Services	
 ?   Networking	
 ?
              Threading	
 ?                             File	
 ?Access	
 ?                        Preferences	
 ?          SQLite	
 ?        URL	
 ?u?li?es	
 ?



18   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Architecture
     iOS Architecture > Media



                                                                                                    Media	
 ?
         Create	
 ?the	
 ?best	
 ?mul4media	
 ?experience	
 ?available	
 ?on	
 ?a	
 ?mobile	
 ?device	
 ?with	
 ?the	
 ?
         frameworks	
 ?in	
 ?the	
 ?Media	
 ?layer.	
 ?
         Core	
 ?Audio	
 ? JPG,	
 ?PNG,	
 ?TIFF	
 ?                                             OpenAL	
 ?         PDF	
 ?     Audio	
 ?Mixing	
 ?
              Quartz	
 ?                             Audio	
 ?                              Core	
 ?              Video	
 ?
                                                                                                                                OpenGL	
 ?ES	
 ?
               (2D)	
 ?                            Recording	
 ?                          Anima?on	
 ?          Playback	
 ?




19   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Architecture
     iOS Architecture > Cocoa Touch

                                                                                                Cocoa	
 ?Touch	
 ?
         Implement	
 ?a	
 ?graphical,	
 ?event-?©\driven	
 ?applica4on	
 ?in	
 ?iOS	
 ?with	
 ?the	
 ?frameworks	
 ?in	
 ?
         the	
 ?Cocoa	
 ?Touch	
 ?Layer.	
 ?In	
 ?addi4on,	
 ?use	
 ?the	
 ?frameworks	
 ?in	
 ?this	
 ?layer	
 ?to	
 ?access	
 ?
         key	
 ?device	
 ?features,	
 ?such	
 ?as	
 ?user	
 ?contacts.	
 ?
                                                      Mul?-?©\
           Mul?-?©\Touch	
 ?
                                                      Touch	
 ?                     Accelerometer	
 ?           View	
 ?Hierarchy	
 ?      Localiza?on	
 ?
             Events	
 ?
                                                     Controls	
 ?
                                                          Web	
 ?
                   Alerts	
 ?                                                        People	
 ?Picker	
 ?            Image	
 ?Picker	
 ?     Camera	
 ?
                                                          View	
 ?


20   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development




21   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           21
                                                                                                EWC REPRESENTATIVES COPY
iOS Development > Key Concepts




22   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           22
                                                                                                EWC REPRESENTATIVES COPY
iOS Development
     Development Key Concepts
                              Key	
 ?Element	
 ?                                       Descrip4on	
 ?


                                       Tools	
 ?
                                                                                                   XCode	
 ?                       Interface	
 ?Builder	
 ?



                              Frameworks	
 ?
                                                                                                Founda?on	
 ?                              UIKit	
 ?



                                  Language	
 ?
                                                                                                                Objec?ve-?©\C	
 ?


23   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Language > Objective-C


                                                                                  Main	
 ?Characteris4cs	
 ?
                                                       Superset	
 ?of	
 ?C	
 ?(Can	
 ?be	
 ?mixed	
 ?with	
 ?C	
 ?and	
 ?C++)	
 ?
                               Single	
 ?inheritance	
 ?                                        Categories	
 ?de?ne	
 ?behavior	
 ?across	
 ?classes	
 ?
                                Dynamic	
 ?run?me	
 ?                                                          Object	
 ?Messaging	
 ?
                                  Class	
 ?De?ni?on	
 ?                                                             Proper?es	
 ?
                                                                                                              New	
 ?Types	
 ?	
 ?
                                     Enumera?on	
 ?
                                                                                                   (Anonymous	
 ?classes,	
 ?Class,	
 ?Selector)	
 ?



24   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Language > Objective-C

                 Extension	
 ?                              Source	
 ?Type	
 ?
                                                            Header	
 ??les.	
 ?Header	
 ??les	
 ?contain	
 ?class,	
 ?type,	
 ?func?on,	
 ?and	
 ?
                             .h	
 ?
                                                            constant	
 ?declara?ons.	
 ?
                                                            Source	
 ??les.	
 ?This	
 ?is	
 ?the	
 ?typical	
 ?extension	
 ?used	
 ?for	
 ?source	
 ?
                            .m	
 ?
                                                            ?les	
 ?and	
 ?can	
 ?contain	
 ?both	
 ?Objec?ve-?©\C	
 ?and	
 ?C	
 ?code.	
 ?
                                                            Source	
 ??les.	
 ?A	
 ?source	
 ??le	
 ?with	
 ?this	
 ?extension	
 ?can	
 ?contain	
 ?C+
                                                            +	
 ?code	
 ?in	
 ?addi?on	
 ?to	
 ?Objec?ve-?©\C	
 ?and	
 ?C	
 ?code.	
 ?This	
 ?extension	
 ?
                         .mm	
 ?
                                                            should	
 ?be	
 ?used	
 ?only	
 ?if	
 ?you	
 ?actually	
 ?refer	
 ?to	
 ?C++	
 ?classes	
 ?or	
 ?
                                                            features	
 ?from	
 ?your	
 ?Objec?ve-?©\C	
 ?code.	
 ?



25   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Language > Objective-C




26   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Language > Objective-C




27   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Language > Objective-C




28   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Frameworks




29   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Tools > XCode




30   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Key Concepts > Tools > Instruments




31   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development > Introduction




32   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           32
                                                                                                EWC REPRESENTATIVES COPY
iOS Development
     Introduction > Anatomy of an iOS Application

                Compiled	
 ?Code	
 ?(User	
 ?code	
 ?+	
 ?Frameworks)	
 ?

               NIB	
 ?Files	
 ?(UI	
 ?Elements,	
 ?objects	
 ?rela?onships,¡­)	
 ?

                                                 Resources	
 ?(Images,	
 ?sounds,	
 ?¡­)	
 ?

                             Info.plist	
 ??le	
 ?(applica?on	
 ?con?gura?on)	
 ?

33   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
         Introduction > iOS Application Runtime Lifecycle




Launch	
 ?                                App.	
 ?                                   Load	
 ?         Wait	
 ?for	
 ?   Handle	
 ?
                                                                                                                                     Exit	
 ?App.	
 ?
 App.	
 ?                              Ini?alized	
 ?                               Main	
 ?LIB	
 ?    Event	
 ?        Event	
 ?




    34   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Introduction > iOS Application Key Components

          	
 ?Single	
 ?instance	
 ?of	
 ?UIApplica2on	
 ?(Singleton	
 ?Pa5ern	
 ?/	
 ?UIKit	
 ?Framework)	
 ?

                                 	
 ?Orchestrates	
 ?the	
 ?lifecycle	
 ?of	
 ?an	
 ?applica?on.	
 ?

                                 	
 ?Dispatches	
 ?events	
 ?

                                 	
 ?Manages	
 ?status	
 ?bar,	
 ?applica?on	
 ?icon	
 ?badge	
 ?

                                 	
 ?Delega?on	
 ?to	
 ?perform	
 ?applica?on-?©\speci?c	
 ?behavior	
 ?


35   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Introduction > iOS Application Key Components

            UIApplica2onDelegate	
 ?

                                         	
 ?An	
 ?object	
 ?to	
 ?par?cipate	
 ?in	
 ?applica?on	
 ?lifecycle.	
 ?

                                     	
 ?Call	
 ?implement	
 ?methods	
 ?witch	
 ?UIApplica?on	
 ?will	
 ?call.	
 ?	
 ?


                                     	
 ?Manages	
 ?status	
 ?bar,	
 ?applica?on	
 ?icon	
 ?badge	
 ?

36   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Introduction > iOS Application Key Components

            Info.plist	
 ??le	
 ?

                                         	
 ?Property	
 ?List	
 ?describes	
 ?an	
 ?applica?on.	
 ?

                                       	
 ?Icon	
 ?appearance,	
 ?status	
 ?bar	
 ?Style,	
 ?orienta?on,¡­	
 ?

                                       	
 ?Editable	
 ?on	
 ?XCode.	
 ?

37   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Introduction > Hello World




38   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Introduction > Model View Controller




             ?? The controller subsystem decouples the model and the view.



39   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Introduction > Model View Controller
               Layer	
 ?                               Descrip4on	
 ?
                                                       Model	
 ?objects	
 ?encapsulate	
 ?the	
 ?data	
 ?speci?c	
 ?to	
 ?an	
 ?applica?on	
 ?and	
 ?
               Model	
 ?                               de?ne	
 ?the	
 ?logic	
 ?and	
 ?computa?on	
 ?that	
 ?manipulate	
 ?and	
 ?process	
 ?that	
 ?
                                                       data.	
 ?	
 ?
                                                       A	
 ?view	
 ?object	
 ?is	
 ?an	
 ?object	
 ?in	
 ?an	
 ?applica?on	
 ?that	
 ?users	
 ?can	
 ?see.	
 ?A	
 ?
                 View	
 ?                              view	
 ?object	
 ?knows	
 ?how	
 ?to	
 ?draw	
 ?itself	
 ?and	
 ?can	
 ?respond	
 ?to	
 ?user	
 ?
                                                       ac?ons.	
 ?	
 ?
                                                       A	
 ?controller	
 ?object	
 ?acts	
 ?as	
 ?an	
 ?intermediary	
 ?between	
 ?one	
 ?or	
 ?more	
 ?of	
 ?
                                                       an	
 ?applica?on¡¯s	
 ?view	
 ?objects	
 ?and	
 ?one	
 ?or	
 ?more	
 ?of	
 ?its	
 ?model	
 ?objects.	
 ?
          Controller	
 ?
                                                       Controller	
 ?objects	
 ?are	
 ?thus	
 ?a	
 ?conduit	
 ?through	
 ?which	
 ?view	
 ?objects	
 ?
                                                       learn	
 ?about	
 ?changes	
 ?in	
 ?model	
 ?objects	
 ?and	
 ?vice	
 ?versa.	
 ?

40   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development > Views and
  Controllers




41   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           41
                                                                                                EWC REPRESENTATIVES COPY
iOS Development
     MVC > Organizing Content




42   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     MVC




43   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     MVC > Views




44   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     MVC > Views




45   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     MVC > Creation Views




46   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     MVC > View Controllers and Navigation Controllers




47   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
Demo




48   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           48
                                                                                                EWC REPRESENTATIVES COPY
iOS Development > Publishing Apps
  to the App Store




49   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           49
                                                                                                EWC REPRESENTATIVES COPY
iOS Development
           Publishing to App Store




                                                                                                          Install	
 ?the	
 ?
                                                                                       Get	
 ?the	
 ?                          Submit	
 ?the	
 ?     Apple	
 ?
Registra?on	
 ?                         Provisioning	
 ?                                                cer??ca?on	
 ?
                                                                                     cer??ca?on	
 ?                               App.	
 ?         Valida?on	
 ?
                                                                                                         into	
 ?XCode	
 ?




      50   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
iOS Development
     Publishing to App Store > Registration




51   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
In Conclusion




52   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
                                                                                                                           52
                                                                                                EWC REPRESENTATIVES COPY
53   |   ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential

More Related Content

Oracle master class_ios_20121019_v1

  • 1. 1 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 2. Introduction to iOS Application Development Architecture overview and development principles Juan Luis Buenosvinos Enterprise Architect 2 | juan.buenosvinos.zamora@oracle.com ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 3. Agenda ?? Introduction ?? iOS History ?? iOS Architecture ?? iOS Development ?? Demo ?? In Conclusion 3 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 4. Introduction 4 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 4 EWC REPRESENTATIVES COPY
  • 5. Introduction Introduction 5 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 6. iOS History 6 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 6 EWC REPRESENTATIVES COPY
  • 7. iOS History iOS versions > Timeline iOS ?1 ? iOS ?2 ? iOS ?3 ? iOS ?4 ? iOS ?5 ? iOS ?6 ? 7 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 8. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? Core ?iOS ?UI ? Mul4touch ?gestures ? Mobile ?Safari ? iOS ?1.0 ? 06 ?/ ?2007 ? iPhone ?2G ? iPod ? Visual ?Voicemail ? Maps ? iTunes ?Sync ? iTunes ?Wi-?©\Fi ?Music ?Store ? iPhone ?2G ? iOS ?1.1 ? 09 ?/ ?2007 ? iPod ?Touch ?compa4bility ? iPod ?Touch ?1st ?Gen. ? 8 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 9. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? Na4ve ?3rd-?©\party ?apps ? iPhone ?3G ? App ?Store ? iOS ?2.0 ? 07/2008 ? iPhone ?2G ? MicrosoK ?Exchange ?support ? MobileMe ? iPod ?Touch ?1st ?Gen. ? Contact ?Search ? iPhone ?3G ? BaOery ?life ?and ?speed ??xes ? iPhone ?2G ? iOS ?2.1 ? 09/2008 ? iTunes ?Genius ?playlists ? iPod ?Touch ?2nd ?Gen. ? iPod ?Touch ?1st ?Gen. ? Dropped ?call ??xes ? 9 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 10. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? iPhone ?3G ? Google ?street ?view ? iOS ?2.2 ? 11/2008 ? iPhone ?2G ? Podcast ?downloads ? iPod ?Touch ?1st ?Gen. ? Cut, ?copy, ?paste ? iPhone ?3G ? Voice ?Control ? MMS ? iPhone ?2G ? Spotlight ?search ? iOS ?3.0 ? 06/2009 ? Push ?no4?ca4ons ? iPod ?Touch ?2nd ?Gen. ? USB ?& ?Bluetooth ?tethering ? Landscape ?keyboard ? iPod ?Touch ?1st ?Gen. ? Find ?my ?iPhone ? 10 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 11. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? iPhone ?3GS ? Genius ?features ? iPhone ?3G ? Ringtone ?downloads ? iPhone ?2G ? iOS ?3.1 ? 09/2009 ? iPod ?Touch ?3rd ?Gen. ? Remote ?lock ? iPod ?Touch ?2nd ?Gen. ? Voice ?Control ?over ?Bluetooth ? iPod ?Touch ?1st ?Gen. ? 11 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 12. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? Support ?for ?iPad ?resolu4on ? New ?app ?views ?for ?iPad ? iOS ?3.2 ? 04/2010 ? iPad ? Loca4on ?based ?on ?Apple ?data ? Bluetooth ?keyboard ?support ? iBooks ? iPhone ?4 ? Mul4tasking ? Home ?screen ?folders ? iPhone ?3GS ? FaceTime ?video ?chat ? iOS ?4.0 ? 06/2012 ? iPhone ?3G ? Uni?ed ?email ?inbox ? Threaded ?email ?messages ? iPod ?Touch ?3rd ?Gen ? Re4na ?Display ?support ? iPod ?Touch ?2nd ?Gen ? iAd ?support ? 12 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 13. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? iPhone ?4S ? Siri ? iPhone ?3GS, ? No4?ca4on ?Center ? iPad ? PC-?©\free ? iOS ?5.0 ? 10/2011 ? iPad ?2 ? iTunes ?Wi-?©\Fi ?Sync ? iPod ?Touch ?4th ?Gen, ? iMessage ? iPod ?Touch ?3rd ?Gen ? iCloud ? 13 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 14. iOS History iOS History > Timeline Version ? Released ? Device ? Key ?Func4onality ? iPhone ?5 ? Homegrown ?Maps ?and ?turn-?©\by-?©\turn ? naviga4on ? iPhone ?4S ? Siri ?enhancements ? iPhone ?4 ? Facebook ?integra4on ? iOS ?6.0 ? Fall ?2012 ? iPhone ?3GS ? Passbook ? iPad ?3 ? iCloud ?Tabs ? iPad ?2 ? Mail ?enhancements ? iPod ?Touch ?4th ?Gen ? FaceTime ?over ?cellular ? 14 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 15. iOS Architecture 15 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 15 EWC REPRESENTATIVES COPY
  • 16. iOS Architecture iOS Architecture > Introduction OS ?X ? iOS ? Cocoa ? Cocoa ?Touch ? Media ? Media ? Core ?Services ? Core ?Services ? Core ?OS ? Core ?OS ? 16 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 17. iOS Architecture iOS Architecture > Core OS Core ?OS ? Manage ?the ?virtual ?memory ?system, ?threads, ?the ??le ?system, ?the ?network, ?and ? inter-?©\process ?communica4on ?with ?the ?frameworks ?in ?the ?Core ?OS ?layer. ?This ? layer ?encompasses ?the ?kernel ?environment, ?drivers, ?and ?basic ?interfaces ?of ?iO. ? Power ? OS ?X ?Kernel ? Mach ?3.0 ? BSD ? Sockets ? Security ? Management ? Keychain ? Cer??cates ? File ?System ? Bonjour ? 17 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 18. iOS Architecture iOS Architecture > Core Services Core ?Services ? Gain ?access ?to ?fundamental ?iOS ?services ?with ?the ?frameworks ?in ?the ?Core ? Services ?layer. ?With ?these ?services, ?access ??les, ?low-?©\level ?data ?types, ?Bonjour ? services, ?network ?sockets, ?and ?more. ?Use ?the ?frameworks ?in ?this ?layer ?if ?those ? in ?the ?Cocoa ?Touch ?and ?Media ?layers ?aren't ?su?cient ?for ?your ?needs. ? Collec?ons ? Core ?Loca?on ? Address ?Book ? Net ?Services ? Networking ? Threading ? File ?Access ? Preferences ? SQLite ? URL ?u?li?es ? 18 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 19. iOS Architecture iOS Architecture > Media Media ? Create ?the ?best ?mul4media ?experience ?available ?on ?a ?mobile ?device ?with ?the ? frameworks ?in ?the ?Media ?layer. ? Core ?Audio ? JPG, ?PNG, ?TIFF ? OpenAL ? PDF ? Audio ?Mixing ? Quartz ? Audio ? Core ? Video ? OpenGL ?ES ? (2D) ? Recording ? Anima?on ? Playback ? 19 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 20. iOS Architecture iOS Architecture > Cocoa Touch Cocoa ?Touch ? Implement ?a ?graphical, ?event-?©\driven ?applica4on ?in ?iOS ?with ?the ?frameworks ?in ? the ?Cocoa ?Touch ?Layer. ?In ?addi4on, ?use ?the ?frameworks ?in ?this ?layer ?to ?access ? key ?device ?features, ?such ?as ?user ?contacts. ? Mul?-?©\ Mul?-?©\Touch ? Touch ? Accelerometer ? View ?Hierarchy ? Localiza?on ? Events ? Controls ? Web ? Alerts ? People ?Picker ? Image ?Picker ? Camera ? View ? 20 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 21. iOS Development 21 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 21 EWC REPRESENTATIVES COPY
  • 22. iOS Development > Key Concepts 22 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 22 EWC REPRESENTATIVES COPY
  • 23. iOS Development Development Key Concepts Key ?Element ? Descrip4on ? Tools ? XCode ? Interface ?Builder ? Frameworks ? Founda?on ? UIKit ? Language ? Objec?ve-?©\C ? 23 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 24. iOS Development Key Concepts > Language > Objective-C Main ?Characteris4cs ? Superset ?of ?C ?(Can ?be ?mixed ?with ?C ?and ?C++) ? Single ?inheritance ? Categories ?de?ne ?behavior ?across ?classes ? Dynamic ?run?me ? Object ?Messaging ? Class ?De?ni?on ? Proper?es ? New ?Types ? ? Enumera?on ? (Anonymous ?classes, ?Class, ?Selector) ? 24 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 25. iOS Development Key Concepts > Language > Objective-C Extension ? Source ?Type ? Header ??les. ?Header ??les ?contain ?class, ?type, ?func?on, ?and ? .h ? constant ?declara?ons. ? Source ??les. ?This ?is ?the ?typical ?extension ?used ?for ?source ? .m ? ?les ?and ?can ?contain ?both ?Objec?ve-?©\C ?and ?C ?code. ? Source ??les. ?A ?source ??le ?with ?this ?extension ?can ?contain ?C+ + ?code ?in ?addi?on ?to ?Objec?ve-?©\C ?and ?C ?code. ?This ?extension ? .mm ? should ?be ?used ?only ?if ?you ?actually ?refer ?to ?C++ ?classes ?or ? features ?from ?your ?Objec?ve-?©\C ?code. ? 25 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 26. iOS Development Key Concepts > Language > Objective-C 26 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 27. iOS Development Key Concepts > Language > Objective-C 27 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 28. iOS Development Key Concepts > Language > Objective-C 28 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 29. iOS Development Key Concepts > Frameworks 29 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 30. iOS Development Key Concepts > Tools > XCode 30 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 31. iOS Development Key Concepts > Tools > Instruments 31 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 32. iOS Development > Introduction 32 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 32 EWC REPRESENTATIVES COPY
  • 33. iOS Development Introduction > Anatomy of an iOS Application Compiled ?Code ?(User ?code ?+ ?Frameworks) ? NIB ?Files ?(UI ?Elements, ?objects ?rela?onships,¡­) ? Resources ?(Images, ?sounds, ?¡­) ? Info.plist ??le ?(applica?on ?con?gura?on) ? 33 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 34. iOS Development Introduction > iOS Application Runtime Lifecycle Launch ? App. ? Load ? Wait ?for ? Handle ? Exit ?App. ? App. ? Ini?alized ? Main ?LIB ? Event ? Event ? 34 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 35. iOS Development Introduction > iOS Application Key Components ?Single ?instance ?of ?UIApplica2on ?(Singleton ?Pa5ern ?/ ?UIKit ?Framework) ? ?Orchestrates ?the ?lifecycle ?of ?an ?applica?on. ? ?Dispatches ?events ? ?Manages ?status ?bar, ?applica?on ?icon ?badge ? ?Delega?on ?to ?perform ?applica?on-?©\speci?c ?behavior ? 35 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 36. iOS Development Introduction > iOS Application Key Components UIApplica2onDelegate ? ?An ?object ?to ?par?cipate ?in ?applica?on ?lifecycle. ? ?Call ?implement ?methods ?witch ?UIApplica?on ?will ?call. ? ? ?Manages ?status ?bar, ?applica?on ?icon ?badge ? 36 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 37. iOS Development Introduction > iOS Application Key Components Info.plist ??le ? ?Property ?List ?describes ?an ?applica?on. ? ?Icon ?appearance, ?status ?bar ?Style, ?orienta?on,¡­ ? ?Editable ?on ?XCode. ? 37 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 38. iOS Development Introduction > Hello World 38 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 39. iOS Development Introduction > Model View Controller ?? The controller subsystem decouples the model and the view. 39 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 40. iOS Development Introduction > Model View Controller Layer ? Descrip4on ? Model ?objects ?encapsulate ?the ?data ?speci?c ?to ?an ?applica?on ?and ? Model ? de?ne ?the ?logic ?and ?computa?on ?that ?manipulate ?and ?process ?that ? data. ? ? A ?view ?object ?is ?an ?object ?in ?an ?applica?on ?that ?users ?can ?see. ?A ? View ? view ?object ?knows ?how ?to ?draw ?itself ?and ?can ?respond ?to ?user ? ac?ons. ? ? A ?controller ?object ?acts ?as ?an ?intermediary ?between ?one ?or ?more ?of ? an ?applica?on¡¯s ?view ?objects ?and ?one ?or ?more ?of ?its ?model ?objects. ? Controller ? Controller ?objects ?are ?thus ?a ?conduit ?through ?which ?view ?objects ? learn ?about ?changes ?in ?model ?objects ?and ?vice ?versa. ? 40 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 41. iOS Development > Views and Controllers 41 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 41 EWC REPRESENTATIVES COPY
  • 42. iOS Development MVC > Organizing Content 42 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 43. iOS Development MVC 43 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 44. iOS Development MVC > Views 44 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 45. iOS Development MVC > Views 45 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 46. iOS Development MVC > Creation Views 46 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 47. iOS Development MVC > View Controllers and Navigation Controllers 47 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 48. Demo 48 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 48 EWC REPRESENTATIVES COPY
  • 49. iOS Development > Publishing Apps to the App Store 49 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 49 EWC REPRESENTATIVES COPY
  • 50. iOS Development Publishing to App Store Install ?the ? Get ?the ? Submit ?the ? Apple ? Registra?on ? Provisioning ? cer??ca?on ? cer??ca?on ? App. ? Valida?on ? into ?XCode ? 50 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 51. iOS Development Publishing to App Store > Registration 51 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential
  • 52. In Conclusion 52 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential 52 EWC REPRESENTATIVES COPY
  • 53. 53 | ? 2012 Oracle Corporation and Mercadona Internal Only ¨C Proprietary and Confidential