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/"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment