SlideShare a Scribd company logo
1 of 35
Download to read offline
АРХИТЕКТУРА И MVC
                              Лекция 2




                                         TTLabs - iOS Labs
Thursday, December 15, 11
КОМУНИКАЦИЯ

    •   http://www.slideshare.net/mignev/tag/ios-development-at-
        initlab

    •   Google Groups

    •   Skype: dani_rangelov

    •   Facebook

    •   Mail: dani@tentouch.com


Thursday, December 15, 11
APPSTORE




Thursday, December 15, 11
APPSTORE




Thursday, December 15, 11
APPSTORE




Thursday, December 15, 11
APPSTORE




Thursday, December 15, 11
APPSTORE




Thursday, December 15, 11
APPSTORE




Thursday, December 15, 11
CORE OS
      iOS is a Mac OS X which is a UNIX - like system

                            Cocoa Touch
                                                 Security FW          Accelerate FW

                               Media                 External Accessory FW

                                                                 System
                                                        •   Threading (POSIX threads)
                            Core Services               •
                                                        •
                                                            Networking (BSD sockets)
                                                            File-system access
                                                        •   Standard I/O
                                                        •   Bonjour and DNS services
                                                        •   Locale information
                                                        •   Memory allocation
                              Core OS



Thursday, December 15, 11
CORE SERVICES

                            Cocoa Touch         Threading             High-Level
                                                                       Features

                                                File Access     •   ARC (Automatic
                                                                    Reference Counting)

                               Media                            •
                                                                •
                                                                    iCloud
                                                                    GCD(Grand Central
                                            Preferences         •
                                                                    Dispatch)
                                                                    In-App Purchase
                                                                •   SQLite


                            Core Services        Collections        Networking
                                            •    NSArray
                                            •    NSDictionary
                                            •    NSSet
                              Core OS                               Address Book




Thursday, December 15, 11
MEDIA LAYER

                            Cocoa Touch     Core Audio         Core Animation


                                               AirPlay           Audio Recording
                               Media
                                            Quartz (2D)          Audio Mixing

                            Core Services     Video Playback           OpenAL


                                            JPEG, PNG, TIFF           PDF
                              Core OS



Thursday, December 15, 11
COCOA TOUCH

                            Cocoa Touch       Map Kit
                                                               High-Level Features

                                                iAd            •   Push Notifications
                                                               •   Storyboard

                               Media                           •
                                                               •
                                                                   Local Notifications
                                                                   Printing
                                             Game Kit          •   Gesture Recognition
                                                               •   File Sharing



                            Core Services   Events (Touch)

                                            View Controllers              UIKit
                              Core OS



Thursday, December 15, 11
MVC - MODEL VIEW
                               CONTROLLER
                                             Как да се изобрази

                                                          Controller

                                                        Определя поведението
                                                           Променя модела
                                                   Определя кое View получава touches

                    Описание                                                              Изобразяване

                            Model                                                                     View
              Запазва състоянието на апликацията                                  Изпраща действията на потребителя към controller
                  Показва функционалността                                                  Изисква промяна на модела
                 Съобщава на View за промени                                                Изобразява модела /render/

Thursday, December 15, 11
MVC - MODEL VIEW
                               CONTROLLER

                                    Controller




                            Model                View



Thursday, December 15, 11
MVC - MODEL VIEW
                               CONTROLLER
                                    Notification / KVO

                                             Controller
                                                                    De
                                                                      leg
                                                        O                ate
                                                            ut
                                                              let
   Notify
                            Model                                              View



Thursday, December 15, 11
CHAPTER 2



                        APPLICATION EVENTS
                            Core App Objects




                            Figure 2-1       Key objects in an iOS app

                                                      Model



                                  Data Objects                      Document




                                                      Controller                            View


                                 UIApplication                Application Delegate        UIWindow




                                    Event                   Data Model Objects       Data Model Objects
                                                             Data Model Objects       Data Model Objects
                                    Loop                         View Controller      Views and UI Objects




                                    Custom Objects

                                    System Objects

                                    Either system or custom objects



                            Table 2-1       The role of objects in an iOS app
