Wednesday, August 20, 2008

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

Published: 09:00 AM EST 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. Until now, his comments remained unpublished, but an attendee's notes on the subject provide some interesting insider observations.







Related AppleInsider articles:* Apple's open secret: SproutCore is Cocoa
for...
* Steve Jobs to showcase OS X, iPhone platforms... *
Coming to iPhone: Instant Messenger, EA's... * "http://www.appleinsider.com/articles/08/03/06/apple_announces_iphone_2_0_software_and_sdk_beta.html">Apple announces iPhone 2.0 software and SDK beta * "http://www.appleinsider.com/articles/08/02/07/apples_safari_3_1_to_support_downloadable_web_fonts_more.html">Apple's Safari 3.1 to support downloadable web...
.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 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 points out that while Cocoa Touch presents a consistent view-based controls hierarchy, the Compact Framework "steers you down the
wrong path." 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 Talking about hardware abstraction, Hoffman 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. "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 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 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." He also noted that "writing Mac applications has made my Windows apps better."







Briefly: shots of Nike+ touch app not the real deal

Published: 11:00 AM EST

A series of images making the rounds on the Internet this week as 'leaked' screenshots of an upcoming Nike+ application for the iPhone and iPod touch are not authentic, AppleInsider has learned.

The application depicted in the shots, which shows off touch-based interface for managing runs and workouts tied to Nike's $30 Nike+iPod Sport Kit, is neither the work of Apple nor the athletic shoe maker, several people familiar with Nike+ initiative say.

Retail sources say its closing time for current iPod line

Published: 04:00 PM EST

Resellers both near and afar are reporting signs that Apple's current line of iPod digital music players are on their way out the door, just as one prominent Wall Street analyst restates his claim that a $199 iPod touch is likely to be among the new models that will fill the void.



Related AppleInsider articles:* Apple may be eying sub-$1000 notebook market
* iPhone 3G to be in healthy supply as iPod...
* iPod touch supplies seeing shortages, changes...
* Apple, O2 to slash 8GB iPhone price in the UK...
* September quarter iPod sales tracking around...

Stateside, people familiar with the inventory management systems of mass merchandizer Target say all current iPod models have recently seen their status shift from "Active" to "Discontinued" when scanned with handheld PDA scanners used by employees.

Those handhelds, however, aren't capable of displaying set dates for new planogram refreshes, as that information is said to be available only through the retailer's web-based intranet systems.

Separately, big-box retailer Argos in the UK is preparing to clear out its remaining iPod inventory in anticipation of new models in the coming weeks. A person familiar with the plans says the company recently took receipt of new point-of-sale displays promoting "price cuts" that should hit the retail floor during the last week of August or first week of September.

The displays include a "giant wall graphic" which is the "biggest poster" displayed by the retailer, that person said.

These initial signs of inventory ramp down come amid calls from some of the more prominent Wall Street analysts regarding the steps that will be necessary for Apple to maintain its current momentum in the digital media player business.

In a note to clients last week, Lehman Brothers analyst Ben Reitzes noted that availability of the 16GB iPod touch at speciality electronics retailer Best Buy has trailed all other members of the iPod family for several weeks.

"We continue to believe Apple will need to reposition the iPod touch line in conjunction with its anticipated new product announcement in early to mid-September now that the iPhone acquisition price is lower," he said.

On Tuesday, Piper Jaffray analyst Gene Munster issued his own note to clients where he voiced a similar view to that of Reitzes, adding that he expects iPod refreshes across the board with a sub-$200 iPod touch to boot.

"Specifically, we believe Apple will increase the capacity of the iPod shuffles as well as the iPod nanos (but maintain current price points); redesigned form factors for the shuffles and nanos are unlikely," the analyst wrote. "We believe the iPod touch may be redesigned and may enter the $199 price point, in line with the iPhone."

Apple: iPhone 2.0.2 update targets 3G issues

Published: 05:05 PM EST

Apple confirmed that the iPhone 2.0.2 update does indeed include changes to address issues related to 3G reception. USAToday cited company spokesperson Jennifer Bowcock as saying, "The software update improves communication with 3G networks."



The newspaper referenced reports of complaints from iPhone users and cited speculation about possible hardware issues with Infineon chips used in the iPhone, a possibility Infineon itself earlier discounted as unlikely, noting that other phone makers use the same components without any issues.

The report also cited Jupitermedia's vice president for mobile strategy Michael Gartenberg, who said the reports of iPhone 3G problems may be overblown. "We've seen these isolated reports about people having connectivity issues with 3G and Edge, and frankly I have those issues on a variety of phones. Cellphone coverage is tricky."

The 2.0.2 update apparently addresses complex issues that control how quickly the iPhone 3G will drop a weak 3G signal in order to use a stronger EDGE signal when it is available. In the US, much of AT&T's cellular network is built out using cell towers optimized to deliver "2.75 G" GSM/EDGE service. Sources familiar with the matter say 3G networks require closer tower spacing to provide the same level of coverage with the more modern 3G UMTS.

There is nothing Apple can do in software to fill in spotty coverage in AT&T's 3G network, but software updates can adjust how the phone hardware works to allow it find and maintain a link with a less than optimal 3G signal. Independent tests have suggested that at least some versions of the iPhone 3G are too quick to drop a marginal 3G signal that other UMTS phones can use without problems.

A CNet report on iPhone 3G issues cited Andrew Seybold, an independent industry analyst, as saying, "My belief is that because AT&T's network is not built out to every cell site, people are getting frustrated because they're finding places where the 3G signal isn't available or is weak."

The dizzying array of complexity exposed in the iPhone's Field Test mode (below), entered by dialing *3001#12345#* and exited by hitting the home key, illustrates that signal reception is not a simple matter.

iPhone Field Test app

Change you can retrieve 3G in

For some users, adjustments in how the iPhone 3G's low level radios are configured may provide a usable improvement in 3G reception, while for users in other areas with more signal problems, it may result in futile attempts to cling to a terrible 3G signal that reduces the overall call quality and may be more likely to result in a dropped call.

In Japan and parts of Europe, EDGE network upgrades were skipped entirely and providers simply jumped from 2G to full 3G networks. This may impact how much improvement iPhone 3G users see there, as the challenges of finding a strong 3G signal and the firmware's decisions on when to drop down to a 2G signal will simply be different. In the US, AT&T users' experiences with the update may also fluctuate due to the quality and coverage of the 3G network in their area.

Steve Jobs separately emailed one user with a tersely worded intent to fix unrelated problems in the iPhone's higher level software that concern instability and crashing in third party apps, writing, "This is a known iPhone bug that is being fixed in the next software update in September."

Class action suit claims Apple deceived over iPhone 3G speeds

Published: 06:50 PM EST

A lawsuit filed on Tuesday by an Alabama woman alleges that Apple has touted doubled Internet speeds with iPhone 3G when a rash of connection problems have made those speeds seemingly impossible to reach.



In the 10-page complaint, Jessica Smith of Birmingham asserts that Apple's marketing campaign is a breach of express warranty as it promises Internet access "twice as fast" as with the original where the practical experience has fallen well short of the mark.

Always referring to the device as the "Defective iPhone 3G," Smith and her legal team assert that e-mail, text, and most other downloads were considerably slower than what Apple promised. This in no small part stemmed from the reliability of the connection: the device would connect to 3G less than a quarter of the time to 3G even in areas AT however, Apple has confirmed that its recent iPhone 2.0.2 update addresses some of the problems.

Inside MobileMe: Web 3 and Web client-server apps

Published: 09:00 AM EST

MobileMe isn't just for iPhone users. It also expands upon the simple web apps delivered as part of .Mac using a cohesive Mac OS X inspired interface that behaves more like a desktop app than a web page, providing easy access to data from anywhere you have Internet access. Here's a look at how web apps have developed, how Apple's new online apps work, and the future potential of MobileMe's tightly integrated mobile, web, and desktop apps.

Inside MobileMe series segments

Inside MobileMe: Secrets of the Cloud and Mobile Push (Friday)
Inside MobileMe: Mac and PC cloud sync and mobile push (Saturday)
Inside MobileMe: Apple's Push vs Exchange, BlackBerry, Google (Monday)
Inside MobileMe: iPhone Mail (Tuesday)
Inside MobileMe: iPhone's Exchange alternative for contacts and calendar�(Wednesday)
Inside MobileMe: Web 3 and Web Client-Server Apps (Today)

Before Web Apps: The Document Driven Web

In the era before web apps, the web was a relatively simple system of hyperlinked documents written in HTML. Click a link on a page and your browser would load a new page based on the referenced URL address. The web was brilliantly simple.

However, that simplicity resulted in a number of problems if you wanted to do more than just look at a series of hyper-connected documents. In order to exchange sophisticated transactions with a simple 'fill in the blanks on a form page and submit it,' you'd end up having to reload virtual pages repeatedly.

This is particularly problematic for something like web mail, where the user waits for updates while interactively sending new messages. Just over a decade ago, the concept of web email was entirely new. Unlike an actual desktop email application, handling email over the web meant loading a new web page, entering your email content, and reloading the page every time you wanted to see updates.

MobileMe

Web 2.0: the arrival of Ajax

In the mid 90s, Microsoft helped to pioneer technologies to improve upon the tedious loading of a series of web pages to do transactional web applications. The company was particularly interested in enhancing web-based email, as it was working to develop both its new mail server (Exchange) and its web browser (Internet Explorer) as critical elements of its overall Internet strategy.

The company first developed IFrames for allowing one page to be embedded in another (like picture-in-picture on TV), so the IFrame region could be independently refreshed and redrawn without reloading the entire page.

It later developed XMLHttpRequest, a method for using a web browser scripting language (often JavaScript) to package up XML data to send to the remote web server. The server then responds with new data which the script can use to interactively update part of the page, rather than reloading and redrawing an entire new page from the server. Because the user does not have to wait for the server to respond before continuing to use the web page, this type of interactivity is referred to as Asynchronous JavaScript with XML, or AJAX.

