Kevin Hoffman: 'iPhone Development from the .NET Perspective'

Posted:
in iPhone edited January 2014
At WWDC, noted author and cross platform development expert Kevin Hoffman presented a comparison of Apple's iPhone development tools with those available for Microsoft's Windows Mobile.



.NET Addict



Hoffman has written a series of books on Microsoft's .NET development frameworks and maintains The .NET Addict's Blog. He is relatively new to developing in Cocoa, but his understanding of both platforms gives him the unique ability to compare the two side by side.



At last year's WWDC, Hoffman presented a comparison of .NET vs. Cocoa. The session was so popular that he was invited back this year to talk about the mobile versions of both: Microsoft's .NET Compact Framework and Apple's Cocoa Touch, used in the iPhone and iPod touch.



Hoffman's presentation shed some light on the productivity and market potential programmers can expect when targeting iPhone development, and subsequently the code quality and quantity users can expect from mobile developers.



.NET CF vs iPhone SDK



For Windows Mobile development, Microsoft provides Visual Studio 2008 .NET CE 3.5 for development frameworks and SQLServer 2005 for database storage. Apple provides the UIKit for building graphical applications and includes SQLite on the iPhone.



Database Storage



According to an attendee's notes on the presentation, Hoffman noted that Microsoft's SQLServer "requires less hands on coding than SQLite," and that there's "more going on behind the scenes." On the iPhone, SQLite uses SQL query syntax and leaves "object relational mapping up to you. There's no CoreData" on the iPhone as there is in the Mac desktop environment.



Development Frameworks



On the other hand, Hoffman pointed out that while Cocoa Touch presents a consistent view-based controls hierarchy, the Compact Framework "steers you down the wrong path," according to the attendee's notes. Its "double click and code" design results in spaghetti that's hard to reuse, because form and form code are merged together.



Last year, Hoffman described the same principle with regard to their desktop equivalents: Microsoft's Visual Studio does not encourage MVC (Model-view-controller). It's too easy to stick code in views, for example, making development ?spaghetti-friendly.? In contrast, Apple's Xcode ?bakes in? MVC principles. There is no real choice in doing things in sloppy ways, and ?that's a good thing.?



Graphics & Animation



Compact Framework includes DirectX Mobile, a 2D programmable graphics engine that is not easily available to controls. The iPhone uses Quartz 2D, which is available to controls.



CF's Direct3D is extremely low level and not hardware accelerated. Developers must write their own game loop. There is "no compromise between static forms and DirectX."



In contrast, the iPhone uses OpenGL ES. As with Core Animation, everything is a view on OpenGL, and graphics are hardware accelerated on the iPhone.



Different goals for WinCE and the iPhone



The differences between the two reflect different design goals at Apple and Microsoft, Hoffman pointed out. Compact Framework supports tall, wide, and small displays. Windows Mobile devices typically use a stylus and hard buttons versus the iPhone's touch screen. CF controls don't even have a double-click handler, while the iPhone doesn't have or need menus.



Layers of abstraction

\t

Talking about hardware abstraction, Hoffman is reported to have said, "people assume that low level is bad," but described that you "can be close to the metal and write little code."



The iPhone presents a choice of layers to develop at, based on developers' needs, while with Microsoft's Compact Framework, there's "often no choice in layer available."



"If lower layers are bad, adding more layers on top won't help," Hoffman said, according to the attendee's notes. "Compact Framework is built on Windows Mobile, and shares too much in common with Win32." He described the design as a "palace on a trash heap."



Application deployment



Even once a project is finished, Hoffman is said to have pointed out that another big difference between the iPhone and Windows Mobile relates to how developers get their apps in the hands of users.



With Windows Mobile, you build an MSI (Microsoft Installer file) and distribute it to the customer yourself. They register the MSI with desktop ActiveSync, plug in the device and sync over the app. In most cases, they also need to perform an SQL 2005 install, along with an Compact Framework 3.5 install, as that software may not be up to date on the device. Afterward, there are additional steps on device itself required to install it.



The scaled-down computer environment of Windows Mobile devices means users can easily delete components of your apps, breaking them, and requiring extra support to figure out how to reinstall the missing components.



