Objective-C is an object oriented language which lies on top of the C language. Itʼs primary use to develop desktop application on Mac OS X machines and also on iPhone OS. It was originally the main language for NeXTSTEP OS and when Apple did tie up with NeXTSTEP then Apple introduced Mac OS X operating system for Apple machines and Objective-C became a primary development language.
Objective C is extenstion to ANSI C
So, we can say that
Objective C = ANSI C + OOPS
Most Object-Oriented development environments consist of several parts:
Object Oriented Programming language
Object library
Suite of development tools
Run time environment
if you have never worked with any object oriented programming language and this is your first OOPS language then i prefer you should first read "Object Oriented Programming Language with Objective-C"
As i mentioned earlier, Objective-C is primary language for iPhone development, however, here we are not focusing on iPhone development but concentrate on learning Objective-C first. I will definitely cover iPhone development lessons under different heading.
To learn Objective-C, you should have Mac machine with GCC compiler and development kit (XCode, Instruments, Interface Builder etc.) if it is not on your machine then you can download it from Apple's developer Website. It is totally free.
But if you are a big fan of Windows and planning to move to Mac application development then you need a compilers like Cygwin or MinGV and then install GNUStep from GNUStep website.
There are three components which are required on windows platform. there are listed below.
- GNUStep MSYS System - MSYS/MinGW System - Contains all packages required to run GNUStep
- GNUStep Core - GNUStep Code - GNUStep core libraries
- GNUStep Devel - Developer Tool - it is a developer's kit, used to develop and compile programms
Chapter 1
Runtime System
Language requires not only a compiler but also runtime system to execute the compile code. The runtime system acts as kind of Operating system for the Objective-C language.
To learn more about functionalities offered by runtime, see "Objective-C Runtime Programming Guide"
Objects, Classes and Messaging
Objects
An object associates data with particular operations that can use or affect that data.
Data is instance Variable and operations are Methods
In many environment, people are considering them as Member variable and Member methods. it means Objects consists of Variables and Methods.
ID data type
In Objective-C, Object indentifiers are of a distinct data type: id. This type is the general type for any kind of object regardless of class.
id anObjects;
The Keyword nil is defined as a null object, an id with a value of 0. id, nil and other basic types of Objective-C are defined in a header file objc/objc.h.
No comments:
Post a Comment