SlideShare a Scribd company logo
1 of 11
Download to read offline
Objective-cRui Peres
Whatis?
Advantages?
Wrapitup..
Sexta-feira, 26 de Julho de 13
Objectivewhat?
Language appeared around the early 80’s @ NeXT
It’s nothing more than a thin layer on top of C
Object-OrientedLanguage with SmallTalk-Style messaging
Can be compiled with GCC, so you can try it on Windows!
Sexta-feira, 26 de Julho de 13
“Talkischeap.Showmethecode”
LinusTorvalds
Person *person = [[Person alloc] init];
[person setFirstName:@"Linus"];
[person setLastName:@"Torvalds"];
NSLog(@"Talk is indeed cheap - %@ %@", [person firstName],
[person lastName]);
Object allocation
Setter’s
A simple print, that takes the 2nd and 3rd parameter value and replaces the %@’s
It’s called a formatter specifier, if you wonder
Getter
Sexta-feira, 26 de Julho de 13
Andevenmorecode.....+ (NSURLRequest *)requestFromDictionary:(NSDictionary *)parametersDictionary
{
NSURL *webserviceURL = [SFBucketCallsManager
buildURLFromParameters:parametersDictionary];
SFAccountInfo *accountInfo = [parametersDictionary objectForKey:WS_ACCOUNT_INFO_KEY];
// Get the user's name and password
NSString *userName = accountInfo.accountName;
NSString *password = accountInfo.accountPassword;
// Transform the Username & Password to base64
NSString *authStr = [NSString stringWithFormat:@"%@:%@",userName, password];
NSData *authData = [authStr dataUsingEncoding:NSASCIIStringEncoding];
NSString *authValue = [NSString stringWithFormat:@"Basic %@", [authData
base64EncodedString]];
// Creation of the Request
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:webserviceURL];
[request setValue:authValue forHTTPHeaderField:AUTH];
[request setHTTPMethod:[parametersDictionary objectForKey:WS_METHOD]];
[request setTimeoutInterval:15.f];
[request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];
if ([parametersDictionary objectForKey:WS_REQUEST_BODY_KEY])
{
NSString *postString = [parametersDictionary objectForKey:WS_REQUEST_BODY_KEY];
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
}
return request;
}
Sexta-feira, 26 de Julho de 13
NS,NSeverywhere!
No concept of or . So to keep classes with the same name
without having conflicts, we put a before the name of the class.Prefix
packages namespaces
So.......
NSArray
NSString
NSLog
NSDictionaryNSInteger
NSSet
NSConnection
NSURL
NSObject
NSOperation
NSDate
NSData
+around220...
NSCoding
Sexta-feira, 26 de Julho de 13
Timetorun.NETdevs...
NoGarbageCollector
Yup,youneedtodoitmanually
(likerealmen)
Forgottomention,youalsoworkwithpointers(noneedtocryladies)
Sexta-feira, 26 de Julho de 13
Sohowdoyoudoit?
Told you it was easy...
Sexta-feira, 26 de Julho de 13
Bigdeal...Sowhatarethe
advantages?
Dynamicnature (it’s really fun!)
Memory managment is done @ compile time
EnforcestheMVCpattern
Language designed with large code bases in mind
YoucanmixCinyourcode!(now we are getting somewhere)
Icouldkeepgoing....
Sexta-feira, 26 de Julho de 13
Ok,andthebadpart?
Steeplearningcurve,mostlybecauseof
Sinceit’sbasicallyC,you tounderstandwhat’sgoingonbelow
Cangetverbose,ifyouarenotcareful...
shouldtry
Communitycouldbebetter
Xcode.:)
manualmemorymanagement
Sexta-feira, 26 de Julho de 13
Questions
&
Answers
I dare you, I double
dare you @%”!
Sexta-feira, 26 de Julho de 13
thanks!
Sexta-feira, 26 de Julho de 13

More Related Content

What's hot

What's hot (10)

FNR : Arbitrary length small domain block cipher proposal
FNR : Arbitrary length small domain block cipher proposalFNR : Arbitrary length small domain block cipher proposal
FNR : Arbitrary length small domain block cipher proposal
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
 
Network Security - Block cipher
Network Security - Block cipherNetwork Security - Block cipher
Network Security - Block cipher
 
Simple fuzzy name matching in elasticsearch paris meetup
Simple fuzzy name matching in elasticsearch   paris meetupSimple fuzzy name matching in elasticsearch   paris meetup
Simple fuzzy name matching in elasticsearch paris meetup
 
