OS X Development Tom Schroeder. Table of Contents Who cares? HistoryObjective-CCocoaEnvironmentDesign.

Slides:



Advertisements
Similar presentations
Lecture 2 - Introduction Objective C is used primarily for application development on Apple's Mac OS X and iPhone. On the Apple it is used together with.
Advertisements

Compiler Design PROJECT PRESENTATION : COMPILER FOR OBJECTIVE C Harshal Waghmare Jeet Kumar Nandan Kumar Vishal Agrawal.
18-1 Verifying Object Behavior and Collaboration Role playing – the act of simulating object behavior and collaboration by acting out an object’s behaviors.
Anatomy of an iPhone Application Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
IPhone Development Crash Course By Dylan Harris
IPhone Development JaxCodeCamp Who am I David Fekke.NET Developer, ColdFusion Work at LPS Presenter JaxDug, JaxJug, JSUG & JaxFusion Mac User 1986.
IPhone 101. Outline Objective-C Random bits of the API Using the simulator Debugging with Xcode.
Exploring the iPhone SDK Toyin Adedokun & Daniel Laughlin.
Object-Oriented Databases
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
BY MUKTADIUR RAHMAN DATE: JUNE 10, 2010 Introduction to iPhone SDK.
ASP.NET Programming with C# and SQL Server First Edition
Friday, August 29, 2014 CSCI 351 – Mobile Applications Development.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
C++ fundamentals.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Objective-C Quinton Palet. Introduction  Objective-C was developed to bring large scale software development the power of the object-oriented approach.
An Overview of Qt - asankar1. Agenda About Qt –A brief intro of Qt Qt development tools –Tools used for building Qt application Qt Architecture –The underlying.
CIT241 Prerequisite Knowledge ◦ Variables ◦ Operators ◦ C++ Syntax ◦ Program Structure ◦ Classes  Basic Structure of a class  Concept of Data Hiding.
Mac OS COMP 240. Mac OS OS X previously Mac OS X, is a series of Unix- based graphical interface operating systems developed, marketed, and sold by Apple.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Comparison of OO Programming Languages © Jason Voegele, 2003.
IOS WorkShoP Xcode 4 iOS 5 : “A Primer”. Objective-C iOS applications are written in Objective-C language using the Cocoa Touch library Objective-C is.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
CIS 375—Web App Dev II ASP.NET 2 Introducing Web Forms.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Microsoft Visual Basic 2005: Reloaded Second Edition
Object Oriented Programming
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
CHAPTER FOUR COMPUTER SOFTWARE.
Introduction to Interactive Media Interactive Media Tools: Software.
JavaScript, Fourth Edition
Objective C Basics. It’s C with Some Extras!  Cross Platform language  Mac  Linux/UNIX  Windows  Layer above C (Superset)  Adds Object-Oriented.
Programming Language C++ Xulong Peng CSC415 Programming Languages.
Objective-C First Part adapted from a presentation by Kevin Layer.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Objective-C OOP Spring OOP Conceptually the same as C++, Java, and all other object oriented languages The syntax, however… …is, well, different.
Folio3 IPhone Training Session 1 Presenter: Imam Raza.
+ An Intro To Xcode By Sarah Montroy. + What is Xcode?
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
View Controllers Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Monday, August 31, 2015 CSCI 351 – Mobile Applications Development.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Last Lecture objective C memory management rules Wrote our first iPhone app a quiz app xib and nib files and interface editor MVC pattern IBOutlet IBAction.
Course Summary Xcode & iPhone Simulator
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
Objective-C Drew Cheng CS420. Overview True superset of ANSI C Object-Oriented methods from SmallTalk There is no formal written standard for the language.
OOP with Objective-C Categories, Protocols and Declared Properties.
April 2, 2002 Craig E. Ward, 1 Java on Mac OS X Insanely Great or Just Insane? A presentation to the Los Angeles Java Users Group.
Mobile Apps Programming Chin-Sung Lin Eleanor Roosevelt High School.
Introduction to Objective-C Spring Goals An introduction to Objective-C As implemented by the Apple LLVM Compiler 4.0 (a.k.a. Clang) Only the basics…
The iOS Platform and SDK. iOS iPhoneiPad Mini iPad.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
IOS Programming Medialogy, Semester 7, 2010 Aalborg University, Aalborg David Meredith
MiniDraw Introducing a Framework... and a few patterns.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Best 5 Mobile App Development Tools for Developer's to think beyond the Limitation.
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Introduction to Apple mobile technologies- I393
Introduction to Advanced Java Programming
MPCS – Advanced java Programming
Common Design Patterns
Introduction to Design Patterns
CSCI 351 – Mobile Applications Development
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
Presentation transcript:

OS X Development Tom Schroeder

Table of Contents Who cares? HistoryObjective-CCocoaEnvironmentDesign

Objective-C TIOBE: Language of the Year Currently ranked #3 Mac and OS X market share continues to rise Flourishing App Store OS X and iOS apps numerous

History 1985: Steve Jobs leaves Apple Jobs founds NeXT Mission: Create powerful computers for universities NeXTSTEP Object-Oriented, Multitasking Operating System Interesting Note Tim Berners-Lee designed and built first web browser on NeXTSTEP 1996: NeXT purchased by Apple NeXTSTEP becomes Mac OS X 2001: Cheetah (10.0) 2012: Mountain Lion (10.8)

