Thursday, June 14, 2007

Automating Development Tasks with Automator and Xcode

With Automator, users can graphically assemble Actions—self-contained modules that perform a single task—into a Workflow to create a collection of Actions that

complete a larger task. This Automator functionality is also available to developers for automating workflow in software development projects. This article shows you how to

streamline some of the tasks you face in development projects by writing custom Shell Actions and Workflows.
Automator Advantages for Software Developers

Most development projects have repetitive tasks that would benefit from automation: checking code into and out of a version control system, running an automated test

suite and capturing and verifying the results, and parsing run-time logs for errors. A common way to automate these tasks is by writing shell scripts or scripts in Perl or

Python; however, Automator provides some advantages over scripting languages for task automation.

Well-written, self-contained Actions are inherently reusable, so development teams can build up libraries of general-purpose, development-based Actions, then quickly

“snap” them together into Workflows that fit their needs. The graphical construction process makes Workflow construction less error prone than writing in a scripting

language and easier to use than remembering cryptic command-line options. Everything you do is visual and therefore easier to visualize and remember.

Another advantage is that Actions can directly access Mac OS X application services, system resources, and frameworks—a task that can be much more difficult with

scripting languages. This direct access enables you to produce richer and more powerful workflow solutions that take advantage of the strengths of Mac OS X.
Automator Benefits Compared with Scripting Languages

The traditional view of a Macintosh is a set of self-contained programs that you use for different tasks. Applications, UNIX commands and programs, and system

frameworks and resources are, for the most part, independent of one another, and the user accesses application services by running a program and interacting with its

features through its GUI. Then the user moves on to the next program and imports the work, and so forth.

Rather than moving among different programs to solve a task, a more powerful method is for users to create new programs by combining the functionally of existing

programs and system services. One way to accomplish this under Mac OS X is to use AppleScript or another scripting language (as long as programs are AppleScript

enabled or provide a command-line interface). However, this method requires learning how to script and understanding the functionality that applications export—and that

can vary widely among applications.

Since Automator Actions can directly access Mac OS X application services, system resources, and frameworks, you can assemble workflows quickly and easily. You

can also integrate scripting into your Actions to get the best of both worlds.

With Automator, you can easily create custom solutions from existing functionality. In this model (see Figure 1), your Macintosh becomes an array of services

encapsulated in application programs, system frameworks, and resources.

NOTE:ALL THESE VALUABLE CONTENTS ARE TRULY GATHERED FROM THE LINK
"http://developer.apple.com/tools/"

UNIX FOUNDATION ON DEVELOPER TOOLS

Shell scripting

With its Open Source, UNIX-based foundation, Mac OS X Tiger lets you script with your choice of languages: Perl, PHP, Python, Tcl and more. You can work with built-in

development tools such as GCC, gdb, vi, emacs and pico and take advantage of UNIX shell tools such as grep, chmod, ps, crontab, top and tail. If you’ve written utility

software on another UNIX platform, you can quickly get it running in Mac OS X Tiger.

In addition to leveraging the gamut of UNIX tools, you can easily extend the power of your software by using QuickTime’s complete multimedia architecture, including

support for Flash 4, Cubic VR, RTP/RTSP video streaming, MPEG and a wide array of graphic file formats.


NOTE:ALL THESE VALUABLE CONTENTS ARE TRULY GATHERED FROM THE LINK
"http://developer.apple.com/tools/"

DEVELOPER TOOL Mac OS

Mac OS X provides you with a full suite of free developer tools to prototype, compile, debug, and optimize your applications, speeding up your development cycle. Xcode,

Apple's integrated development environment, can be used with either Java or the Cocoa and Carbon frameworks. Mac OS X also provides a wide selection of open source

tools, such as the GNU Compiler Collection (GCC), which is used to build Mach-O programs, the native runtime environment of Mac OS X. In addition, Apple provides tools

for analyzing application performance. The OpenGL tools allow you to monitor OpenGL applications and easily construct shaders. Mac OS X's streamlined approach to

developer productivity decreases your most common and time-consuming tasks by fusing familiar user interface concepts with a unique mix or performance strategies.

Xcode 2.3 includes a robust set of tools, a complete set of developer documentation, and a host of utilities to assist you in the software development process. Xcode Tools

includes the Xcode application, which integrates most of the tools that you use for day-to-day development into a single customizable interface. Xcode features, such as

Zero-Link, Fix and Continue, and distributed builds, decrease turnaround time and shorten the development cycle. Code Sense increases productivity by providing easy

access to information about your code. Underlying the Xcode application is a solid foundation of industry-standard tools, including the GCC and the GNU Debugger (GDB).

Xcode also includes dead-code stripping, code completion, and user interface and source code management enhancements.

Interface Builder is the easy-to-use graphical editor for designing and managing every aspect of Aqua-compliant graphical user interfaces. Interface Builder stores your user

interface design in one or more resource files, called nib files, which contain a representation of a set of interface objects and their relationships.

AppleScript Studio is a powerful tool for quickly creating native Mac OS X applications that execute AppleScript. Taking advantage of features from Xcode, Interface Builder,

the Cocoa application framework, and AppleScript, your applications can support both the Aqua user interface and control scriptable applications and scriptable parts of the

operating system. Because it provides the ability to quickly create such applications, AppleScript Studio is an ideal tool for system administrators.

Xcode's performance tools, including Sampler and Shark, can help you debug your code, gather metrics, identify and eliminate bottlenecks in your code, and provide a

mental model of the inner workings of your code, giving you the information you need to make your program run faster. Some of the performance tools are applications with

graphical user interfaces and others are command-line utilities that must be invoked from the Terminal application or, less invasively, through ssh or telnet from a remote

machine.

Mac OS X also supports OpenGL tools. The OpenGL Profiler monitors a running OpenGL application and collects a variety of data pertaining to the application's use of the

OpenGL library, such as function call frequency and performance overhead. For those who like to be closer to the metal, the OpenGL Driver Monitor is capable of

monitoring a large set of low-level statistics that pertain to the operation of the Graphics Processing Unit (GPU). To assist you in the creation of complex shaders, which

perform calculations at each vertex or pixel, Mac OS X provides the powerful and useful OpenGL Shader Builder tool.

Xcode combines a high-performance, UNIX-based development environment with a groundbreaking user interface to deliver Mac OS X native applications. By using the

Xcode IDE, Interface Builder, AppleScript Studio, and Xcode's performance and optimization tools, you can dramatically decrease the development time needed to create

high-quality applications.

If you are ready to begin learning about the tools available on Mac OS X, go to Getting Started With Tools, for a guided introduction and learning path.

NOTE:ALL THESE VALUABLE CONTENTS ARE TRULY GATHERED FROM THE LINK
"http://developer.apple.com/tools"

GOOGLE SEARCH

Google
Add to Technorati Favorites