The iPhone has also attracted an enthusiastic community of independent software makers that have created about 40,000 free or low-cost applications for the devices. Apple now celebrates that wide range of programs, from flight simulators to spreadsheets, as one of the major differences between the iPhone and competing systems.

Apple’s goal for next week: to keep the energy, momentum and spotlight focused on the iPhone and away from its rivals, like the new Pre from Palm, a well-reviewed new phone that goes on sale Saturday.

Apple is expected to use its keynote presentation on Monday to demonstrate the new types of programs that can be created on the latest version of the iPhone’s operating system.

Developers will be able to charge for certain features within their programs (perhaps a new level within a game), and applications will be able to send alerts to users even whey they are not actively running. Apple has also said it will show an early version of its latest operating system for the Macintosh, dubbed Snow Leopard.

But talking about new software can be dull. So analysts point to Apple’s need to surprise its fans, and to its dwindling inventory of iPhones in stores, and predict that Apple will introduce a new iPhone model next week as well. Its new tricks could include the ability to record video and an internal compass that will add extra intelligence to the device’s awareness of its location.

“Apple’s objective will be to clearly and strongly show why the iPhone platform is the best for developers, and that means there’s a high probability Apple will announce one or more phones at the conference,” said Michael Abramsky, an analyst at RBC Capital Markets.

Satisfying its large audience of developers may be Apple’s most significant challenge. They want to know they can build profitable businesses even if they focus exclusively on the iPhone, and that Apple will continue to do its part by wooing consumers with compelling new gadgets.