Imparare a programmare per iPhone

mercoledì, 25 febbraio 2009 08.05 by Marco Bellinaso

Su questo blog ho già parlato varie volte dell'iPhone. Ho avuto prima la versione 2G e poi la 3G...e nonostante attualmente usi regolarmente un BlackBerry Bold continuo a pensare che l'iPhone sia un dispositivo assolutamente innovativo e con alcune qualità (e soprattutto con delle potenzialità) ancora molto superiori alla concorrenza. Alcuni aspetti in particolare poi dovrebbero interessare molto gli sviluppatori. Per questi motivi (e per soddisfare un po' la mia curiosità e passione per la tecnologia) ho ordinato il libro Beginning iPhone Development (APress) appena fu annunciato e prima che fosse effettivamente disponibile (causa il fatto che fino a pochi mesi fa l'SDK era ancora sotto NDA e non se ne poteva scrivere pubblicamente...). Solo recentemente però ho iniziato un progetto e mi sono messo a studiarlo realmente.

Sviluppare per iPhone significa dover usare Mac OSX, imparare l'IDE di sviluppo XCode (fornito gratis con il sistema operativo o scaricabile gratuitamente assieme all'iPhone SDK), imparare il linguaggio Objective-C e il framework Cocoa Touch (che è parte di Cocoa + estensioni specifiche per iPhone, allo stesso modo di quello che fa il .NET Compact Framework e l'SDK di Windows Mobile rispetto al .NET Framework full). Oltre a questo bisogna abituarsi a programmare secondo il modello Model-View-Controller (che molti conosceranno anche in ambiente .NET o Java...ma sicuramente non tutti) e a tutta una serie di piccole e grandi differenze rispetto al modo di lavorare con altri ambienti e linguaggi. Di sicuro ci vuole un po' di tempo per prenderci la mano ed essere produttivi, e non è che essendo esperti con qualche altra tecnologia il lavoro con l'iPhone sia subito un gioco da ragazzi.

Proprio per questo motivo è utile avere una guida come quella in questione, che che insegni come muoversi partendo dai concetti base e mostrando passo per passo come: disegnare una vista, associarci un controller, collegare gli elementi della UI alle proprietà del controller, gestire gli eventi (tramite delegate)...e poi via via fare cose più complesse come riempire una lista associata ad una sorgente dati, personalizzare l'aspetto delle tabelle, costruire dei percorsi di navigazione tra viste distinte, gestire l'accesso al file system, realizzare qualche piccola animazione ed effetto grafico, gestire touch e gesture, localizzare un'applicazione, gestire la fotocamera e fare 2 cose sul multimedia.

Il libro è strutturato proprio come un corso, e quindi va letto in ordine. Alla fine si avrà una buona idea di come si lavora su questa piattaforma e il tanto codice di esempio fornito potrà anche servire come base di partenza (e miniera per copia-incollare piccole parti) per i primi progettini. Alla fine non si potrà dire di essere esperti, ma non si sarà più neppure degli sprovveduti. Il libro ad esempio spende ben 120 pagine per parlare di liste e navigazione tra viste, dato che sono concetti fondamentali e importanti per praticamente tutti gli applicativi (ad eccezione probabilmente di videogame e applicazione esclusivamente "grafiche", che sono programmate in modo diverso), ma non parla di accesso a web service o risorse via HTTP, programmazione multi-threading (importante ad esempio per recuperare o elaborare dei dati mentre l'utente usa qualche altra funzione dell'applicazione), utilizzo avanzato di alcuni controlli, interazione con altre applicazioni (il browser o il programma Mail ad esempio), accesso ai contatti del telefono, debugging, deployment dell'applicazione su un iPhone reale di test, o del processo (pieno di insidie) di firma e pubblicazione dell'applicazione in AppStore. Altri argomenti come l'accesso ai database Sqlite, la gestione delle gesture, dell'accelerometro e del GPS sono appena accennati in poche pagine, in modo insufficiente per un utilizzo immediato proficuo.

Le mancanze elencate sopra non si possono però considerare dei veri difetti del libro; sono mancanze "by-design", volute, dato che il titolo inzia con "Beginning..." e non con "Professional...". Quello che però ci sarebbe stato proprio bene in un libro del genere è un capitolo sul linguaggio (sintassi, costrutti, programmazione ad oggetti, categorie, reflection, gestione delle memoria) e le classi base tipo NSString, NSDate, NSArray, NSDictionary ecc. Non vorrei ovviamente una trattazione dettagliata di questi argomenti, (ci vorrebbe ovviamente un libro dedicato solo a quello) ma solo "un riassunto", un "quick-start" per chi viene magari da altri linguaggi e si trova un po' spiazzato dalla sintassi e da alcuni concetti di Objective-C. Ad ogni modo, se si è già letta la documentazione ufficiale di Apple sul linguaggio, anche questo non costituirà un problema.

L'importante è che una volta imparati i concetti di base sarà molto più semplice cercare (e capire) specifiche informazioni online, nella documentazione ufficiale...o in un secondo libro più avanzato. Non si tratta quini della classica bibbia omnicomprensiva, ma è uno strumento efficace e quasi indispensabile per partire con il piede giusto. In conclusione, è una perfetta prima guida, altamente consigliata.

Correntemente valutato 5.0 da 3 utenti

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Segnala:  
Categorie:   Mac OS X | Sviluppo software
Azioni:   E-mail | Permalink | Commenti (55) | RSS CommentiRSS comment feed

Post correlati

Commenti

febbraio 25. 2009 15.32

Pierluca

...sempre più incuriosito (avrei voluto scrivere che i tuoi post sono sempre estremamente stimolanti, ma suona tanto male Laughing).

Pierluca

dicembre 6. 2009 03.46

payday loans online

You made some good points there. I searched this topic and found out that most people will agree with your blog.

payday loans online

dicembre 28. 2009 09.31

payday loans

Hmmm interesting stuff

payday loans

dicembre 30. 2009 02.17

North Carolina Payday Loans

I just hope to have understood this the way it was meant

North Carolina Payday Loans

gennaio 3. 2010 15.27

personal loans

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

personal loans

gennaio 18. 2010 06.56

scrapping storage

A father is in church with three of his young children, including his five year old daughter.

As was customary, he sat in the very front row so that the children could properly witness the service.

During this particular service, the minister was performing the baptism of a tiny infant. The little five year old girl was taken by this, observing that he was saying something and pouring water over the infant's head.

With a quizzical look on her face, the little girl turned to her father and asked: "Daddy, why is he brainwashing that baby??"


Regards
Velop

scrapping storage

gennaio 18. 2010 12.20

messenger online chat

I really appreciate posts, which might be of very useful for beginners in blogging as I am. I already have a small collection of blog posts and other articles, from which I step by step learn various aspects of life. Thank you for your resource.

messenger online chat

febbraio 4. 2010 20.54

devAPP

Se può interessare vi segnalo un sito di programmazione per iPhone, iPod e iPad, con al suo interno tutorial, video-tutorial, lezioni, recensioni e molto altro ancora Smile

http://www.devapp.it

devAPP

febbraio 13. 2010 11.08

teeth whitening reviews

my God, i thought you were going to chip in with some decisive insght at the end there, not leave it with "we leave it to you to decide".

teeth whitening reviews

febbraio 15. 2010 07.09

plastic surgeon san francisco

Although I do concur with your spot, I someone my own reservations.



Regards
Martin

plastic surgeon san francisco

febbraio 16. 2010 14.58

Colon cleansers

Hello. Great job. I did not expect this on a Wednesday. This is a good story. Thanks!

Colon cleansers

febbraio 18. 2010 14.44

cinsellik

Thanks for good information.

cinsellik

febbraio 18. 2010 22.27

ssk sorgulama

i love to read articles that are informative and beneficial in nature.

ssk sorgulama

febbraio 21. 2010 01.15

ehliyet

I really enjoyed read your article, very interesting ...

ehliyet

febbraio 22. 2010 11.59

Acne treatment

Of course, what a great site and advisory posts, Can I add backlink - import your rss feed? Regards, Reader.

Acne treatment

febbraio 22. 2010 15.00

bağkur

nice template and great article.thanks this is great information.

bağkur

febbraio 23. 2010 23.05

zerrin egeliler

Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post. Keep up your work.

zerrin egeliler

febbraio 27. 2010 08.33

online appointment scheduling

A nice blog.i think that this session will take a good, hard look at everything cool

online appointment scheduling

febbraio 27. 2010 19.43

personal loans

Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

personal loans

marzo 2. 2010 23.52

ssk sorgulama

i love to read articles that are informative and beneficial in nature.

ssk sorgulama

marzo 4. 2010 07.35

best weight loss pills

commission must impose fines or other sanctions against those who may have violated rules.

best weight loss pills

marzo 6. 2010 02.03

gazeteler

Fine information, many thanks to the author. It is puzzling to me now, but in general, the usefulness and significance is overwhelming. Very much thanks again and good luck!

gazeteler

marzo 6. 2010 16.23

instant loans

Wow and wow! Thank you! I always wished to write in my site something like that. Big thanks for the useful info i found on Imparare a programmare per iPhone.

instant loans

marzo 10. 2010 01.39

loan

Don't you understand that it is the best time to receive the <a href="lowest-rate-loans.com">loans</a>, which can help you.

loan

marzo 10. 2010 11.23

cash loans

Of course, what a great site and informative posts, I will add backlink - bookmark this site? Big thanks for the useful info i found on Imparare a programmare per iPhone.

cash loans

marzo 10. 2010 12.21

California Homes for Sale

Never seen such precooled berth. I indicate it all the way to the end. Stay them forthcoming.


Regards
Rohrbach

California Homes for Sale

marzo 15. 2010 13.14

Stretch mark removal

I don’t usually reply to posts but I will in this case. WoW Smile

Stretch mark removal

marzo 19. 2010 10.33

rolex replica

thank you very much for sharing this article!

rolex replica

marzo 22. 2010 15.08

ssk sorgulama

This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

ssk sorgulama

marzo 22. 2010 22.20

best cellulite treatment

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful. Big thanks for the useful info i found on Imparare a programmare per iPhone.

best cellulite treatment

marzo 23. 2010 16.22

ehliyet

Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.

ehliyet

marzo 24. 2010 14.55

rolex replica

thank you

rolex replica

marzo 24. 2010 16.42

used car auto loans

Hey I love your style I will subscribe for your feed please keep posting!

used car auto loans

marzo 25. 2010 14.06

Gout Natural Treatment

Properly, the write-up is in reality the greatest on this worthy subject matter. I fit in with your conclusions and will thirstily appear forward to view your coming updates. Saying thankx won't just be adequate, to the increadible clarity inside your producing. I'll directly grab your feeds to stay abreast of any updates. Pleasant work and significantly success in your business dealings! Regards, Joshua!

Gout Natural Treatment

marzo 25. 2010 14.59

bağkur

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post

bağkur

marzo 27. 2010 10.15

dental insurance quotes

Your blog has a truly cool design. That getting said the info the following is free of charge and is of high-quality. I'm subscribing for your feed correct now.

dental insurance quotes

marzo 29. 2010 02.44

funny jokes

<a href="http://www.funnyjokesz.com/">funny jokes</a>

funny jokes

marzo 29. 2010 21.38

arac sorgulama

I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!

arac sorgulama

marzo 29. 2010 22.41

toe fungus treatment

I love what you guys are always up too. Such clever work and reporting! Keep up the great works guys I've added you guys to my blogroll. Big thanks for the useful info i found on Imparare a programmare per iPhone.

toe fungus treatment

marzo 30. 2010 03.23

Emerald Cut Engagement Rings

Just would like to say your write-up is impressive. The lucidity inside your post is quickly spectacular and i can assume you're an expert on this field. Well together with your permission allow me to grab your rss feed to preserve up to date with succeeding publish. Thanks a million and please maintain up the fabulous perform.

Emerald Cut Engagement Rings

marzo 30. 2010 05.58

hp toner cartridges

Seasons greetings to every one of you and ideal wishes for that coming year 2010. Excellent way to explain it. Cannot say more than to appreciate what you are penned down. are you able to show how you can grab your rss feed? I couldn't find how.

hp toner cartridges

marzo 30. 2010 14.02

rims for cheap

Your webpage has a genuinely cool style. That becoming mentioned the data here is free and is of high-quality. I'm subscribing to your feed correct now.

rims for cheap

marzo 31. 2010 01.35

Cushion Cut Engagement Rings

Only want to say your article is striking. The lucidity with your post is merely spectacular and i can assume you are an expert on this field. Properly with your permission allow me to grab your rss feed to keep as much as date with incoming post. Many thanks a million and please retain up the respectable do the job.

Cushion Cut Engagement Rings

aprile 2. 2010 16.03

amateur nude females

Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.

amateur nude females

aprile 3. 2010 11.40

genital wart treatment

Found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later .. Big thanks for the useful info i found on Imparare a programmare per iPhone.

genital wart treatment

aprile 6. 2010 15.38

Acai Optimum

Resources like the one you mentioned here will be very useful

Acai Optimum

aprile 7. 2010 17.55

Computer Repair Manchester

Such clever work and reporting Thanks for posting

Computer Repair Manchester

aprile 7. 2010 19.49

credit card debt reduction

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

credit card debt reduction

aprile 8. 2010 16.15

gerdek gecesi

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post

gerdek gecesi

aprile 10. 2010 03.21

six pack abs workout

Hello, I learned your site whilst browsing searching for some thing entertaining to examine. Suffice to say, I've identified it! I'll definitely return to understand a lot more. Thanks again for taking the effort to compose all this

six pack abs workout

aprile 10. 2010 17.12

digest it review

Creativity is to think more efficiently.

digest it review

aprile 11. 2010 05.27

how to get abs fast

Exceptional study, I just passed this onto a colleague who was carrying out a small exploration on that. And he basically bought me lunch mainly because I found it for him smile So let me rephrase that: Thanks for lunch!

how to get abs fast

aprile 11. 2010 05.27

how to get six pack abs

I know some people with problems opening the web page making use of Opera. I reopened it making use of Firefox and it seems to be ok.I believe I see those exact same errors in Opera as nicely.Hope that helps.

how to get six pack abs

aprile 12. 2010 04.05

affordable dental insurance

I am not significantly of a guy who thinks in so deeply about online pattern but I consider your publish had some valid points in it. Like designers are forced to style stuff within the limited code available and not go beyond it, their innovation is somewhat limited but still I believe Internet Pattern won't die! I agree that Amazon and other some big sites won't have a weblog but now a days it's incredibly important to have some sort of option available so people can quickly communicate their thoughts. I feel Amazon if wants to shift it to that, they can get a customized CMS for themselves.

affordable dental insurance

aprile 12. 2010 09.34

37 days to clean credit review

Beneficial day everybody, This webpage is exceptional and so is how the topic was developped. I like some of the comments too even if I would suggest we all preserve it on topic to add value towards concept. It is going to be also encouraging towards 1 who penned it down if we all could pass it around (for some of you who have social accounts such like a digg, facebook,..). Again, Thanks..

37 days to clean credit review

Commenti chiusi