Thursday, December 15, 11
MVC - MODEL VIEW
                               CONTROLLER
                                                                                  backgroundColor  property
                                                                                  hidden  property
                                                                                  alpha property

                                                Controller                        userInteractionEnabled  property
                                                                                  multi pleTouchEnabled  property
                                                                                  autoresizingMask  property
                                                                                  autoresizesSubviews  property
                                                                                  – initWithFrame:
                                                                                  – addSubview:
                                                                                  – bringSubviewToFront:
                                                                                  – sendSubviewToBack:
                                                                                  – removeFromSuperview
              CoreData                                                            + beginAnimations:context:
              NSArray                                                             + commitAnimations
              NSDictionary
              plist
                                    -   viewDidLoad
                                    -   viewDidUnload
                                    –   viewWillAppear:
                                    –   viewDidAppear:
                                    –   viewWillDisappear:

                            Model   –
                                    –
                                        viewDidDisappear:
                                        shouldAutorotateToInterfaceOrientation:
                                    -
                                    –
                                    –
                                        willRotateToInterfaceOrientation:
                                        didReceiveMemoryWarning
                                        dismissViewControllerAnimated:
                                                                                               View
                                    –   presentModalViewController:animated:
                                    –   dismissModalViewControllerAnimated:




Thursday, December 15, 11
ОСНОВИ НА OBJECTIVE C
                            @“Hello World!”




Thursday, December 15, 11
OBJECTIVE C

    • Комбинация                 межди C & Smaltalk

    • Superset              на С

    • Компилира                 С и С++ класове

    • NeXTSTEP                  (NS)

    • Apple

    • Objective             C

Thursday, December 15, 11
XCODE




Thursday, December 15, 11
THE APP LAUNCH CYCLE
                            CHAPTER 3
                            App States and Multitasking


                                                            Foreground
                            Figure 3-2        Launching an app into the foreground

                             Launch Time                                       Your code
                                           User taps app icon



                                                 main()



                                         UIApplicationMain()



                                            Load main UI file


                                                                                              application:
                                             Initialize the app
                                                                                     didFinishLaunchingWithOptions:


                             Foreground

                                             Activate the app                         applicationDidBecomeActive:




                                                  Event
                                                                                              Handle events
                                                  Loop




                                         Switch to a different app




Thursday, December 15, 11
51).

                                      Suspended     The app is in the background but is not
                                                    automatically and does not notify them

                            APPLICATION STATES
                                                    in memory but does not execute any c
                                                    When a low-‐memory condition occurs, t
                                                    to make more space for the foreground


                                      Figure 3-1    State changes in an iOS app

                                                    Not running



                                       Foreground

                                                      Inactive




                                                      Active



                                       Background

                                                    Background




                                                    Suspended


Thursday, December 15, 11
RUN LOOP

                                           main.m



    • вход            към програмата




Thursday, December 15, 11
.H ( HEADER FILE)

                                         AppDelegate.h


    • публични              методи

    • публични              променливи




Thursday, December 15, 11
.M (IMPLEMENTATION FILE)
                                          AppDelegate.m




    • описание              на методите




Thursday, December 15, 11
ВИВОДЕ МЕТОДИ



    • instance

    • class




Thursday, December 15, 11
ОСНОВЕН ОБЕКТ
                               NSObject

    •-         (id)init;

    •+         (id)alloc;

    •-         (void)dealloc;

    •-         (id)copy;



Thursday, December 15, 11
MEMORY MANAGEMENT


    • retain

    • release

    • вески  обект, който притежаваме трябва да бъде
        освободен, когато свършим работата си с него



Thursday, December 15, 11
APPLICATION SANDBOX   APPENDIX A
                                        The iOS Environment




                                        Figure A-1     Sandbox directories in iOS

                                                                                    App Sandbox


                                                                                                MyApp.app

                                                                                                Documents
                                                                           App

    • собствени             файлове                         ...
                                                                                                Library

                                                                                                tmp


    • няма                                                        ...
                      достъм по чужди
                                                                                    App Sandbox



    • сигурност                                                            App            ...
                                                                                    App Sandbox


                                                                           App            ...

                                        Important: The purpose of a sandbox is to limit the damage that a compromi