Microsoft introduced this concept to support richer functionality in Outlook Web Access, a web app it first bundled with Exchange Server 2000. It delivered Ajax functionally via an ActiveX control in IE 5; since then, the mechanism has been copied by Mozilla, Safari, Opera, and most other web browsers, making it a de facto standard for adding richer desktop-like behavior to web apps.

MobileMe

Web 3: HTML5 and Web Client-Server

While Ajax's frequent server updates provide richer interactivity than static web pages, they are rarely capable of being used offline and have other limitations that marginalize them in the minds of many users, who commonly view web email as being a distant runner-up to using a desktop email client. To work around these limitations, Microsoft's own OWA makes heavy use of proprietary extensions to Internet Explorer; few of these have been cloned in Firefox or Safari, nor can they really be because they are not documented standards. That leaves many OWA features tied exclusively to the IE browser; in other browsers it presents a simpler interface.

To foster real interoperability among the next generation of rich web applications, Apple, Microsoft, Mozilla, and Opera have been working on a new HTML5 standard that codifies how features should work so that all browsers can operate the same, and so web developers can make use of more sophisticated interactions on the web, knowing how their apps will behave across all browsers.

There are already web standards in place to define presentation, such as CSS; HTML5 focuses more on behavior, targeting features such as drag and drop, offline editing, local storage, and media playback. Just as Microsoft was motivated to rapidly develop Ajax in the 90s in order to enhance its email presentation on the web, Apple is leading the development of HTML5 to put its rich media client apps on the web, starting with the iLife-connected Web Gallery in .Mac, and broadening to the suite of apps in MobileMe, which will continue to develop in the coming months.

MobileMe

JSON Lives

Apple is building its MobileMe "Web Client-Server" apps using the SproutCore JavaScript application framework, which was designed around the concept of making web apps that are more than just a thin layer of Ajax lubricating interactivity on the web. A Web Client-Server app is loaded by the browser's JavaScript interpreter and runs as a self-contained application, making Ajax-like calls to the server while offering an even richer and deeper level of local user interaction, delivering a more immediate response to the user and offering the potential for client-side storage and offline operation.

Web Client-Server apps are entirely HTML pages driven by JavaScript code and presented via CSS. Rather than using the relatively heavyweight XML, they typically use JSON (JavaScript Object Notation), a lighter, simpler object representation that not only carries a data payload like XML, but is also executable by the JavaScript interpreter. This makes JSON faster in both data exchange with the server and in processing on the client side compared to XML.

With that power comes accountability. Being able to inject executable code into a system from malicious sources is a primary security problem. For that reason, web apps that transmit data using JSON have to authenticate with the server and regularly perform security handshakes to ensure that the data being sent back and forth is indeed coming from and going to a trusted source.

On

First Google Android phone sighting reveals awkward iPhone rival

Published: 12:00 PM EST

The first smartphone based on Google's Android mobile platform could hit the U.S. market as early as October, according to new reports, but a video of the handset leaked on the Internet reveals a device which lacks the elegance that's already drawn millions to Apple's iPhone.

People briefed on the search giant's plans tell the New York Times that the HTC-manufacturered handset, know amongst Internet circles as the "Dream," will go on sale by the holidays -- possibly even earlier depending on how long it takes the Federal Communications Commission to weigh in with approval.

It's expected to be the only Android phone available in the U.S. this year and will be sold exclusively through T-Mobile, the nation�s No. 4 wireless carrier. A video (below) of the supposed device making the rounds on the Internet is said to match the one seen by the Times' sources, confirming its authenticity.

Like the iPhone, the Dream has a full touch-screen and will be able to run a slew of applications written by third-party developers for the open-source Android operating system. Conversely, it will also feature a physical "full five-row keyboard" that's exposed by sliding the display component upwards, mimicking the functionality of T-Mobile's Sidekick handset.

While the Dream is "apparently a hot item to show off in Google's cafeterias these days," those familiar with the device describe it as "big and bulky," and nowhere near as sleek as iPhone that's forever altered the landscape of the mobile industry. The Android software itself is similarly not up to par with standards set by Apple, leaving it feeling "less-elegant, less-user-friendly" just months before its slated to be unleashed into the wild.

Still, the Dream is just one of "several devices" Google is testing with its new mobile software, offering hope that other smartphone makers will be able to compensate for the inadequacies of the initial HTC handset when they begin rolling out their Android phones sometime next year. The more pressing issue appears to be whether Google is adequately prepared to provide its ring of developers with the support and expertise they need to go head-to-head with an already thriving fleet of software makers that have hitched onto Apple's mobile platform.







Some early Android supporters have already expressed frustration with the company for favoring a small subset of developers with advance releases of Android's Software Developer Kit, exposing them to newer features and bug fixes ahead of the general community. Meanwhile, those carriers and hardware manufacturers that do have access to the latest Android codebase haven't experienced a clear path to success either.

Among their complaints have been language translation problems with software and an overall lack of support from Google, whose emphasis on the anticipated launch of the Dream through T-Mobile has crowded out other carrier's attempts to get help launching their own array of Android devices.