There are many tools you can use to improve your PL/SQL development productivity. Table 6.2 shows some of the more popular, along with the web sites where they can be found, so you can download and experiment. In the following subsections, we'll look at two of the most helpful tools, TOAD and PL/Formatter.
Tool | Web Site |
---|---|
In the bad old days, developers wrote their PL/SQL programs with a text editor like vi or Notepad, then compiled them with SQL*Plus. If the program failed to compile because of a syntax error, about the only tool you had to help track down the error was the SQL command:
SELECT * FROM user_errors
Even then, you got little more information than a generic Oracle syntax error and an approximate line number where the error might have occurred. You had to go back to the code and hunt and peck to find the problem. It could take hours to track down a misplaced quote mark or a misspelled keyword (ELSEIF instead of ELSIF was really hard to find).
Fortunately, third-party PL/SQL editors like TOAD (Tool for Oracle Application Developers) have changed all that. TOAD is a SQL and PL/SQL editor, object browser, query analyzer, and table data editor (finally, a tool that lets you enter data into a table in spreadsheet format!) all rolled into one. Figure 6.1 shows TOAD's PL/SQL editor.
Frankly, TOAD is awesome, and if you're doing any Oracle development, whether related to the Web or not, it's a must-have tool. Perhaps the most unbelievable thing about TOAD is that you can get it for free! Originally written by Jim McDaniel ("The Toadman") as freeware, TOAD is now fully supported by Quest Software, a maker of other Oracle tools. The downside is that the free version is no longer being updated with new features, so it doesn't support the new Oracle8/8i features. However, free is a very reasonable price! You can download the freeware version from http://www.toadsoft.com, and the commercially supported version from http://www.quests.com/toad/toad_info.html.
PL/Formatter, another productivity tool, is a PL/SQL code formatter from RevealNet (http://www.revealnet.com). PL/Formatter "pretty-prints" ugly, mangled code into the format recommended by Steven Feuerstein, the guru of PL/SQL development.
In addition to just satisfying your aesthetic sensibilities, well-formatted source code helps make your programs more readable and maintainable. Figure 6.2 shows PL/Formatter in action; the top half of the screen shows the original code and the bottom half shows the code after it's been reformatted.
Copyright (c) 2000 O'Reilly & Associates. All rights reserved.
This HTML Help has been published using the chm2web software. |