SAN JOSE, California – Appearing second in Apple's witness line-up in the Apple v. Samsung trial on Friday, Scott Forstall, Apple's senior vice president of iOS software, discussed all the secrecy, hard work and innovation that went into developing the iOS user interface. Samsung's lawyers, however, took a completely different route, questioning Forstall about the ways Apple compared – and possibly drew inspiration from – competitors like Samsung.

"The investment in building a user interface that could work on this size device with your fingers and touch was immense," Forstall said, using his hands to indicate the size of an iPhone. "I know I personally dedicated years of my life to this, as did hundreds of people on this team. It was very, very difficult."‪

‬"I remember sitting with Steve and some others, and we all had cellphones and hated our cellphones” –Scott Forstall‪‬During testimony, Forstall provided an overview of Apple's operating-system strategy: "The goal of an operating system is to run all of the machine, is to drive the machine," Forstall said. "We wanted an operating system that could last for another 20 years. The operating system that Apple had at the time didn't have those legs. We came up with a strategy that worked really well for [third-party] applications, as well as all the built-in applications. The strategy was a modern operating system."

Forstall, an Apple veteran since 1997, then discussed how Apple decided to embark on the iPhone project.

"I remember sitting with Steve and some others, and we all had cellphones and hated our cellphones," Forstall said, noting that many of them had flip phones at the time. Apple had already embarked on the iPad project at this point. Forstall and his cohorts wondered, "Could we use the technology we'd been using with touch and use that same technology to build a phone, something that could fit in your pocket, but give it all the same power we were looking at giving the tablet?"

The secretive iPhone project was originally called "Purple Project," and the engineers involved weren't told anything about what they'd be working on, or who'd they'd be working for, when they were recruited. The building used for iPhone development was called the "purple dorm."

"We put up a sign that said 'fight club' – first rule of the Purple Project is you don't talk about Purple Project outside those doors," Forstall said, adding the dorm smelled vaguely of pizza, like a college dorm.

Apple attorney Harold McElhinny asked Forstall a series of questions to illustrate the innovation, sweat and tears that went into developing the original iPhone's user interface and touch technology. Forstall described the difference between early, resistive touch screens that existed prior to the iPhone and the capacitive technology that Apple championed. The former require a heavy finger to select items and scroll, while the later demand a much lighter touch.

Forstall referred to developing the onscreen keyboard as "a science project."

"One of [the challenges of this] was everything we dealt with before was based on mouse and keyboard, and here we were changing the entire user interface to be based around touch," Forstall said. "We had to rethink everything about what big controls would be, knowing where you are in the document, knowing when you reach the list.... Every single part of every device had to be rethought for doing touch."

Samsung's attorney Kevin Johnson eventually got his turn to question Forstall. Johnson focused on internal Apple documents to illustrate how Apple looked to competitors, particularly Samsung, for inspiration.

In several instances, Forstall explained that the documents in question were referring to carrier benchmarking – Apple was testing its device's call performance (the number of call drops) against multiple phones to see if a drop was due to the network, or to the phone itself. Forstall noted that benchmarking is completely different from copying.

"It's fine to benchmark for performance reasons, it's not OK to copy and rip something off," Forstall said.

One very interesting piece of evidence was brought up by Samsung's counsel: an internal email between Apple executives talking about the 7-inch tablet size. Referring to the Samsung Galaxy Tab 7 that he had personally checked out, Apple VP of Internet software and services Eddy Cue wrote, "I believe there will be a 7-inch [tablet] market and we should do one." Further along in the email, Cue wrote that Steve Jobs seemed receptive to the idea the last time Cue had mentioned it to him.

Curious indeed.

Apple and Samsung have been duking it out in courts across the globe for over a year. Apple says Samsung is infringing on iPhone and iPad design patents, as well as a handful of utility patents covering UI elements in iOS. Samsung claims Apple is in violation of its essential 3G transmission patent holdings. The jury trial for the case began on Monday. Each party made opening statements to jurors Tuesday presenting their case.

Phil Schiller testified earlier Friday morning talking about the iPhone's iconic design, and how Samsung's products' likeness to Apple's phones and tablets can cause confusion among consumers.