Objective-C Object-oriented language ANSI C language (strict superset) Smalltalk-inspired extension Developed in early 80s Stepstone (Brad Cox and Tom Love) Goal: facilitate reusability and backwards compatible to C Features & Constructs Messages Interfaces and Implementation Properties Object Life Cycle ARC Protocols Categories Dynamic Typing

Messages Message is sent Target and interpretation of message calculated runtime Inspired by Smalltalk Bracket Syntax

Interface and Implementation Declaration and Definition Interface Instance variables Properties Method declarations Inheritance Protocol adoption Implementation Definition of methods, properties, protocol conformity

Properties Simple way to declare accessor methods Encapsulation Methods are generated by compiler Allow use of “dot syntax” Declaration contains attributes Writability (readonly, readwrite) Setter semantics (strong, weak, copy, assign, retain) Setter semantics (strong, weak, copy, assign, retain)Atomicity

Object Life Cycle 1210 allocretainrelease Retain-Release Process

Object Life Cycle - ARC ARC: Automatic Reference Counting Automatic memory management Compiler inserts retains and releases Restrictive but effective Bridge casting C-style cast void *

Protocols Declare methods to be implemented by a class Adoption and Conformity Similar to “interface” in Java Objects can be referred to by the adopted protocol id delegate;

Categories Open classes Add methods to existing classes (even those in an imported framework) Extensions Anonymous categories Commonly used to redeclare readonly property as readwrite

Dynamic Typing id type Pointer to Objective-C object Message Forwarding Handle message Drop message Pass it on

Blocks Anonymous Functions Similar to standard C functions Usage Encapsulate code groups to execute concurrently Dispatch Execute on items in a collection Fast enumeration Easily parameterized

Comparison to C++ Objective-C is true superset of C (simple - small addition) C++ is complex - adds features such as templates, operator overloading, etc. C++ is generally faster Objective-C’s runtime is more complex (dynamic typing & message passing) Objective-C is dynamically typed Objective-C has built-in

Cocoa Framework that provides applications the distinctive look and feel often associated with OS X Underlying Frameworks Foundation Kit Application Kit Core Data Other frameworks

Foundation Collection of base layer classes Applications can be created solely with Foundation Command line tools Functionalities General object behavior and life cycle NSObject – base class LocalizationPortabilityWrappersPrimitives Operating system level functionality Ports File I/O Threads

Foundation Classes Contains over 100 different classes NSObject - base class alloc, init, class conformsToProtocol:performSelector:onThread:withObject:waitUntilDone:NSStringNSMutableStringNSArrayNSMutableArrayNSThreadNSDateNSURL

AppKit Contains objects required in creating a graphical application WindowsButtons Scroll Boxes Text Fields Views NSView, NSTextView Controllers NSViewController, NSWindowController

Core Data Provides means to manage the data of an application Data model SerializationXMLBinarySQLitePersistence Managed Objects Command Pattern Undo/Redo

Other Frameworks Audio & Video Core Audio Core Video Core MIDI Graphics/Animation Core Animation Core Image OpenGLQuartzBridges Ruby PythonNetworking Bonjour Kerberos

Environment Great environment  Excellent development experience ToolsXcode General IDE Utilities Apple LLVM Engine Backend Interface Builder Graphical Interface Designer

Xcode General IDE Code Editor LLVM Engine Integration Interface Builder Integration Project Navigation Utilities Version Editor Instruments

Xcode

LLVM Engine Compiler - Clang C/Objective-C/C++ Syntax Highlighting Code Completion Live Issues Fix-it Static Analysis Improper memory allocation Unreachable code Improper loops llvm.org

Interface Builder Integrated into Xcode Design graphical interfaces for application Drag and Drop WYSIWYG IBActions & IBOutlets Connect visual design to code

Interface Builder

Design Objective-C and Cocoa utilize many design patterns and constructs Provides stability and familiarity Design Patterns Model-View-ControllerDelegationOthers…

Model-View-Controller Divides system into three components Model Domain-specific data and operations Platform-independentView Responsible for graphically displaying the model Controller Mediator for the model and view Handles interactions with the system

Model-View-Controller Smalltalk-80 MVC Paradigm ParcPlace Systems, Inc.

Model-View-Controller Controller ModelView Observer Mediator Command

Delegation One class delegates action to another (helper object) Inversion of control Delegate & Delegator Pass notifications No polling Utilizes protocols Delegate conforms to methods for which delegator is aware

Design Patterns Command pattern NSInvocationUndo/redo Observer pattern KVO: Key-Value Observer Adapter pattern Protocols Singleton Pattern NSFileManager NSApplicationMemento Archiving SerializationProxy NSProxy

Design Patterns Composite View Hierarchy DecoratorCategoriesFaçadeNSImage Bitmap (jpg, png) Vector (pdf) Iterator Fast enumeration Mediator Controller classes Abstract Factory Class Clusters NSString NSArray Chain of Responsibility NSResponder AppKit Responder Chain

Demo