Free Newsletters

   All InfoWorld Newsletters
Enterprise Mac | Tom Yager » March 2008

March 31, 2008

iPhone SDK: Interface Builder added; WebKit kicks into overdrive

Apple isn't shipping the official iPhone SDK until June, but if you're planning to create apps for iPhone or iPod touch, the pre-release SDK just became more than a curiosity for those writing native code. Interface Builder, the Xcode tool for creating graphical user interfaces for Mac applications, has been added to the iPhone SDK. This not only gives developers the ability to add non-HTML GUIs to their native applications, but Interface Builder also makes it easier to carry hardcore Mac coding skills to iPhone.

Webkit Icon

The SVG Animation in WebKit (Safari) is still under development, but in its latest incarnation it is fast, smooth and very close to passing the standard's acid test. I have little doubt that it will be in Safari's public release in time for WWDC in June. Developers who want to check SVG Animation out now can grab the latest nightly build of WebKit from www.webkit.org. Installing a nightly build binary will add an executable, webkit.app, to your Applications folder. It is indiscernible from Safari--even the title bar says "Safari" and all of your bookmarks are present. The tip-off is a gold-tinged rim around the compass icon. The About box reflects the latest full release build of Safari rather than the WebKit framework version.

There is always the risk that installing a nightly build over the top of production software will introduce some instability. I can't recommend it for Joe Machead, but if you're developing for iPhone, or developing for Safari for desktop, you should be tracking the WebKit builds and reading the blogs attached to the WebKit site.

You might not intend to build WebKit for yourself, but if you can read C and Objective-C, you'll find the WebKit source code to be a study in well-crafted code, written against multiple very complicated and moving specifications. Look at the HTML5 and CSS3 specifications on www.w3c.org to get a feel for what the WebKit crew is up against. Fortunately, it's a serious team that includes Apple engineers, and Apple is a key player in the specifications and standards processes.

Posted by Tom Yager on March 31, 2008 11:30 AM


March 19, 2008

iPhone 2.0: Safari hosts local apps; SQL on a smartphone!; go get Safari 3.1 now

I have a secret: I love JavaScript. It has an extremely simple C-like grammar--it has far more in common with C than Java--and is readable and compact. I can teach it to a child in an hour. With just a few days of messing around, a beginner can write powerful client and server applications in JavaScript, and the minimum required toolset is a browser and a text editor. To test changes to your code, you refresh its browser page.

I developed my appreciation for JavaScript by using it to create applications of surprising scale. In 1999, I wrote a book about creating Web applications, laying out in detail how one can do anything with JavaScript, CSS, DHTML, XML and SQL. The pinnacle of client-side JavaScript at the time was Microsoft's JScript, implemented in Internet Explorer. I took great care in my book to balance IE against Netscape, and to document the ways in which each browser adhered to and diverged from W3C standards. IE did better than most people would assume. It went on to become the basis of the ECMAScript standard. Then Microsoft all but pulled the plug on the language's internal development. The JScript editor and debugger vanished from Visual Studio. My book flopped, but worse than that, a simple language that had justifiable momentum, and even a job market built around it, dropped from sight except as a means to render dynamic HTML content and discern one browser from another.

JavaScript has reemerged as the J in AJAX, where it's assigned such common duties of manipulating in-memory data structures, loading plug-ins and performing explicit animation on user interface elements. It's good to see JavaScript back in action, but for years I've imagined what JavaScript might have become if it had been actively developed after Microsoft let it go. My crushing disappointment was that AJAX, not so advanced in light of history, didn't aim at the one target I felt JavaScript was destined for: Standalone browser-based applications.

Now we're back on track. Incremental developments in WebKit, the open source project on which Apple's Safari is based, have coalesced into the Safari browser for iPhone 2.0, due out in June, and Safari 3.1, which was just delivered for OS X. Apple and WebKit developers have invested an impressive amount of effort to implement vital portions of HTML 5, CSS 3 and SVG (scalable vector graphics) standards. HTML 5 provides a standard for embedded SQL statements into script code. SVG (scalable vector graphics) does what its name suggests, but also brings motion into places where only static bitmap graphics worked before. SQL (through SQLite) and SVG are linked into Safari, not plug-ins. CSS 3 sets up implicit and explicit animation, with both managed by the renderer.

In the transition from Safari 3.0 to Safari 3.1, WebKit coders and Apple somehow blew the doors off prior JavaScript performance. Apple created a JS benchmark, SunSpider (a click here will run it immediately; be aware that it takes some time), to prove its point. It measures the average time taken to complete a few cycles of complex JavaScript tasks. An 8-core, 3 GHz Xserve ran the SunSpider suite on Safari 3.0.4 in 6624.6 millisconds (6.62 seconds). A dual-core, 2.4 GHz Santa Rosa MacBook Pro running Safari 3.1 completed the SunSpider suite in 3211.8 milliseconds, or 3.21 seconds. The fact that SunSpider expresses its results in thousandths of a second portends sub-second results.

As for persistence, well, Apple decided that cookies and XML just wouldn't do. Since SQLite is already pervasive in iPhone OS, Apple wired it into Safari to give JavaScript coders the ability to manage data using real, grown-up SQL with transaction support. SQLite is strictly client-sized, but very powerful for a database that links entirely into your code (and it's open source). I wasn't that hot on SQLite in OS X's Core Data until I saw it in action in the iPhone SDK. Now that I see it it running on an embedded device, I see SQLite for the tight coolness it is.

There is another motivation to using SQLite as the persistence mechanism for iPhone Safari applications: It forces developers to give much more thought to their use of storage, which is a finite commodity on a phone or music player. It also slashes a lot of tree walking and in-memory XML out of your script code. But if you've just got to do the DOM, Apple did fold in two new native-ized DOM query methods to displace still more iterative scans.

Safari on iPhone 2.0 (and iPod touch 2.0) pushes the envelope in so many ways that Mac users will want it in desktop Safari and Dashboard. Okay, I'll speak for myself. I've been hollering for standalone browser-based applications, not those pseudo-apps that require a teeny HTTP server, for years. I'm on record saying that if Apple just did persistence in iPhone's Safari, I'd quit harping at them about a native SDK. I got what I wanted and then some, so now I can harp at you about what Apple poured into iPhone/iPod touch 2.0, Safari and the SDK.

Posted by Tom Yager on March 19, 2008 07:14 PM


March 10, 2008

New iPhone enterprise developer program, $299; musings about iPhone app licensing

Companies and organizations that don't want to make their iPhone/iPod touch software publicly available through AppStore can now apply for a special $299 enterprise development license that entitles them to create and distribute custom software strictly for internal use. The application must be submitted by an individual empowered to make legal commitments on their employer's behalf.

This raises some questions in my mind. If you run a consulting shop that creates commercial iPhone software for clients' (say, government agencies') private use, does each client need an iPhone enterprise license? $299 is not prohibitively expensive, but some clients might balk at signing a contract with Apple as a condition of running the code you sold them. Commercial developers don't necessarily want to share their client lists with Apple.

I'll ask Apple how it works, but I'm hoping that the $299 program is the equivalent of an unlisted number. If the extra $200 buys the privilege of bypassing Apple's validation, distribution and customer registration systems, then it's the right approach.

You could argue that anyone who carries an iPhone is already registered with Apple when they activate their phone, so whatever secrets a user would wish to keep are already out. However, in enterprises, handsets are purchased and activated by the employer, not individual users (a purchase model which has, to this point, been denied iPhone buyers by AT&T). Once a phone is purchased as part of an enterprise deal, it should drop off the map where the handset manufacturer is concerned, and the wireless operator's role is limited to supplying the service and sending the bill. Which individual is using the phone, what for, where they work and what applications they're running should be nobody's business. Anything from personal security to trade secrets might be at stake. Once Apple picks up the enterprise baton, it has a lot to live up to.

iPod touch is a special case, and given my overall lack of enthusiasm for AT&T, my favorite case. touch can be used exclusively inside company, agency or a home's walls for any private use the purchaser has in mind. There is no carrier to protect. There is no requirement to sign up with iTunes or any other service in order to use iPod touch for applications. My first application for iPod touch will be to use it as a remote control for an iBootBar rack power controller. This has several network interfaces, but Telnet is the most versatile and will hide well under a GUI. This won't be a difficult first assignment. I'm more uncertain about licensing for personal applications than I am the SDK.

My read of Apple's signing and licensing requirements is that once you pay your $99 or $299 and are issued a certificate, you can start using iPhone/iPod touch units for development (prior to licensing, you can only use the emulator), permitting you to use real devices as develop and debug targets. I have a hunch that units are activated for development use individually (how and how many, I have no idea; perhaps an iTunes-like model) to prevent the use of the SDK as a means of distributing apps.

