Tyler Muth’s Blog

Technology with a focus on Oracle, Application Express and Linux

APEX Packager Utility

Posted by Tyler Muth on February 2, 2010

I’ve been working on a pretty substantial APEX application with Jason Straub and Sharon Kennedy for the last x months (where x > estimated time). It will likely be an APEX Packaged application which consists of the APEX Application, DDL scripts for all schema objects, and install scripts for ~20 image / JavaScript / CSS files.  The process of creating a build is just painful.  It involves way too much point and click and way too much time. I’m not faulting the APEX team for this, as very few people create packaged applications and their time is much better spent on other features (and there are a ton of cool features in 4.0). So, I’ve always had it in the back of mind that I should have learned Perl as it’s very versatile language and really shines where my primary skill-set of SQL, PL/SQL, and JavaScript falls flat.  Perl was designed to work with files and this problem was all about files. There’s no better way to learn a new skill than to have a real project to apply it to…

So, I set aside some evenings a few hours on the weekend here and there and wrote the APEX Packager.  Here’s the description from the project page in case you don’t have an OTN account:

APEX Packager is a utility written in Perl to create APEX Packaged Applications (examples, documentation). It’s goal is to automate the process of adding supporting object scripts such as PL/SQL packages and table DDL, and to automate the process of adding images / JavaScript / CSS to an application. The manual process for each of these steps requires the developer to upload each script and image individually. In the case of images, an additional step is required to generate the hex-encoded version of the image as a script, then upload that script as a supporting object. Once properly configured APEX Packager will automatically perform both of these steps offline without uploading any files. A test-case of APEX Packager was to take a moderately sized APEX Application, 25 DDL scripts, and 1000 images and package them into a single application in 7 seconds.

APEX Packager WILL NOT generate your DDL scripts for you or reverse engineer a schema. This process is better suited for tools like SQL Developer or Data Pump Export.

This utility consists of 2 perl files: apex-packager.pl and config.pl. apex-packager.pl takes in 1 argument which is the config file. This allows you to create different config files for different applications / scenarios and simply pass in the config file when you run the script.

It’s definitely not for everyone. I suspect the primary audience will be the APEX Team and any of the APEX experts that are producing example applications or applications delivered to customers. If you’re new to APEX, this is not for you.  There are a million other resources and utilities you should focus on first.

As a final thought, keep in mind this was my first adventure in Perl. Please don’t use the code as an example of best practices. If you know Perl, I’d love to get your feedback and suggestions.  Even better, please join the project and contribute! I can honestly say this will not be my last Perl utility.  It was such an easy language to learn and there are so many CPAN modules I’d love to explore…

9 Responses to “APEX Packager Utility”

  1. Hi Tyler,

    This is definitely useful. Another great work of you!
    Just for completeness I want to point out that people who are already having their static files, css and images uploaded in the Shared Components of APEX, for them it’s a lot easier to add them (as hex) to the supporting objects.
    You find that under Supporting Objects > Installation Script > Create > Create Scripts to Install Files
    There you can just select the files you want and say to create a script. It will automatically create the script and add it to you supporting objects.

    Thanks,
    Dimitri

  2. That’s a nice utility you have build there!

    To make the life of an APEX developer even more productive, I hope that this utility will be incorporated in the product someday soon.

  3. […] APEX Packager Utility « Tyler Muth's Blog […]

  4. Jari Laine said

    Hi Tyler,

    It seems Oracle sample code site was decommissioned where this utility was hosted.
    Is it possible still get this code?

    Regards,
    Jari Laine

  5. Howdy! Quick question that’s completely off topic.
    Do you know how to make your ite mobile friendly?

    My website looks weird whgen viewing from my phone 4.
    I’m trying to find a template or pluggin that might be
    ablle to correct this issue. If you have any recommendations, pease share.

    Thanks!

  6. google.ca said

    Greate post. Keep posting such kind of info on your blog. Im
    really impressed by it.
    Hello there, You’ve performed an incredible job. I will certainly digg
    it and in my view recommend to my friends. I’m sure
    they will be benefited from this web site.

  7. Hi there! Would you mind if I share your blog with my myspace
    group? There’s a lot of folks that I think would really enjoy your content.

    Please let me know. Many thanks

  8. This is very interesting, You are a very skilled blogger.
    I’ve joined your rss feed and look forward to seeking more of your excellent post.
    Also, I have shared your web site in my social networks!

  9. Leland said

    Thanks , I’ve just been searching for info about this topic for a long
    time and yours is the greatest I’ve found out so far.
    But, what in regards to the bottom line? Are you positive about
    the supply?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: