{"id":19,"date":"2010-11-30T23:08:36","date_gmt":"2010-12-01T05:08:36","guid":{"rendered":"http:\/\/todesco-technologies.com\/unboxed\/?p=12"},"modified":"2010-11-30T23:08:36","modified_gmt":"2010-12-01T05:08:36","slug":"thinking-outside-of-the-net-box","status":"publish","type":"post","link":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/2010\/11\/30\/thinking-outside-of-the-net-box\/","title":{"rendered":"Thinking outside of the .NET box"},"content":{"rendered":"<p>In the recent months I was working mainly on iPhone projects in my  spare time abd recently I was lucky enough to cut some iOS code for work  too! Definetly time to blog about my encounter with Objective-C, XCode  the Cocoa and all the other wonderful things that come out of Infinite  Loop 1 in Cupertino&#8230;<\/p>\n<p>My first encounters with the iOS environment about 2 years ago left  me with a feeling of &#8221; wow this is old style!&#8221;. Header files, pointers,  no automatic memory management&#8230; It took several attempts to actually  get into it. I quite like reading a book about a programming topic.  That&#8217;s the reason I picked up a book by Aaron Hillegas about Cocoa and  OS X programming. It is definitely a good idea getting a basic  understaning of Objective C and Cocoa before delving into iOS.<\/p>\n<p>Some of the differeces are striking and you are definitely forced  to think outside of the box as a .NET \/ C#\/ Java programmer (&#8230;that&#8217;s  how I would describe myself&#8230;). Weak typing is a shock at first. It  took me right back to my roots as Perl\/Javascript coder. After a while  you start enjoying the freedom. It is actually quite a good balance  between warnings on the compiler side and freedom in the runtime.<\/p>\n<p>Cocoa tends to use helper classes and delegates\u00a0 instead of  inheritance to build frameworks. This is described as the KITT versus  Robocop approach by Aaron Hillegas&#8217; book. You have to read it yourself  to appreciate the analogy (did I mention it is a good read?). That is  something I have defintitely taken over in my day to day .NET  programming. If detaches your design from the class hierarchy.<\/p>\n<p>Some other concepts like Categories and Key Value Coding can be  found in .NET in a much more refined version. It is however refreshing  to see how simple you can achieve similar goals.<\/p>\n<p>Memory management is definitely the hardest part of the iOS journey  for me. Having to allocate and free memory has not crossed my mind for a  long time. Cocoas approach (using a retain\/release) model makes it  however bearable.<\/p>\n<p>You are rewarded with a remarkebly productive environment. The  power you gain from beeing &#8220;close to the machine&#8221; has surprised me. I  have long defended the claim that todays Java and C# jit compilers build  executables that are as performant as native compilers. Although I have  not measured my obersvations I beileive on small devices the difference  still matters.<\/p>\n<p>If you want (or have to) develop for iOS you have choices these  days. However in my experience it is hard to beat the results you get  from using XCode, Objective-C and Cocoa. Give it a try.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the recent months I was working mainly on iPhone projects in my spare time abd recently I was lucky enough to cut some iOS code for work too! Definetly time to blog about my encounter with Objective-C, XCode the Cocoa and all the other wonderful things that come out of Infinite Loop 1 in &hellip; <a href=\"https:\/\/todescotechnologies.com\/unboxed\/index.php\/2010\/11\/30\/thinking-outside-of-the-net-box\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Thinking outside of the .NET box<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":0,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/todescotechnologies.com\/unboxed\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}