Thursday, October 18, 2007

Developing 4D-based Applications for the iPhone

These are notes from the "Developing for the iPhone" presentation given by Rudi Pšeničnik (Software Engineer) & Joe Resuello (Technical Marketing Engineer) of 4D Inc. at 4D Summit 2007.

Rudi Pšeničnik (Software Engineer) & Joe Resuello give presentation on 4D apps for the iPhone

Basically you're creating simple apps with summary statistics - they call them "dashboards". When you have a button that changes colors - they call those "indicators". You can also swap columns with "alternate columns".

There's back button support, and support for 90 degree rotation (landscape/portrait).

There's support for integration with existing apps on the iPhone (like calling numbers, sending e-mail, mapping via Google Maps, etc.)

The iPhone is running OS X, but there is no SDK - you can only do web apps for Safari.

Quite a few big vendors detect the iPhone and serve custom apps just for the iPhone.

You want to keep things small, compact - information at a glance.

The data in 4D iPhone apps can come from a wide variety of sources - variables, arrays / DCS (Developer Created Selections), fields, etc.

AT&T's EDGE network is not the fastest out there, so you have to keep things light.

All that's needed is the 4D Ajax Framework 2.0 which works on both v2004 and v11.

Rules to keep in mind...
  • Keep it to one task per page
  • Use minimal graphics - EDGE network is a bit slow
  • Hide the address bare to make things look native
  • Disable pinching to make it seem native, not a web app
  • Have large clickable areas
  • More information in landscape
Setting up an iPhone app is largely done in the web browser - you handle the layout there. (There are things that have to be done in code, but the UI is largely done in a browser until you want to drop down and tweak things).

The business indicators can be soft coded with developer hooks, so instead of setting the button to red or green based on a hard coded value you can do it based on the result of a method. If you use developer hooks realize the hooks act on all indicators - so you have to trap for which indicator you're handling.

If you use alternate columns, the business indicator colors can be different for the alternate column than for the primary column. But remember you can't hide/show the alternate column and do something else (like call the person) at the same time.

Realize that you can also link to a normal web page/app (not iPhone optimized) on clicks. That's the closest you can get to drilling into detail pages.

The apps are completely customizable - there's a bunch of HTML, CSS and Javascript files on disk that can be tweaked to meet your needs. The Javascript files have a lot of the basic configuration data.

In terms of CSS, Safari (and iPhones) support CSS3. Currently Safari is the only browser that does support CSS3, but CSS3 is amazing and gives you a lot of powerful features. Since your app is only for iPhones, you don't need to worry about other browsers not supporting CSS3.

Their interface doesn't support paging, so make sure you set the max records so you can see all the records you want, but not so many that you have problems downloading.

The UI editor they have is set up so the first three columns are visible when vertical, and additional columns are available when horizontal. However, you can tweak the column widths if needed.

When you tweak the look and feel - don't touch the HTML files - just the CSS and Javascript files.

If you want to test in a browser, download Safari 3 - it's the closest to the iPhone. There's also iPhoney by a third party vendor.

You can also group results on the page and have group headers and group footers with summary statistics. The summary stats can take method calls which let you put anything you want in there.

Cookies are not supported at this point.

At this point think of iPhone support as version 1. It's just about simple reporting - no data entry at this point. But because of their release model (lots of quick updates), you may see new features more quickly than you'd think.

If you want to update the iPhone address book or calendar with data from 4D do it under OS X to iCal and Address Book and then the iPhone will update from there. It's a little clumsy, but it will work.

Labels: , , , , ,

Digg It!  Add to  Add to StumbleUpon  Add to Reddit  Add to Technorati  Add to Furl  Add to Netscape


Post a Comment

Links to this post:

Create a Link

<< Home