Monday, July 8, 2019

The change of Static File support in APEX

Over the years the static file handling has been greatly enhanced. Using APEX old APEX versions before 5 you had to handle static files outside of APEX. Many projects handled their static application files together with the APEX internal files in the "i" folder. It was the easiest way because APEX had no integrated file support for custom JavaScript, CSS or Image files. Another problem was the caching and compression. In earlier days the database and the OHS (Oracle HTTP Server) where used together with mod_cache and mod_deflate to support caching and compression.

Since APEX 5 and the introduction into the APEX Listener this technique changed. The APEX Listener which is now called ORDS (Oracle REST Data Service) has now the possibility to handle the static files inside the APEX Workspace or APEX Application in an easy way.
But everyone remembers the first installations of APEX 5 and the APEX Listener. Many times we got problems regarding misconfigurations of the file support and not everyone got the point why we had to configure RESTful Services for an APEX environment for file support.

APEX 5.0: There are issues with the configuration of the Static Files in your environment

Going further to the current version of APEX 19.1 and ORDS 19.1 we now have full support of caching (and cache invalidation) and easy handling of static files inside your Application. If you are still using APEX with static files on the file system here are some disadvantages compared to the files uploaded inside APEX.

  • files on the file system have to be deployed on a seperate way
    • files cannot be deployed without authorization on the file system
    • files can be deployed in the wrong folder
    • files can be deleted or forgotten when moving to a new APEX version
    • files have even to be deployed during development on the server
  • files are cached on client-side, even when they are changed on the server
  • files which are used or even not used are not so easy to identify
  • files are not installed by default when installing a new version of your APEX application
  • files are not exported and saved with your application
Of course some of these problems had been solved during the last years, but overall the best way to handle static files is, by using the integrated support in APEX.

In the next blog posts i will go deeper into that topic and explain how to configure the file settings and how to maintain these files with your favorite editor and APEX nitro.

1 comment:

  1. Hi Oliver.

    I have a small problem when switching to Apex 20.1 (APEX_APPLICATION_TEMP_FILES)
    Can you suggest a solution?

    https://community.oracle.com/thread/4336950

    ReplyDelete