Thursday, December 15, 11               system. Sandboxes do not prevent attacks from happening to a particular app a
XCODE PROJECT




Thursday, December 15, 11
ЗА СЛЕДВАЩИЯТ ПЪТ
                            Подгряване




Thursday, December 15, 11
DATA MODEL
   • NSString (NSMutableString)
   • NSNumber
   • NSData (NSMutableData)
   • NSValue
   • NSDate
   • NSArray (NSMutableArray)
   • NSDictionary (NSMutableDictionary)
   • NSSet (NSMutableSet), NSOrderedSet
     (NSMutableOrderedSet), NSIndexSet
     (NSMutableIndexSet)

Thursday, December 15, 11
for iOS.


                            Figure 2-‐3 shows the basic structure of an app whose interface is constructed solely using view objects. In
      BUILDING AN INTERFACE USING UIKIT
                            this instance, the main view spans the visible area of the window (minus the scroll bar) and provides a simple
                            white background. The main view also contains three subviews: an image view, a text view, and a button.


                    VIEWS
                            Those subviews are what the app uses to present content to the user and respond to interactions. All of the
                            views in the hierarchy are managed by a single view controller object.

                            Figure 2-3       Building your interface using view objects

                                                           View Controller

                            Application controller layer

                            View layer


                                 Window                         View




                                          Image View         Text View       Button




                            In a typical view-‐based app, you coordinate the onscreen views using your view controller objects. An app
                            always has one view controller that is responsible for presenting all of the content on the screen. That view
                            controller has a content view, which itself may contain other views. Some view controllers can also act as
Thursday, December 15, 11   containers for content provided by other view controllers. For example, a split view controller displays the
СТРУКТУРИ

   • CGPoint
   • CGSize
   • CGRect = CGPoint, CGRect




Thursday, December 15, 11
БЛАГОДАРЯ!




Thursday, December 15, 11

More Related Content

Similar to iOS Architecture and MVC

Getting started with Cloud Foundry
Getting started with Cloud FoundryGetting started with Cloud Foundry
Getting started with Cloud FoundryLode Vermeiren
 
Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...
Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...
Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...Kara Van Malssen
 
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric WautersDynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wautersdynamicscom
 
RIPE Atlas
RIPE AtlasRIPE Atlas
RIPE AtlasRIPE NCC
 
Intro to Table-Grouping™ technology
Intro to Table-Grouping™ technologyIntro to Table-Grouping™ technology
Intro to Table-Grouping™ technologyDavid McFarlane
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptOpenSourceIndia
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptsuniltomar04
 
OSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business ProcessesOSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business ProcessesEric D. Schabell
 
A short introduction to the cloud
A short introduction to the cloudA short introduction to the cloud
A short introduction to the cloudLaurent Eschenauer
 
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the CloudWebinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the CloudInternap
 
Firefox3.5 And Next
Firefox3.5 And NextFirefox3.5 And Next
Firefox3.5 And NextChanny Yun
 
1112 agile approach to pci dss development
1112 agile approach to pci dss development1112 agile approach to pci dss development
1112 agile approach to pci dss developmentbezpiecznik
 
Battlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationBattlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationElectronic Arts / DICE
 
AlphaBox Technology Overview
AlphaBox Technology OverviewAlphaBox Technology Overview
AlphaBox Technology Overviewmonica_singh
 
Haiku OS Presentation
Haiku OS PresentationHaiku OS Presentation
Haiku OS Presentationlaawrence
 
[EN] Club Automation presentation "Quality Model for Industrial Automation", ...
[EN] Club Automation presentation "Quality Model for Industrial Automation", ...[EN] Club Automation presentation "Quality Model for Industrial Automation", ...
[EN] Club Automation presentation "Quality Model for Industrial Automation", ...Itris Automation Square
 
