Objective-C with respect to C# and Java

Post on 25-May-2015

1.904 views 3 download

Tags:

Transcript of Objective-C with respect to C# and Java

Objective‐C with respect to C# and JavaC# and Java

Presented byPresented by

Babul Mirdha

Babul MirdhaFounder at 

েসcা.Net (www.seccha.net)েসcা.Net (www.seccha.net)

Organizer atOrganizer at

iOS Developers MeetupHaving more than 5 years ofworking experiences with

Senior Software Engineer at

g piOS, Android, WindowsPhone, Web & Desktop(.Net) app development, Ihave worked with various

LeadSoft Bangladesh Limitedhave worked with variouslanguages, technologies &tools in differentenvironment.

Overview

• Objective‐CObjective C– A thin layer on top of C and a strict superset of C; 

b d l–Object‐Oriented Programming language–follows ANSI C style coding–that adds Smalltalk‐style messagingthat adds Smalltalk style messaging 

Dynamic LanguageDynamic Language

• There is no formal written standard– Relies mostly on libraries written by others

• Flexible almost everything is done at runtime• Flexible almost everything is done at runtime.– Dynamic Binding– Dynamic Typing– Dynamic Linking

• This allows for greater flexibility

• Minimizes RAM and CPU usage

C++/C#/Java VS Objective‐C T i l C iTerminology Comparison

Class DeclarationClass Declaration

.NET C# Objective‐C

cass AClass : Object{

@interface AClass : NSObject{

{int aValue;void doNothing();

int aValue;}‐ (void)doNothing();g()

String returnString();}

+ (NSString)returnString();

@end@

Method Declaration

• Two type of Method:– Class Method– Instance method

• A class method – indicated by a plus (+) character. – associated with the class type.

• An instance method – indicated by a minus (‐) character– indicated by a minus (‐) character. – associated with an instance object associated with the class.

How to pass parameters to method.How to pass parameters to method.

Valid MathodValid Mathod

Properties

Strings

Immutable vs Mutable StringImmutable vs Mutable String

Interfaces and Protocols

Comments

DemoDemo

Hello World!

Q & A

Thank You All