Upgrading to APEX 5

Craig Sykes Oct 27, 2015 1:28:31 PM

I have recently been upgrading our internal applications to APEX 5 and thought it would be interesting to write a blog about some of the issues that initially came up whilst doing so.

To upgrade an application to APEX 5 and keep the original APEX 4 or 3 theme, it is a case of either updating the database directly or importing the old applications into an APEX 5 environment. Both methods give great results, with the applications working almost exactly as they did before. However there are a number of issues that I came across:

Theme

The APEX 4 themes work really well in APEX 5, and if you aren’t developing an application further and don’t require the universal theme features, then it could be worth leaving them as they are. If you are upgrading from APEX 3 though, I found that a number of theme files just weren’t included in APEX 5. I had to redevelop a number of image based buttons into modern HTML buttons and confirm that they worked in all browsers.

Javascript

One of the main issues I came across was the extensive use of JavaScript in old APEX 3 applications. Before dynamic actions, lots of custom JavaScript was needed to make applications function without page submits. After upgrading this JavaScript still works but it makes applications much harder to debug and develop further. Eventually I think that these JavaScript-heavy areas of the system will be redeveloped using native APEX functionality.

Plugins

Any plugins you use in your applications that have been developed for an earlier version of APEX may well have issues in APEX 5. If the plugin is not actively updated by whoever made it then you can either open up the plugin code and try and fix it yourself or redevelop the affected functionality using native APEX 5 functionality.

Universal Theme

If you wish to upgrade your applications and also migrate to the universal theme, you may have to look more closely at the layout of each page, depending on how it was initially developed. Any CSS you have used to position items in your old application may affect the layout and responsiveness of your application.

I have also noticed that there is an issue with how the new APEX 5 applications expect to be laid out compared to how many older applications were made. I have always developed applications with horizontal fields to use up as much screen real estate as I can. The new theme seems to be taking more of a modern web design approach and expecting vertical fields in a small number of horizontal columns.

Because of this, my horizontal forms are taking up more space than the columns available and my pages need to be fixed before they will even render.

Upgrading to APEX 5

To fix this we can change the ‘Default Label Column Span’ to 1 in our template. This will cause fields to take up much less space and so you can run your application without an error.

Further to this, I have had a lot of trouble making any horizontal fields look right next to each other because of the responsive grid being used. I have found that the best solution is to reduce the number of fields on each line and increase the height of your application. Some screens however will look a lot better if they are redesigned with the universal theme in mind, possibly using new features such as modal popups to remove any extra fields from a screen.

These are just the first things I noticed when upgrading my applications – I hope to go into more detail about specific issues in a future blog.

 


 

Author: Craig Sykes 

Job Title: Senior Oracle Development Consultant

Bio: Craig is a Senior Development Consultant at DSP-Explorer. Craig has an MSc in Computing Science and is an experienced software engineer, utilising development tools such as PL/SQL and APEX to provide bespoke ERP software to both UK and international businesses. Craig has experience developing solutions to connect Oracle systems to a wide range of existing external applications within business environments.