Where applications written for my sole use are concerned, do I have to sign my code, upload it to AppStore, wait for approval, and re-download it in order to use it? Do I have to re-sign and resubmit the app I wrote for myself every time I make a change (because the checksum changes)? So many questions.

Developer and user licensing will be the messiest aspects of iPhone custom development leading up to the public release in June. I'm going to try to snag a briefing with Apple prior to the release to go over iPhone/iPod touch certificates and licensing. I'll share those details with you.

Posted by Tom Yager on March 10, 2008 07:06 AM


March 06, 2008

iPhone/iPod touch Q & A

Q: Why is Apple the exclusive distributor of third-party software for iPhone and iPod touch?
A: Somebody has to take full responsibility for customer security. Apple is taking responsibility for security by issuing developer certificates that irreversibly link every app a traceable, physical creator. Apple is a good groundskeeper, too; the site's always going to look splendid.

Q: Why do I have to pay $99 to write code for iPhone, and what's that buy me?
A: You can write code for iPhone for $0; download the tools from developer.apple.com. Mess around in the simulator to see if it piques your interest. If it does, then $99, plus answers to the validation questions that Apple will ask, gets you a certificate that will burn your name into your code. When you get that, you can start debugging with a physical iPhone or iPod touch. And you can upload your software to AppStore.

Q: What is AppStore, and how do I get in it?
A: The AppStore icon will be added to iPhone and iPod touch

Q: I meant, how can I get my software in it?
A: Sign up as an iPhone developer. They'll guide you through it.

Q: What kind of merchant account, PayPal, Kagi thing will I need to get my software sold?
A: This is much as you need to worry about money: a) Pay Apple $99 to be a developer; b) write something worth buying; c) decide what people should pay for it; d) upload it to Apple; e) rejoice as you're paid 70% of your monthly sales.

Q: Is anything about this program open source?
A: Steve Jobs says no. You will find references to ARM (the MCU used in iPhone and iPod touch) scattered around the Darwin source code.

Q: Do you think it's possible to completely overwrite the software on iPhone so I can do what I want?
A: For carrier unlocking: a) Buy iPod touch; b) Buy unlocked telephone

Posted by Tom Yager on March 6, 2008 04:31 PM


March 06, 2008

Apple's iPhone software strategy moves me

A colleague scolded me for applauding during Apple's press conference to announce iPhone 2.0, next-generation firmware that will bring a host of enterprise features and support for a native software development kit (SDK) to iPhone and iPod touch. In my defense, I kept my pen and pad in my hands while the room went berserk over Apple's deal with Microsoft to bring an extraordinary array of Exchange Server connectivity to iPhone. I was moved, but not to clapping, by Apple's implementation of Cisco VPN compatibility, WPA2 security and other touches that IT administrators set as requirements for devices that connect to their networks. The enterprise half of Apple's new mobile strategy speaks to IT, and therefore to me as an IT journalist. iPhone 2.0 brings iPhone and iPod touch many steps closer to parity with the high-end BlackBerry, Windows Mobile and Nokia QWERTY and stylus handsets that are enterprise mainstays now. My journalist appreciates having a new contender in enterprise mobile, but does not applaud at press conferences presenting same. I nod and note.