On the iPhone, developers simply build their app and send it to Apple. The iPhone has one source for deployment and shopping, so users are far more likely to find your app. Apple handles the financials, presents users with automatic access to the App Store, provides piracy protection using FairPlay DRM, and manages your marketing.



"Best mobile development platform ever"



Hoffman reportedly summed things up by contrasting Windows Mobile using a "crushed down version of Win32" with an "inconstant user experience," while the "iPhone is the single best mobile development platform ever." According to the attendee's notes, he also said that "writing Mac applications has made my Windows apps better."

Comments

  • Reply 1 of 20
    nvidia2008nvidia2008 Posts: 9,262member
    W00t First Post!



    Okay... Nice article, however, I am curious as to whether Kevin talks about the current restrictions/ challenges in getting into the App Store... As bad as Windows Mobile is, it seems that anyone can write apps for it???



    Of course, insert <jailbroken apps etc> notes here...
  • Reply 2 of 20
    crees!crees! Posts: 501member
    Quote:
    Originally Posted by nvidia2008 View Post


    I am curious as to whether Kevin talks about the current restrictions/ challenges in getting into the App Store...



    Restrictions/challenges? You mean ponying up $99 to be able to distribute your app?
  • Reply 3 of 20
    mjtomlinmjtomlin Posts: 2,422member
    Quote:
    Originally Posted by crees! View Post


    Restrictions/challenges? You mean ponying up $99 to be able to distribute your app?



    Not a lot of money considering it's not $99 per app. It's $99 to join the developer program. Which not only includes the development software, but also, distribution, marketing, transaction fees, hosting/server/bandwidth fees, etc... If you plan on charging for your product then you'll incur a 30% charge from Apple. Otherwise, you only pay a $99 fee for everything.



    How much does Microsoft charge developers for the software just to develop for Windows Mobile? (Visual Studio Pro 2008 is over $600 at Amazon.)
  • Reply 4 of 20
    probablyprobably Posts: 139member
    I was just looking that up. The Windows Mobile components are free once you've got a Studio license as far as I can tell.



    How are apps installed on your smartphone from a desktop?
  • Reply 5 of 20
    ktappektappe Posts: 808member
    Quote:
    Originally Posted by crees! View Post


    Restrictions/challenges? You mean ponying up $99 to be able to distribute your app?



    No, like sitting on the waiting list even though you've been an ADC member for 10 years while some noob gets accepted so they can upload "aaaaaaa+TipCalculator."
  • Reply 6 of 20
    did anyone at AI contact Hoffman to verify the comments attributed to him?



    If I'd spoken at a public forum, i'd expect that courtesy, if someone's going to report on what i said based on "an attendee's notes".



    Journalistically, none of the direct quotes should be attributed to Hoffman. they should be attributed to the attendee. (According to the attendee, Hoffman said, "xxxxxx", OR "xxxxx," Hoffman said, according to the attendee's notes.



    And why isn't the attendee identified?



    Anyway, on insignificant stories reporting on what a layman says about something, none of this would matter much. But on this subject, and from an expert such as Hoffman, it does. IMHO.
  • Reply 7 of 20
    kickahakickaha Posts: 8,760member
    Quote:
    Originally Posted by rtdunham View Post


    did anyone at AI contact Hoffman to verify the comments attributed to him?



    If I'd spoken at a public forum, i'd expect that courtesy, if someone's going to report on what i said based on "an attendee's notes".



    Journalistically, none of the direct quotes should be attributed to Hoffman. they should be attributed to the attendee. (According to the attendee, Hoffman said, "xxxxxx", OR "xxxxx," Hoffman said, according to the attendee's notes.



    Absolutely. This is second-hand information, and should be noted as such. Quotes are for, well, direct quotes from a specific source. This is putting words in Hoffman's mouth, unless he said *exactly* those words, and even then, it needs to be verified before publication.



    Quote:

    And why isn't the attendee identified?



    Because they are breaking their NDA by passing along this information. Everything at WWDC except for the Keynote is under NDA.
  • Reply 8 of 20
    Quote:
    Originally Posted by rtdunham View Post




    And why isn't the attendee identified?




    I took it that the attendee was PM AKA DED?



    Was that a silly assumption?



    FL
  • Reply 9 of 20
    akacakac Posts: 512member
    Quote:
    Originally Posted by probably View Post


    I was just looking that up. The Windows Mobile components are free once you've got a Studio license as far as I can tell.



    How are apps installed on your smartphone from a desktop?



    Via ActiveSync. The file is a CAB file and usually devs write an exe installer on the desktop that calls ActiveSync to install the files. Then there are steps on the device as well.



    Now to change the subject - I like Kevin Hoffman and he's a good guy. But I don't see how .NET vs Cocoa has anything to do with commercial development. He's popular because he wrote some books about it and .NET is very heavily used in companies for custom apps so for Enterprise use, yes. But commercial development? Out of the 25,000 Windows Mobile apps maybe a handful were written with .NET CF. Everyone else used C/C++ with their own frameworks or MFC.



    Our company is the #6 company in overall sales for Windows Mobile. We've been working on iPhone apps for a bit and have two on the store today with our major ones still in development. The fact is that yes, while on Windows Mobile you pay for the Dev Studio (about $1000-$2500 depending), and then you can distribute for free as you wish - the development environment of the iPhone is far and away better than on Windows Mobile. Secondly the App Store Business Model of the iPhone is to me, much better than having a dozen different stores with a dozen different contracts with diluted sales. Next, background apps are useful when done correctly. But most developers never did. This is why WinMobile is so famous for being crashy. Even the OEMs that made the WinMobile devices were bad at this. There is a 32 process limit on WinMobile and from a fresh Microsoft image you have about 12 or so used up immediately. An OEM will add about another 10-15 processes for customization features. Many also have poor drivers that cause other issues. Its a huge pain to deal with those. I'm personally writing up a few chapters on my experience with BlackBerry, iPhone, and Windows Mobile development that I'm simply waiting for the NDA to be lifted for.
  • Reply 10 of 20
    As you all know, I am bound by the same NDA to which all WWDC attendees are bound. As such, I cannot (without breaking the NDA and, more importantly, my word) divulge the contents of my WWDC presentation. Additionally, being a part of the iPhone developer program is yet another NDA that prevents further discussion of the innards of the iPhone SDK in public forums.



    That said, I can tell you that no one contacted me to verify the accuracy of those comments before posting them. In fact, I only found out that they were posted because a friend of mine sent me a link to this story.



    Sincerely,

    The .NET Addict

    http://dotnetaddict.dotnetdevelopersjournal.com
  • Reply 11 of 20
    solipsismsolipsism Posts: 25,726member
    Quote:
    Originally Posted by fluffylump View Post


    I took it that the attendee was PM AKA DED?



    Was that a silly assumption?



    Not at all. It's not the first AI article where DED referred to himself as the attendee.
  • Reply 12 of 20
    cubertcubert Posts: 728member
    Stay away Winblows programers! We don't need you.
  • Reply 13 of 20
    alfiejralfiejr Posts: 1,524member
    thanks for the clarification, Mr. .netaddict.



    certainly some level of NDA is necessary and actually positive for stuff in development. but Apple's blanket NDA policies are way overbroad and just plain squelch the right to speak and publish if you do any business with them. (corporations are all using contracts to attempt to negate the First Amendment these days, overall a grave threat to the Nation.) add to that Apple's consistent refusal to answer reasonable questions in detail about what is going on (like the current 3G issues), and yes, it is almost like a "cult" - weird, like scientology or something.



    blogs and posts should counter-attack this NDA wall of silence in the public interest. until Apple changes it needs to be shot full of holes.
  • Reply 14 of 20
    Quote:
    Originally Posted by mjtomlin View Post


    How much does Microsoft charge developers for the software just to develop for Windows Mobile? (Visual Studio Pro 2008 is over $600 at Amazon.)



    Microsoft's CIL compiler is a free download. (CIL is the "virtual machine" for which all .NET applications are compiled as an intermediate step before being JIT-recompiled into native code by the target machine as the software actually runs.)



    The libraries you'll be linking against (the .NET compact framework 3.5) are available as free download.



    For the $600, you're paying for nothing more than the convenience of the Visual Studio integrated development environment. It's possible and totally legal to write, compile, and deploy .NET Mobile software without paying for any additional tools, it's just harder to do.
  • Reply 15 of 20
    Quote:
    Originally Posted by rtdunham View Post


    did anyone at AI contact Hoffman to verify the comments attributed to him?



    You can, we'll all wait.



    Quote:
    Originally Posted by rtdunham View Post


    If I'd spoken at a public forum, i'd expect that courtesy, if someone's going to report on what i said based on "an attendee's notes".



    I don't think expecting every reporter that writes a story about your public forum, to clear it with you is reasonable.



    Quote:
    Originally Posted by rtdunham View Post


    Journalistically, none of the direct quotes should be attributed to Hoffman. they should be attributed to the attendee.



    What? The attendee didn't say this stuff, why would you attribute it to the attendee saying it?

    The article is VERY clear this is what Hoffman said according to someone else.



    Quote:
    Originally Posted by rtdunham View Post


    And why isn't the attendee identified?



    Who cares?



    Quote:
    Originally Posted by rtdunham View Post


    Anyway, on insignificant stories reporting on what a layman says about something, none of this would matter much. But on this subject, and from an expert such as Hoffman, it does. IMHO.



    Agreed.

    It is important what Hoffman said in public.

    Glad we had this report.

    I would guess the more rabid Windows Mobile developers that do NOT plan

    on also working with the iPhone SDK are not so happy and will post so shortly.
  • Reply 16 of 20
    princeprince Posts: 88member
    Come on you people. It's as if Jesus was covering his ass and the Doubting Thomas insisted on putting his hand in the hole.



    Holy balls. Hoffman himself was apparently under NDA, so asking him to approve the post would have been a futile effort. And here's another riddle for you: for the record, there was no "second-handed reporting" involved, and no NDA was broken. Yes that's all very confusing to work out, but that's why it's a riddle. As Steve Jobs might say, "Isn't that interesting, a ship that leaks from the top."



    Perhaps AppleInsider is more inside Apple than you know. And as those other sayings go, "don't look a gift horse in the mouth" and "don't cry over spilt milk."



    Thank you Akac from Texas for contributing some additional, informative perspective!



    "Apparently," WWDC was full of WiMo developers who not only applauded Hoffman's presentation but also expressed a similar excitement about the potential of the iPhone market and its advantages over WiMo.
  • Reply 17 of 20
    I think one thing that is probably worth pointing out here is that the phrase "public forum" has been used a lot to refer to the WWDC. Unlike other conferences, including (but not limited to) Microsoft's Tech-Ed and PDC, WWDC is not a public forum. Every attendee that goes to WWDC, and every speaker that speaks at WWDC, is bound by an NDA and the contents and proceedings therein are considered _private_, with the exception of the keynote.



    That said, all this activity related to my presentation makes me wish I'd put up some AdSense on my blog... daddy needs a new Macbook Pro...



    - Kevin Hoffman (the .NET Addict)
  • Reply 18 of 20
    akacakac Posts: 512member
    Quote:
    Originally Posted by Cubert View Post


    Stay away Winblows programers! We don't need you.



    Why? Some of us worked at Apple, some of us use only Apple equipment - we are Apple users through and through?
  • Reply 19 of 20
    tbelltbell Posts: 3,146member
    I think it is important to note that a Non Disclosure Agreement is only good between Apple and the attendees (assuming they agreed to such an agreement). The NDA doesn't apply to Appleinsider. So if an attendee under an NDA gives Appleinsider information, Appleinsider can publish it because it was not a party to the contract.
  • Reply 20 of 20
    +mimic+mimic Posts: 37member
    Quote:
    Originally Posted by ktappe View Post


    No, like sitting on the waiting list even though you've been an ADC member for 10 years while some noob gets accepted so they can upload "aaaaaaa+TipCalculator."



    that i would be pissed about!!
Sign In or Register to comment.