Structure
StructureStructure
Structure
 
Des
DesDes
Des
 
Information and network security 27 triple des
Information and network security 27 triple desInformation and network security 27 triple des
Information and network security 27 triple des
 
Simple fuzzy Name Matching in Elasticsearch - Graham Morehead
Simple fuzzy Name Matching in Elasticsearch - Graham MoreheadSimple fuzzy Name Matching in Elasticsearch - Graham Morehead
Simple fuzzy Name Matching in Elasticsearch - Graham Morehead
 
DSL简介
DSL简介DSL简介
DSL简介
 
Data encryption techniques and standard
Data encryption techniques and standardData encryption techniques and standard
Data encryption techniques and standard
 

Viewers also liked

Viewers also liked (8)

Apresentação Projecto IV
Apresentação Projecto IVApresentação Projecto IV
Apresentação Projecto IV
 
Wrap it up
Wrap it upWrap it up
Wrap it up
 
MBA case study presentation template
MBA case study presentation templateMBA case study presentation template
MBA case study presentation template
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
How to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media PlanHow to Build a Dynamic Social Media Plan
How to Build a Dynamic Social Media Plan
 
SEO: Getting Personal
SEO: Getting PersonalSEO: Getting Personal
SEO: Getting Personal
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Similar to Objective c

Questions On The Code And Core Module
Questions On The Code And Core ModuleQuestions On The Code And Core Module
Questions On The Code And Core Module
Katie Gulley
 
Objective c
Objective cObjective c
Objective c
Stijn
 
Topic2JavaBasics.ppt
Topic2JavaBasics.pptTopic2JavaBasics.ppt
Topic2JavaBasics.ppt
MENACE4
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
InSync2011
 
Modeling in R Programming Language for Beginers.ppt
Modeling in R Programming Language for Beginers.pptModeling in R Programming Language for Beginers.ppt
Modeling in R Programming Language for Beginers.ppt
anshikagoel52
 

Similar to Objective c (20)

Tales@tdc
Tales@tdcTales@tdc
Tales@tdc
 
Questions On The Code And Core Module
Questions On The Code And Core ModuleQuestions On The Code And Core Module
Questions On The Code And Core Module
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
Objective c
Objective cObjective c
Objective c
 
An Evening Of DSLs: Microsoft Oslo
An Evening Of DSLs: Microsoft OsloAn Evening Of DSLs: Microsoft Oslo
An Evening Of DSLs: Microsoft Oslo
 
PLV8 - The PostgreSQL web side
PLV8 - The PostgreSQL web sidePLV8 - The PostgreSQL web side
PLV8 - The PostgreSQL web side
 
Introduction to terrastore
Introduction to terrastoreIntroduction to terrastore
Introduction to terrastore
 
Topic2JavaBasics.ppt
Topic2JavaBasics.pptTopic2JavaBasics.ppt
Topic2JavaBasics.ppt
 
hallleuah_java.ppt
hallleuah_java.ppthallleuah_java.ppt
hallleuah_java.ppt
 
2.ppt
2.ppt2.ppt
2.ppt
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
 
Lecture1_R.pdf
Lecture1_R.pdfLecture1_R.pdf
Lecture1_R.pdf
 
Rstudio is an integrated development environment for R that allows users to i...
Rstudio is an integrated development environment for R that allows users to i...Rstudio is an integrated development environment for R that allows users to i...
Rstudio is an integrated development environment for R that allows users to i...
 
Basics of Metaprogramming in Ruby
Basics of Metaprogramming in RubyBasics of Metaprogramming in Ruby
Basics of Metaprogramming in Ruby
 
mm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Typemm-ADT: A Multi-Model Abstract Data Type
mm-ADT: A Multi-Model Abstract Data Type
 
Lecture1_R.ppt
Lecture1_R.pptLecture1_R.ppt
Lecture1_R.ppt
 
Lecture1_R.ppt
Lecture1_R.pptLecture1_R.ppt
Lecture1_R.ppt
 
Lecture1 r
Lecture1 rLecture1 r
Lecture1 r
 
Modeling in R Programming Language for Beginers.ppt
Modeling in R Programming Language for Beginers.pptModeling in R Programming Language for Beginers.ppt
Modeling in R Programming Language for Beginers.ppt
 
2. R-basics, Vectors, Arrays, Matrices, Factors
2. R-basics, Vectors, Arrays, Matrices, Factors2. R-basics, Vectors, Arrays, Matrices, Factors
2. R-basics, Vectors, Arrays, Matrices, Factors
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 

Objective c