Saturday, 7 February 2009

The new Oracle API Builder by WebCom Systems!

Welcome to the new API Builder!

API builderThis simple PLSQL program will...

  1. Save you hours (possibly days or even weeks) of development time.
  2. Contribute to your regular Daily Build architecture.
  3. Provide you with a complete Package per table with all DML (SELECT, INSERT, UPDATE, DELETE) functionality included.

How does it work?

The API Generator creates code from a master PLSQL package and spools the result out to a text file (script.sql)

It then runs this file and creates an entire PLSQL layer to handle all DML functions for all tables in your schema.

Here's the simplified running order...

  1. run api_builder.sql in SQLPlus (or TOAD).
  2. three tables are created to handle all generated code
  3. Base package is created to handle code generation.
  4. Package is run to generate code.
  5. Code is then spooled out to physical file.
  6. File is then run from SQLPlus and packages are created.
  7. Commit!

API Builder API Builder - Working Example

The following is a simple example of how API Generator works.

1. UnZIP and locate all files into single directory.

API Builder

2. Load api_builder.sql script into Toad or SQLplus and run.

API Builder

3. Base tables are created. These tables will contain the generated code.

API Builder

4. Base packages are created. This is where the api packages are created.

API Builder

5. Output is spooled from the base tables to a physical file, output_script.sql.

API Builder

6. output_script.sql is then run and commited to your schema.

7. One package will be created for each table providing all DML functions required to handle data management. There is also a P_UTIL_GLOBAL package created to handle sequences.This package contains functions to get the current and next values for all sequences in your schema.

8. You're done! You can now run this as many times as you like. Either everytime your database changes or as a part of a daily build architecture.

Assumptions

There are some features that must be in place for the API Generator to work.

All tables in our schema must have a corresponding sequence with the suffix "_SEQ". eg. CUSTOMER table has sequence CUSTOMER_SEQ. However, this convention can be changed should you decide to modify the source code.

The API Generator is built and tested on Oracle 10g. Other versions of Oracle can not be guaranteed but will probably work from version 8 onwards.

You must run the API builder from a tool that is able to spool to a physical file. For example TOAD, or SQL*PLUS. Please note that Oracle's SQL Developer DOES NOT spool to files and therefore will not with with the API Builder.


API Builder API Builder - Video Demo

Below is a detailed video demo of the API Builder actually generating an API Package for a table. This example shows exactly how you can implement API Builder for your own software architecture and contribute to your daily build!

The video is in mp4 format (approx 6Mb) and should play with Quicktime or Windows Mediaplayer.
If you need to download it before playing it please right-click here and select "Save file/link"












API Builder API Builder - Frequently Asked Questions

1. How does the API Builder work?

The API Builder is a PLSQL program consisting of 4 SQL files.

One file is responsible for starting the process and setting API parameters. Two of the files create temporary tables and a Master package to create the outputted code. And the fourth file creates the "spooled" output of the code into a file called "output_script.sql".

2. What do I need to run the API Builder?

Obviously you need an Oracle database, preferably version 10g or above. However the code should work from Version 8. (although this is not tested or guaranteed)
The API Builder needs to be run from an Oracle tool which allows you to "spool" out to a physical file.
SQL*PLUS and TOAD have been tested with API Builder and work well. However, please note that Oracle's SQL Developer DOES NOT spool and will not work with API Builder.

3. What version of Oracle is API Builder tested on?

Oracle 10g. We are fairly confident that API Builder should work from Version 8 since the code if fairly generic, but this is not guaranteed.

4. Do you have a walk-through demonstration of the software?

Yes, click here for a full example of the API Builder.

5. How can I purchase and pay for API builder?

API builder can be purchased on this site and paid for through Paypal. Once your order has been received and verified we will send the files to you in an email.
For your piece of mind, WebCom Systems is a VAT registered company (VAT No. 761 9082 17) registered in the United Kingdom.

6. Is a demo download available for API Builder?

Unfortunately not. Due to the Open source nature of the software and the potential need for client customisation we can not provide a demo of the software.
However, this site contains an extensive worked example of how the API Builder works.

7. Once I buy API Builder will it work straight away with my Oracle architecture?

The default setup of API Builder has a number of assumptions which must be in place for it to work. For example, your sequences must have the suffix "_SEQ" in relation to the table they are made for.
It should be noted that the API Builder is a highly customisable piece of software which may need to be modified to work with your own software architecture.
All we can guarantee is that the sample table (CUSTOMER) and sequence (CUSTOMER_SEQ) provided will work with API Builder using default settings.

8. So what is possible with API Builder in terms of my Daily build architecture?

API Builder can potentially generate tens of thousands of lines of code and can become an important component of your daily build.
Our tests, while developing API Builder, included a database schema of 30 tables generating 30 API packages all with complete DML functionality built on a daily routine using ANT.
This level of code generation can potentially save companies 100's of hours of development time.

9. What are the future plans for API Builder?

The future is very exciting for API Builder!
Future versions will include full exception handling (coming soon!), more efficient handling of rowtypes and, most importantly, the inclusion of Unit Test packages for every API generated!

Watch this space!

If you would like to be kept up to date on new developments with API Builder please enter your email address in the Newsletter box on the left hand side of this page.