Can invisible also be amazing? Designing fluid and connected experiences
Can invisible also be amazing? Designing fluid and connected experiencesCan invisible also be amazing? Designing fluid and connected experiences
Can invisible also be amazing? Designing fluid and connected experiencesFjord
 
RIPE Labs Update
RIPE Labs UpdateRIPE Labs Update
RIPE Labs UpdateRIPE NCC
 

Similar to iOS Architecture and MVC (20)

Getting started with Cloud Foundry
Getting started with Cloud FoundryGetting started with Cloud Foundry
Getting started with Cloud Foundry
 
Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...
Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...
Implementing Metadata Standards for a Digital Audiovisual Preservation Reposi...
 
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric WautersDynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
Dynamics NAV, Windows Azure & Windows Phone 7, Eric Wauters
 
RIPE Atlas
RIPE AtlasRIPE Atlas
RIPE Atlas
 
Intro to Table-Grouping™ technology
Intro to Table-Grouping™ technologyIntro to Table-Grouping™ technology
Intro to Table-Grouping™ technology
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-ppt
 
Divyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-pptDivyanshu open stack presentation -osi-ppt
Divyanshu open stack presentation -osi-ppt
 
OSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business ProcessesOSC11 - The future is now for all your Business Processes
OSC11 - The future is now for all your Business Processes
 
A short introduction to the cloud
A short introduction to the cloudA short introduction to the cloud
A short introduction to the cloud
 
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the CloudWebinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
Webinar: Top 5 Mistakes Your Don't Want to Make When Moving to the Cloud
 
Firefox3.5 And Next
Firefox3.5 And NextFirefox3.5 And Next
Firefox3.5 And Next
 
SOA OSB BPEL BPM Presentation
SOA OSB BPEL BPM PresentationSOA OSB BPEL BPM Presentation
SOA OSB BPEL BPM Presentation
 
1112 agile approach to pci dss development
1112 agile approach to pci dss development1112 agile approach to pci dss development
1112 agile approach to pci dss development
 
Battlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationBattlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integration
 
AlphaBox Technology Overview
AlphaBox Technology OverviewAlphaBox Technology Overview
AlphaBox Technology Overview
 
FYP Presentation
FYP PresentationFYP Presentation
FYP Presentation
 
Haiku OS Presentation
Haiku OS PresentationHaiku OS Presentation
Haiku OS Presentation
 
[EN] Club Automation presentation "Quality Model for Industrial Automation", ...
[EN] Club Automation presentation "Quality Model for Industrial Automation", ...[EN] Club Automation presentation "Quality Model for Industrial Automation", ...
[EN] Club Automation presentation "Quality Model for Industrial Automation", ...
 
Can invisible also be amazing? Designing fluid and connected experiences
Can invisible also be amazing? Designing fluid and connected experiencesCan invisible also be amazing? Designing fluid and connected experiences
Can invisible also be amazing? Designing fluid and connected experiences
 
RIPE Labs Update
RIPE Labs UpdateRIPE Labs Update
RIPE Labs Update
 

More from Marian Ignev

Какво е Startup?
Какво е Startup?Какво е Startup?
Какво е Startup?Marian Ignev
 
PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!Marian Ignev
 
iOS Tips + ModalVC
iOS Tips + ModalVCiOS Tips + ModalVC
iOS Tips + ModalVCMarian Ignev
 
iOS UI Table Views
iOS UI Table ViewsiOS UI Table Views
iOS UI Table ViewsMarian Ignev
 
iOS Memory management & Navigation
iOS Memory management & NavigationiOS Memory management & Navigation
iOS Memory management & NavigationMarian Ignev
 
iOS Development - Intro
iOS Development - IntroiOS Development - Intro
iOS Development - IntroMarian Ignev
 

More from Marian Ignev (8)

Какво е Startup?
Какво е Startup?Какво е Startup?
Какво е Startup?
 
PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!PaaS бъдещето на креативния програмист!
PaaS бъдещето на креативния програмист!
 
iOS Tips + ModalVC
iOS Tips + ModalVCiOS Tips + ModalVC
iOS Tips + ModalVC
 
iOS UI Table Views
iOS UI Table ViewsiOS UI Table Views
iOS UI Table Views
 
iOS Memory management & Navigation
iOS Memory management & NavigationiOS Memory management & Navigation
iOS Memory management & Navigation
 
iOS Views
iOS ViewsiOS Views
iOS Views
 
The messy lecture
The messy lectureThe messy lecture
The messy lecture
 
iOS Development - Intro
iOS Development - IntroiOS Development - Intro
iOS Development - Intro
 

Recently uploaded

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

iOS Architecture and MVC

  • 1. АРХИТЕКТУРА И MVC Лекция 2 TTLabs - iOS Labs Thursday, December 15, 11
  • 2. КОМУНИКАЦИЯ • http://www.slideshare.net/mignev/tag/ios-development-at- initlab • Google Groups • Skype: dani_rangelov • Facebook • Mail: dani@tentouch.com Thursday, December 15, 11
  • 9. CORE OS iOS is a Mac OS X which is a UNIX - like system Cocoa Touch Security FW Accelerate FW Media External Accessory FW System • Threading (POSIX threads) Core Services • • Networking (BSD sockets) File-system access • Standard I/O • Bonjour and DNS services • Locale information • Memory allocation Core OS Thursday, December 15, 11
  • 10. CORE SERVICES Cocoa Touch Threading High-Level Features File Access • ARC (Automatic Reference Counting) Media • • iCloud GCD(Grand Central Preferences • Dispatch) In-App Purchase • SQLite Core Services Collections Networking • NSArray • NSDictionary • NSSet Core OS Address Book Thursday, December 15, 11
  • 11. MEDIA LAYER Cocoa Touch Core Audio Core Animation AirPlay Audio Recording Media Quartz (2D) Audio Mixing Core Services Video Playback OpenAL JPEG, PNG, TIFF PDF Core OS Thursday, December 15, 11
  • 12. COCOA TOUCH Cocoa Touch Map Kit High-Level Features iAd • Push Notifications • Storyboard Media • • Local Notifications Printing Game Kit • Gesture Recognition • File Sharing Core Services Events (Touch) View Controllers UIKit Core OS Thursday, December 15, 11
  • 13. MVC - MODEL VIEW CONTROLLER Как да се изобрази Controller Определя поведението Променя модела Определя кое View получава touches Описание Изобразяване Model View Запазва състоянието на апликацията Изпраща действията на потребителя към controller Показва функционалността Изисква промяна на модела Съобщава на View за промени Изобразява модела /render/ Thursday, December 15, 11
  • 14. MVC - MODEL VIEW CONTROLLER Controller Model View Thursday, December 15, 11
  • 15. MVC - MODEL VIEW CONTROLLER Notification / KVO Controller De leg O ate ut let Notify Model View Thursday, December 15, 11
  • 16. CHAPTER 2 APPLICATION EVENTS Core App Objects Figure 2-1 Key objects in an iOS app Model Data Objects Document Controller View UIApplication Application Delegate UIWindow Event Data Model Objects Data Model Objects Data Model Objects Data Model Objects Loop View Controller Views and UI Objects Custom Objects System Objects Either system or custom objects Table 2-1 The role of objects in an iOS app Thursday, December 15, 11
  • 17. MVC - MODEL VIEW CONTROLLER backgroundColor  property hidden  property alpha property Controller userInteractionEnabled  property multi pleTouchEnabled  property autoresizingMask  property autoresizesSubviews  property – initWithFrame: – addSubview: – bringSubviewToFront: – sendSubviewToBack: – removeFromSuperview CoreData + beginAnimations:context: NSArray + commitAnimations NSDictionary plist - viewDidLoad - viewDidUnload – viewWillAppear: – viewDidAppear: – viewWillDisappear: Model – – viewDidDisappear: shouldAutorotateToInterfaceOrientation: - – – willRotateToInterfaceOrientation: didReceiveMemoryWarning dismissViewControllerAnimated: View – presentModalViewController:animated: – dismissModalViewControllerAnimated: Thursday, December 15, 11
  • 18. ОСНОВИ НА OBJECTIVE C @“Hello World!” Thursday, December 15, 11
  • 19. OBJECTIVE C • Комбинация межди C & Smaltalk • Superset на С • Компилира С и С++ класове • NeXTSTEP (NS) • Apple • Objective C Thursday, December 15, 11
  • 21. THE APP LAUNCH CYCLE CHAPTER 3 App States and Multitasking Foreground Figure 3-2 Launching an app into the foreground Launch Time Your code User taps app icon main() UIApplicationMain() Load main UI file application: Initialize the app didFinishLaunchingWithOptions: Foreground Activate the app applicationDidBecomeActive: Event Handle events Loop Switch to a different app Thursday, December 15, 11
  • 22. 51). Suspended The app is in the background but is not automatically and does not notify them APPLICATION STATES in memory but does not execute any c When a low-‐memory condition occurs, t to make more space for the foreground Figure 3-1 State changes in an iOS app Not running Foreground Inactive Active Background Background Suspended Thursday, December 15, 11
  • 23. RUN LOOP main.m • вход към програмата Thursday, December 15, 11
  • 24. .H ( HEADER FILE) AppDelegate.h • публични методи • публични променливи Thursday, December 15, 11
  • 25. .M (IMPLEMENTATION FILE) AppDelegate.m • описание на методите Thursday, December 15, 11
  • 26. ВИВОДЕ МЕТОДИ • instance • class Thursday, December 15, 11
  • 27. ОСНОВЕН ОБЕКТ NSObject •- (id)init; •+ (id)alloc; •- (void)dealloc; •- (id)copy; Thursday, December 15, 11
  • 28. MEMORY MANAGEMENT • retain • release • вески обект, който притежаваме трябва да бъде освободен, когато свършим работата си с него Thursday, December 15, 11
  • 29. APPLICATION SANDBOX APPENDIX A The iOS Environment Figure A-1 Sandbox directories in iOS App Sandbox MyApp.app Documents App • собствени файлове ... Library tmp • няма ... достъм по чужди App Sandbox • сигурност App ... App Sandbox App ... Important: The purpose of a sandbox is to limit the damage that a compromi Thursday, December 15, 11 system. Sandboxes do not prevent attacks from happening to a particular app a
  • 31. ЗА СЛЕДВАЩИЯТ ПЪТ Подгряване Thursday, December 15, 11
  • 32. DATA MODEL • NSString (NSMutableString) • NSNumber • NSData (NSMutableData) • NSValue • NSDate • NSArray (NSMutableArray) • NSDictionary (NSMutableDictionary) • NSSet (NSMutableSet), NSOrderedSet (NSMutableOrderedSet), NSIndexSet (NSMutableIndexSet) Thursday, December 15, 11
  • 33. for iOS. Figure 2-‐3 shows the basic structure of an app whose interface is constructed solely using view objects. In BUILDING AN INTERFACE USING UIKIT this instance, the main view spans the visible area of the window (minus the scroll bar) and provides a simple white background. The main view also contains three subviews: an image view, a text view, and a button. VIEWS Those subviews are what the app uses to present content to the user and respond to interactions. All of the views in the hierarchy are managed by a single view controller object. Figure 2-3 Building your interface using view objects View Controller Application controller layer View layer Window View Image View Text View Button In a typical view-‐based app, you coordinate the onscreen views using your view controller objects. An app always has one view controller that is responsible for presenting all of the content on the screen. That view controller has a content view, which itself may contain other views. Some view controllers can also act as Thursday, December 15, 11 containers for content provided by other view controllers. For example, a split view controller displays the
  • 34. СТРУКТУРИ • CGPoint • CGSize • CGRect = CGPoint, CGRect Thursday, December 15, 11