Xcode is certainly not the first tool Apple made for its developer community, but it may be the most well thought out tool they have produced. First demoed during Apple’s Worldwide Developers Conference in June, Xcode brings many new technologies to developers allowing them to save time and build better applications.
“The key motivation behind the development of Xcode is really developer productivity,” Wiley Hodges senior product line manager, Developer Products at Apple, told MacCentral. “We took a hard look at every aspect of the software development process and we identified what we thought were the best opportunities to optimize those.”
Improving the User Interface
Apple improved the developer experience in several ways and by using several new technologies. The Xcode team first concentrated their efforts on the user interface and the ways it can help and hinder in the development process.
With the goal of making the interface unobtrusive, they looked within the company for ideas to make the Xcode work for developers. As it turns out, they looked no further than the iApp development team and more specifically iTunes. Xcode will feel very familiar to developers in the way it looks and the way it performs with things like searches, which will allow them to find strings of code very quickly.
Xcode also implemented smart groups allowing a developer to check errors when it is convenient for them, not when the application determines you should.
“The idea was that if you’re in the middle of coding and something happens, you should be able to see that it happened and be able to go back later and look in a warnings and error smart group to find data about the error and act on it,” said Hodges. “The last thing we want to do is distract you from what you are doing at that moment.”
This attention to detail by the Xcode team has not gone unnoticed by the developer community. Applications run anywhere from hundreds to millions of lines of code and being able to do what may seem to be a simple task, like searching, becomes very important to a developer.
“The integration with developer documentation makes it very easy to look up system and framework APIs, and the code indexing and navigation features are great for working your way through large bodies of code,” Bare Bones Software founder and CEO Rich Siegel, told MacCentral. “In my opinion, the no-additional-charge inclusion of these first class developer tools with the OS will only speed developer adoption.”
Faster, faster, faster
One consistent message that came from developers was that they wanted a tool that would build their application faster. Hodges “tipped his hat” to the team that built CodeWarrior saying, “they have done a phenomenal job with compiling applications,” but Apple needed to develop some innovative ways to speed the compile times of its own tools.
With the introduction of three new technologies Xcode can build applications five times faster than their previous generation tools. Even though they are still marginally slower than CodeWarrior using a single machine, Apple beats CodeWarrior using “distributed builds,” which allows a developer to distribute the compile workload across idle desktop computers. Using distributive builds compile times are four or five times faster than they are with a single machine.
Having a tool that will quickly build your application is a huge timesaver, especially when debugging. Typically, when a bug is found in the code, the debugger must be stopped, the code needs to be edited, the changes need to be compiled, the application needs to be re-linked, the debugger needs to be restarted and it runs back to the point where you found the error in the first place.
With the introduction of Fix and Continue, Zero Link and Predictive Compile, that process may be a thing of the past for Apple developers.
Zero Link basically eliminates the need to re-link an application while developing, taking away one of the most time-consuming processes in the development cycle. Xcode uses Zero Link to link together just the necessary objects needed to launch an application.
“The result is that if you’re in the middle of a development build, you probably won’t have to build at all — the link phase just goes away from the process of debugging, said Hodges. “That’s a big win for developers, considering re-linking can account for 10 to 50 percent of the debugging turnaround time.”
Predictive Compile assumes that a developer typing in code will, at some point want to compile the application. While the code is being entered, Xcode begins compiling the application in the background until it reaches the point where the code is being entered — Xcode will wait until the code is finished being input then compile the last of the code.
Finally, Fix and Continue eliminates much of the time developers spend recompiling their applications after finding and fixing bugs in their code. Fix and Continue streamlines the process by enabling developers to make changes to an application while it is still running. Once a mistake is found a developer can edit the code, save the changes and see the effects of the changes running live in the debugger.
“Fix and Continue is absolutely revolutionary,” said Hodges.
Analysts agree that time spent enhancing the developer tools is well spent. Noting that Apple is spending more of its resources on events like the Worldwide Developers Conference than ever before, Technology Business Research analyst, Tim Deal, thinks the company’s efforts will pay off in the future for Apple.
“These developers represent the future for Apple — the OS is only as effective as the applications available to run on top of it,” said Deal. “The number and types of applications available are of critical importance to potential switchers to the Mac platform; Jobs knows this, therefore he is striving to build relationships within the developer community in order to increase value in the platform and secure the company’s future.”
Xcode now and the future
Being a new tool, developers are still putting Xcode through its paces, finding out if it has weak spots and communicating with Apple on ways to make it better. With the new technologies implemented so far, Xcode has been a popular topic among developers.
“There are people looking at Xcode within virtually every Mac development shop out there — it’s garnered a lot of attention from the community,” said Hodges.
But Apple is not waiting for the developer community to come to them; they are actively seeking out feedback to make the Xcode better.
“Xcode is definitely suitable for professional use,” said Bare Bones Software’s Rich Siegel. “We’ve been in close contact with Apple since Xcode was first seeded to developers and they have actively solicited our feedback, to help make sure that Xcode is attractive to long-time Mac developers such as ourselves.”
Apple’s proactive approach may just pay off, as developers consider what tools they need to use in the future. Siegel says Bare Bones Software will definitely be making the switch to Apple’s Xcode.
“We expect that in the not-too-distant future, our entire current product line (BBEdit, Mailsmith, TextWrangler, and Super Get Info) will be built using Apple’s developer tools,” said Siegel.
The future of Xcode is not just Apple’s to determine. While they have ideas to make the tool work better for their developers, they think it’s those same people that will play a large role in where Xcode goes next.
“We are going to listen to our developers,” said Hodges. “Xcode has gotten to where it is today by sitting down and listening to the issues we heard from our third-party developers and we tried to make sure that we were attentive to all of those issues. Part of the answer of where does Xcode go from here is: where do Mac developers want to take the tool?”