One of our main goals in building the packaged applications has been to avoid the problem which plagues almost every bit of sample code (and yes, I mean every–all platforms, all systems, all everything!)–namely, that samples are inherently not usable, and you need to spend time dissecting them before you can apply their lessons to your real-world issues. Thus, in addition to the Sample Applications, we've built–and continue to build–Productivity Applications, which ought to be usable more or less “out of the box”, as it were. One of the more interesting (to me, at least), is the APEX Application Archive.
One of the most common questions I've run into is, “how do I back up my applications?” Sure, you back up your database, so you could conceivably roll back to an earlier version using that–though I bet your users would come hunting with pitchforks and torches if you made a habit of it. Most of the time, the solution is to set up an automated process which exports your applications and checks them into version control–a system which I highly recommend.
As an alternative (or a supplement), you can use the APEX Application Archive to store your application histories in the database itself. One of the nice things about this is that we can tell if an application has been modified since the last time it was archived, and only archive the ones that need to be–a significant detail which is unfortunately easy to overlook when setting up a nightly backup script.
I do have to point out, of course, that if you unlock the application and look at the processes, you'll see that we're using a so-far undocumented API–a package called APEX_CLOUD_ARCHIVE. This means a couple of things:
- Although we support the APEX Application Archive packaged app, we don't support the APEX_CLOUD_ARCHIVE package. So if you decide to get clever and build something using it–well, good luck. Oracle Support won't help.
- The package may change in future releases. The packaged app would be updated to match, but anything you build on your own that uses it may break. Sorry.
Still, even with those limitations, this packaged application does show some of the power we've tried to build into the Productivity Apps–and like I said at the beginning, it's something that pretty much any APEX environment could use.
If you have a specific packaged app that you'd like me to cover in this series, or suggestions on other applications we should build and include in future releases, please feel free to let me know, either by leaving a comment below, or e-mailing me directly.