[ Read my iPhone 2.0 Q&A. Read about the developers' reaction to the news. Read our special report, "IT's guide to the iPhone." Learn how to make the iPhone work at work. ]

But I am more than a journalist. I worked in engineering, consulting and technical management in the wireless industry before coming to InfoWorld. I've covered wireless, mobile and embedded technology during my entire tenure here simply by continuing to think and operate like a professional with skin in the mobile and embedded game. For over a decade, I've seen wireless carriers, hardware and component manufacturers and OS vendors come at custom software development from every imaginable angle but the right one. I've known for so many years that the barrier to a boom in mobile applications is a stable, simple, documented platform and a matched set of development tools. I've known that these things don't exist because no entity has found a way to make such an effort profitable. Apple has.

Lest I carry on too long in one post about a topic that will take many posts to cover, I'll clue you in on the points that provoked my applause.

Apple's native dev tools include live remote debugging and run-time profiling of USB-connected devices. During the demo, Apple showed Xcode's Instruments (formerly Xray, derived from Sun's DTrace) recording stack traces in real-time from software running on an iPhone. Developers of embedded software--and that's precisely what handset apps are--appreciate how difficult, expensive and tedious it is to design, code and debug with a tethered physical target, and what a big deal it is to have live debugging baked into an embedded platform and a free toolset. English translation: Applause.

Apple is hosting a catalog of third-party applications (AppStore), splitting the proceeds with developers 70/30, and paying developers for software sold on a monthly basis. AppStore will automatically notify iPhone and iPod touch customers when new releases of their purchased software is available. No desktop approach to shareware and small-volume licensing is adaptable to mobile. All a third-party developer needs to do is upload its software to Apple, hang on it the price tag of his choice, and it'll be added to the catalog. From there, the developer just waits for the checks. And, one hopes, responds to calls for support.

Apple will not charge developers or customers for free third-party software. Huzzah!! Developers will need their $99 certificate, but you can band together with your buds and code under an assumed name. Only the guy that actually has the phone needs the license. Everyone else can work for free, using free tools, with the free simulator.

Apple is opening the same APIs that it uses internally. OS X, BSD, TCP/IP, Sockets, security, power management, Keychain, Core Services (e.g. Address Book, Mail), Core Audio, OpenAL, audio recording, graphics (JPG PNG TIFF), PDF, Quartz 2D, OpenGL ES and H.264, to name a few. A new GUI API layer, Core Touch, has been added. A database layer, managed by SQLlite, is in there. Might could get something done with all that.

Apple will charge $99 per developer to issue a code signing certificate, and Apple will police the AppStore catalog for malware and the like. That's cheap, and in return, Apple's taking responsibility for security. Gutsy.


The iPhone SDK and documentation are entirely free of charge for use with the integrated iPhone simulator.
You don't have to buy a certificate to write code. You don't even need an iPhone.

Interface Builder (the GUI designer in the Xcode toolset) is loaded with all standard iPhone and iPod touch interface elements and actions. No more AJAX hacks that look sorta like...

Safari WebView was only mentioned as a term, but if it gives me locally-hosted apps, written in JavaScript, with an HTML front end, I'm down. That might tide me over until Silverlight and Flash come around.

No, seriously, I won't wait. I must code.

After the break, a Q & A with our resident cynic.

Posted by Tom Yager on March 6, 2008 03:43 PM


March 06, 2008

Apple distributes 3rd-party apps through AppStore and iTunes; how developers can get it

Third-party developers can distribute their apps through Apple facilities.

AppStore is exclusive way to get software to iPhone users. Dev gets 70 pct of sales price, paid monthly.

FREE APPS DISTRIBUTED FREE on AppStore and iTunes.

IPhone 2.0 beta with all new features ships to developers today, ships to all as free update in June. IPod Touch users will pay for update.

Developers can get SDK with simulator for free, and develop directly on a device for a $99 membership.

Posted by Tom Yager on March 6, 2008 11:04 AM


March 06, 2008

iPhone native SDK opens Apple's own dev tools to public

As of today, Apple has opened the native Application Programmaing Interfaces (APIs) and tools that Apple uses for iPhone and iPod Touch development.

Coding for all layers, covering: Core OS X, Core Services such as address book and database, Media (including H.264 MPEG-4, positional audio, PDF) and Cocoa Touch for UIs.

Xcode supports full set of iPhone/iPod Touch interface elements. Software is downloaded, debugged and profiled (with Instruments a.k.a. Xray or DTrace) live using the regular USB cable.

IPhone Simulator simulates entire API stack for local debugging.

Details follow.

Posted by Tom Yager on March 6, 2008 10:21 AM


March 06, 2008

iPhone gets Exchange support, aims for BlackBerry

Apple has licensed ActiveSync from Microsoft and will build push e-mail, calendar, contacts, and global address lists in the next release of iPhone software.

Apple will also roll in essential enterprise features, such as stronger authentication and more broadly compatible remote access (VPN). But most important for large enterprises, Apple's next release will support Exchange Server's central management for policies, fleet configuration and remote data wiping.

Apple wants to tag BlackBerry, which Apple claims is the only enterprise handset outselling iPhone.

My next entry will be on iPhone's native application software development kit.

Posted by Tom Yager on March 6, 2008 10:08 AM


Technology White Papers

 

InfoWorld Technology Marketplace

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
» BUY A LINK NOW

Sponsored Technology Links