5 Things I wish I knew about APEX when I just started (part 5)

Using Advisor to increase the quality of your application.

For the last post in this series, I want to end with something that will help you improve the overall quality of your apex applications. That something is called: “advisor”.

The easiest way to access advisor is through the edit page. If you press the “utilities” button, and then select the option “check”, you will end up in an advisor report for the current page.

The report will – for example – tell you when you are using page items that don’t exist, or when some of your processes have invalid code in them.


The other method to get to advisor is through the application page overview screen.

Click the utilities button and then advisor and you will end up on a page with all the checks that can be performed on your application.


It’s useful to run advisor every once in a while, especially when you are making or modifying applications to maintain the quality level of your application.

Pre-Apex 4.0

The built-in advisor is only available in Apex starting from version 4.0. However, for older versions of Apex there is an alternative, viz. a tool made by Patrick Wolf, called… “advisor” ;) .

You can download this tool and find some more information about it on: http://essentials.oracleapex.info/

Migrate to the Oracle Database Cloud Service

On the 6th of October the Oracle Cloud Day 2015 takes place in The Netherlands. iAdvise is proud to be a bronze sponsor on what promises to be a day filled with interesting sessions.

One of the main topics will be the Oracle Database Cloud service. In this blog post, which was published in the OGh Visie earlier this year, you can read what the Oracle Database Cloud Service is, which configuration possibilities there are and what steps are needed to migrate.

Oracle Database Cloud Service

Suppose you want to start with the Oracle Database Cloud Service tomorrow, what options are there? What services are there, and what do they do? Below you will find the 3 services available. In the future, Managed Database as a Service will be added to these services.

Database Schema Service

Interesting to know is that, already since 2012, you can use the Oracle Cloud, namely through the Oracle Database Cloud Schema Service (ODCSS).  It was – and still is- possible to get a database schema in the Oracle Cloud, on an 11g database that is fully managed by Oracle. You can connect to this schema through: SQL Developer, RESTful Web Services, Oracle Java Cloud or
Oracle APEX.oracle_database_cloud_scheme_service

However, there are some limitations. You have no SQL*Net access, so you can only use SQL Developer (or APEX) to connect to your cloud database schema. You can do this through a so-called “Cloud Connection”, but need to know that you can only browse and load/unload data. So, not really convenient for development purposes. In addition, you cannot “connect” multiple schemas with each other, and packages such as: utl_smtp, utl_ftp and features as VPD (Virtual Private Database) are not available.

If you don’t mind these limitations, ODCSS is a very budget-friendly solution. Starting at $175 per month, you have an Oracle database in the cloud with 5GB storage available

Virtual image

Are you looking for a cloud environment where you can install and manage your databases yourself, then the virtual image option might be something for you. You get a dedicated VM on which you can install an 11g or 12c database, either manually or through the Database Configuration Assistant (DBCA). Unlike with the ODCSS, you have SQL*net access and full access to the VM.

You get the choice whether you want to pay per hour or per month. From $400/month or $0,672/hour you can get started with SE 1.

Database as a Service

If you choose the Database as a Service, you have the same possibilities as with the virtual image option, but in addition you have a number of nice tools at your disposal. So you can create a database instance in 4 easy steps thanks to Oracle’s automatic provisioning system. In addition, you have a number of cloud tools to maintain and monitor your database very easily.

You can start with the Database as a Service for a SE1 database from $600/month or $1,008/hour.

Setting Up the Oracle Cloud Database as a Service

Database instance

For the creation of an Oracle database you have a simple wizard. This initiates the automatic provisioning of your database.  The provisioning ensures that your database is installed with cloud tooling technology and it configures the backup facilities.


The 4 steps that you must follow are:

  1. Choose your service: Virtual image or Oracle Database Cloud Service
    How do you want to pay: hourly or monthly?
  2. Choose your database version: 11gR2 or 12c?
  3. Choose your edition: SE1, EE, EE High performance, EE Extreme performance
  4. Choose the name of your instance, your compute shape (number of CPUs) and connect an SSH key to access to your VM.  Set a number of database configurations: how much storage you need, SID, and – in the future also a possible – a fail over database. If you also choose for Backup and Recovery, you select the storage container here.
    Then simply confirm, and you’re done! Fifteen minutes later you have a fully functioning database instance in the Oracle Cloud and access to a dedicated VM.


Backup & Recovery

When you choose the Oracle Cloud Database as a Service, you also have the necessary cloud tooling technology to simply set up the desired backup options.

If you’re only interested in a local backup, then the block store only option will do. During the provisioning of the VM, some additional disk space will be configured for the backup, by default 1.7 times the required database data volume. Through a combination of the familiar Oracle RMAN and classic system management tools, nicely packaged in a command line API, not only your database but also important system files are added to the local backup.

If you want full protection for your VM, then your best option is to choose the block store and cloud storage option. This option presupposes that Oracle Cloud Storage as a Service is purchased and configured. With a few simple commands, you will then be able to restore your full VM instance, including system files and configured Oracle database, into a new VM.

Both systems follow a series of Oracle’s best-practice guidelines and can be expanded and adapted to suit your needs.

Do you want your on-premise Oracle database(s) or Oracle database(s) that were created in an Oracle Cloud Database – Virtual image instance, also to be backed up in the Oracle Cloud, then you can set this up via the Oracle Cloud Backup as a Service. This service only relates to the storage of Oracle database backups. Do you also want to back up other types of data in the Oracle Cloud – for example, important system files – then you can do the setup through the Oracle Cloud Storage as a Service. In that case you are responsible for setting up the necessary backup policy.

Access rules

Who has which access to the Oracle Cloud Database as a Service?

Each Compute Cloud Service VM, child to the Oracle Cloud Database as a Service, is shielded from the angry world through so-called access rules. These are firewall rules that check the access to the VM specific protocols, such as HTTP(S), SSH or SQL * Net access. In these rules you define what source groups of VMs (network groups) or lists of IP addresses on a specific protocol may connect within a certain target group of VM(s).

When creating an Oracle Cloud Database as a Service instance, by default, 7 Oracle Compute Cloud Service access rules are created. These access rules control access to SSH (port 22), Enterprise Manager Database Control (port 1158), Enterprise Manager Database Express 12c (port 5500), Database listener (port 1521), Glassfish Server admin console (port 4848), HTTP (port 80) and HTTPS (port 443). The last one is necessary for accessing the Oracle REST Data Services, Oracle APEX and Oracle Cloud on-instance database monitor.

Only the SSH access is standard enabled. The other access rules must be explicitly enabled after creation.


Migrate to the Oracle Cloud

Have you decided to use the Oracle Database Cloud Service? Nice, but now you probably want to know what steps are needed to get your current on-premise environment in the cloud. And that happens to be one of the strengths of the Oracle Cloud: because you have full access to your dedicated cloud VM, you can tackle the migration in different ways.

For the migration of OraEvents (an application we build for Oracle) we used the classical method: an Oracle Data Pump export (expdp) of the on-premise database and an import (impdp) into the cloud database. The steps we went through are:

  • Expdp of the database schema
  • Copy the expdp DATA_PUMP_DIR directory to the Oracle database
  • Preparing the database – create new tablespaces, user schemas and assign the necessary rights
  • Import the expdp into the new database schema
  • Export and import of APEX workspace and applications
  • Copy the APEX images in the default DocumentRoot of the Glassfish server running the ORDS
  • Ready for testing!


If you decide to migrate to the Oracle Cloud today, you have a range of options available to ensure that your cloud database is more than just a replacement for you on-premise database. The automatic provisioning, powerful cloud tooling and integrated systems offer a great extra value. Because migrating to the cloud is very similar to a classic migration, there are no major objections from a technical perspective. The Oracle Cloud is ready. Now, it’s up to us!

5 Things I wish I knew about APEX when I just started (part 4)


Ever deleted or changed something by accident in your application and wished you could get it back?

You can! The oracle database has a feature called flashback, and APEX can take advantage of this feature. (Flashback needs to be enabled on the database, if you are not sure if it is enabled on your database, you can always ask your DBA).

Today I will show you some of the different places, where you can recover lost work.

Page items

Create a new application and a blank page. On that page add a region and some items.
Now delete one and modify some.
To undo the changes that you made, you can click the export page button. You will then see the following dialog:


In the field “As of” enter the time in minutes that you want to go back and export the page.
If you now import the page again you will notice your items are back.
This method can be used for any page component (regions, buttons, items, dynamic actions…)

Regions & Processes

For modified regions and processes there is another feature that you can use. Suppose that you have modified your process or region code, and then you notice that something is no longer working and you want to go back to what it was before… You can do this by opening your region or process.

On the right-hand side of the page in the tasks block, you will see a link “undo region/process source”, click it.


You will now get a popup with a select list showing all the times you modified something. Select the one you want, and press the set button. Next, click the past source text, to copy it to your region.



If you deleted the entire page by accident, there is still no reason to be worried. There is also a way to go back in time and get your page back. For this, you go to the screen where you export your application like you would usually do, and you will notice the “as of” field is also available there.



And what if I deleted the entire application? Well then it’s time to start panicking….. Then calm down again, and do the following. Download SQL Developer and open the schema where your application is in and execute the following code:

Exec dbms_flashback.enable_at_time(SYSTIMESTAMP – INTERVAL ‘10’ minute);

You should now notice your application has reappeared in the list of applications in SQL developer:


Now export your application by right clicking it. Select “quick ddl” and then save to file. You now have an export file of your application that you should be able to import again trough SQL Developer/APEX.

Please don’t do this for fun in a production environment to scare your boss, you never know if something might still get broken :)

But at least now you know the option is there, should you ever need it.

Also check out my previous post about build options.

Functional programming a brief introduction to Scala

In this blogpost I’ll try to explain on a very basic level what functional programming (FP) is about. look at is as an introduction to the amazing world of FP. FP is already here for quite a few decades. It was mostly used in the academic world and specialized industries. Since the coming of Scala http://www.scala-lang.org, FP became more and more mainstream.

So what is functional programming?

(from Wikipedia http://en.wikipedia.org/wiki/Functional_programming) In computer sciencefunctional programming is a programming paradigm, a style of building the structure and elements of computer programs, that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions. In functional code, the output value of a function depends only on the arguments that are input to the function, so calling a function f twice with the same value for an argument x will produce the same resultf(x) each time. Eliminating side effects, i.e. changes in state that do not depend on the function inputs, can make it much easier to understand and predict the behavior of a program, which is one of the key motivations for the development of functional programming.

Installing Scala

I’m using the scala Read-Evaluate-Print-Loop (REPL) to show you the examples. It’s basically a Scala commandline interpreter. Just get the latest version of scala and install it. To get started with scala REPL, open a command prompt or terminal session; go to the directory where you installed scala and further to the bin directory. Enter the command scala or ./scala and you’re ready to go!


Scala Command line REPL


Scala is a programming language that mixes paradigms of both FP and OO. Scala uses its own compiler (scalac) to compile your code to byte code. Probably the biggest advantage of Scala is that it runs on your standard java infrastructure. It is even capable of calling your java code and visa versa although you need to take special care when integrating both languages. It’s functional As the name already states, functional programming allows the developer write your code on a functional level. In other words you don’t have to translate your functional solution to a lower, technical, level. If I want to know the outcome of: all even numbers between 1 and 10 and multiplied them by 2, you write in Scala

(1 to 10).toList.filter(_ % 2 == 0).map(_ * 2)

While in java it looks more like this

List input = {1,2,3,4,5,6,7,8,9,10}.toList();
List results = new ArrayList();
for(int val : input) {
  if(val % 2 == 0) {
    results.add(val * 2);
return results;

Looking at the Scala code you will notice a few things.

  • The code is expressive and readable. No clutter, no unnecessary boiler plate code.
  • There is no assignment of variables (stateless)
  • Functions (_ % 2) and (_ * 2) is added as argument to a method
    • The underscore (_) represents a wildcard. In this case, each element of the list


Scala, as all functional languages, is an expressive language. But what does it mean? First of all, it makes your code much more readable. You almost program what you say. A friend of mine, who’s working in the travel business, understood a Scala code snippet, while the java counterpart was Chinese for her. Is this important? Yes, if you know that code is read 10 times more than written.
Secondly expressions return values. Which can lead to less code.

Boilerplate code be gone!

The guys from Scala did their best to make the code as clean as possible. Every character unnecessary to run your code can be made obsolete. This includes ( ) for zero argument method calls, semi colons ‘;’, points ‘.’ etc… The scala compiler is quite intelligent and will do all the hard work for you to convert the dense code into the full-blown byte code.

Values and variables

var myName = “Ief”
myName: String = Ief

As you can see, it is not mandatory to define a type. Still Scala is strongly typed and knows that it is a String. Strongly typed means that you don’t need to define types a lot. Confused?

val myName = “Ief”

is the same as

 val myName : String = “Ief” 

Once the type of a variable or value is assigned you don’t need to repeat it again. Val represent a value, a final variable named ‘name’ of the type Sting with only an accesor method (getter).

var myName = “Ief”

Is a variable named name of the type String with an accesor method (getter) and a mutator method (setter)


A class Person with a variable name and a value surname would look like this in Scala

 class Person(var name : String, val surname : String) 

While the java counterpart would look like this

public class Person {
  private String name;
  private final String surname;

  public Person(final String surname) {
    this.surname = surname;

  public String getName();
    return name;

  public void setName(final String name) {
    this.name = name;

  public String getSurname();
    return surname;

You can instantiate the class using the following code

val me = new Person(“Ief”, “Cuynen”)
me: Person = Person@4d826d77

res7: String = Ief

me.name = “Jef”
me.name: String = Jef

res8: String = Cuynen

me.surname = "Peeters"
res9: error: reassignment to val

You probably noticed that for zero argument methods you can skip the ( ) Scala is packed with syntactic sugar. A few more examples:

Regular expressions can be created just by calling the r method on a String

val regularExpression = “[0-9][a-Z]”.r

A Range of numbers from 1 to 10

1 to 10
res11: scala.collection.immutable.Range.Inclusive = Range(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)


Functions are defined using the def keyword. Every function returns the value of the last statement of the function, even without an explicit return statement. It is even possible to return a new function as return value.

def addOne(x: Int): Int = x +1
addOne: (x: Int)Int

res12: Int = 3

In scala it is also possible to return multiple values in 1 go by using tuples. Tuples are a way to group different values of different types into a single container without creating an explicit class.

def printStuff(x : Int): (Int, String)  = (x, "Hello number " + x)
printStuff: (x: Int)(Int, String)

res13: (Int, String) = (1,Hello number 1)

Functions can be used as arguments for other functions. This way it is possible to add behaviour.

def isEven(x : Int): Boolean =  x % 2 == 0
def isUneven(x : Int): Boolean = x % 2 == 1

(1 to 10).filter(isEven(_))
res20: scala.collection.immutable.IndexedSeq[Int] = Vector(2, 4, 6, 8, 10)

(1 to 10).filter(isUneven(_))
res21: scala.collection.immutable.IndexedSeq[Int] = Vector(1, 3, 5, 7, 9)

Using functions as arguments greatly reduce the need for subclassing. Normally a subclass is used to ‘bind’ different behaviour to the same interface. By using functions as arguments, the behaviour is injected into interface.

Functions can be even combined into other functions which are called high order functions.


Using null values is FP and Scala is a very bad practice. When you think about it, null values are pure evil in any programming for that matter. They cause unwanted side effects and you need to always check for null values to prevent NullPointerExceptions. Within Scala you can use the Option counterpart which is a decent way to solve the null evilness.

scala> def convertToInt(x: String): Option[Int] = {
     |    try {
     |        Some(Integer.parseInt(x))
     |     } catch {
     |        case e: Exception => None
     |    }
     | }
convertToInt: (x: String)Option[Int]

This function parses a String to an Int. In case the String can be successfully parsed, the Int value is returned (Some). In case an exception is thrown, None is returned

scala> convertToInt("1")
res22: Option[Int] = Some(1)
scala> convertToInt("abc")
res23: Option[Int] = None

To get the actual value, the getOrElse function can be called on the Option.

scala> val x = convertToInt("1").getOrElse(0)
x: Int = 1
scala> val x = convertToInt("abc").getOrElse(0)
x: Int = 0

Another way to get the value of the Option is to use a matcher.

scala> convertToInt("1") match {
     |     case Some(x) => println(x)
     |     case None => println("That String was not really an Int was it?")
     | }

scala> convertToInt("abc") match {
     |     case Some(x) => println(x)
     |     case None => println("That String was not really an Int was it?")
     | }
That String was not really an Int was it?

Pattern matching

You already saw above what you can do with a matcher. Look at it as the Java switch on steroids. It can match about any everything.

scala> def matchThis(x : Any) = x match {
     |     case 1 => println(1)
     |     case s : String => println("Match String " + s)
     |     case _ => println("whatever")
     | }
matchThis: (x: Any)Unit

scala> matchThis(1)

scala> matchThis("abc")
Match String abc

scala> matchThis(true)


One of the caveats is that the java compiler does not compile scala and the scala compiler does not compile java. So 2-way dependencies probably lead to a big headache.

5 Things I wish I knew about APEX when I just started (part 3)

In my previous post of this series, I talked about cookie sharing in APEX. The next post in this series is about build options, I hope you enjoy it.

Build Options

Imagine having to release an apex application, but you don’t want some parts released in to the production environment yet, because they are unfinished, or not tested. Or you want to disable a module in your application for some reason.

Apex provides a solution for this called build options.

You can find the build options under shared components > logic > build options

Let’s create 2 build options:

The first one will keep the component active in our development environment, but will disable it on export so the developed content is disabled in our production environment.


The second one will disable content in the application, and take over this behavior on export to our production environment.


For the status there are two options possible:

Exclude, will disable the content in the current application, and include will keep it enabled in the current application.

For the default on export there are 3 possible combinations:

Same as current will take over whatever has been chosen in status when exporting a page. Exclude will disable the components on export of the application. Include will enable the components on export of the application.

Build options can be attached to any component in apex: pages, processes, regions, items, and can be found under the configuration tab when editing the components.


As a test you can put the 2 build options on some page items in your current application.

When you run the page you will notice that in your development environment, one item will be visible and one will be gone from the page.

When you take an export and import it back in the new environment you will notice both items are removed from the page.

That’s it! The fourth blog in this series will be about recovering applications and page elements using flashback, and will be online soon.

OGh APEX World 2015

DSC_9284-001 (800x533)

iAdvise Diamond Sponser APEX World 2015

After 5 successful earlier editions of the APEX World day, they chose a different venue for the 2015 edition. The ship SS Rotterdam was the setting for the annual APEX World event. For us, it was not only the location that was special, we were also official Diamond Sponsor of APEX World 2015! And a great day it was! Not only to meet a lot of nice people from the Benelux APEX community, but also for the great sessions that have provided us with a lot of inspiration for the upcoming period. It was really an honour for us to be the Diamond Sponsor this year.


Like previous years, the day started with a short opening. This year, Reinier van Grieken, vice president and managing director of Oracle Netherlands was invited to do the opening. He emphasized that the OGh did a great job by welcoming such an enormous audience, which continued to grow over the past 5 years (more than 400 visitors this year).

In this overview we will take you aboard the SS Rotterdam on the 25th of March, so if you missed it, you’ll still get the highlights. And if you were there, you can look back on a great day.


Keynote: OraEvents – Stijn van Raes (iAdvise) & Yves van Looy (Oracle Belgium)

Stijn van Raes at APEX World 2015

Stijn van Raes at APEX World 2015

In an entertaining presentation the speakers told us about how Oracle and iAdvise created the situation of a supplier – customer – supplier – customer. iAdvise was hired to build the OraEvents application for Oracle (www.oraevents.eu). The architecture of this application makes it possible to collect data about the interests of registered users. In some situations this can be a huge advantage. For example, there was a situation when Oracle organized an event but it was really hard to get enough attendees. Oracle Belgium searched in the database of OraEvents and in half an hour they filled up the event.

At the end of this keynote, iAdvise wondered what could be possible features in future APEX versions (like  APEX 6, APEX 7 or even later). Thoughts about single page web applications, Node.js integration and Source Control were brought to attention. iAdvise hopes that the APEX community will think about these possible features and bring over these ideas on  https://apex.oracle.com/vote or the newly formed linkedin group http://goo.gl/L9DirJ


APEX suitable for high volume environments – PostNL & Fiton

Fiton and PostNL developed an application to process postal orders in a very easy and quick manner. Not only national but also international orders can be handled with this system.

Basic and simple APEX functionality was used to enter barcodes in a system which looked like some kind of wizard. Only 4 APEX pages were developed, besides a login system. The application was based on Theme 13 in APEX. The part of the system that takes care of printing invoices was built as a Java applet. The philosophy of this client case was: “Less is more”. Keep your application as simple as possible.


Oracle Forms to Oracle Application Express migration – iAdvise (Yvonne van Dorst) and Robeco (William de Vries)

Robeco decided to migrate 7 applications which had been developed with Oracle Designer. These applications have to be compatible with at least an Oracle 11g database and will need to have a distinct corporate identity. APEX turned out to be the best tool. In the beginning Robeco and iAdvise started to migrate 3 applications with the intention of migrating 4 more applications in the future. For Robeco it was very important to use one template for all applications. This could be realized by an APEX theme developed by iAdvise based on bootstrap in combination with a JavaScript framework.
All 7 APEX applications were developed in a period of 3 months. The business has become APEX minded and almost all questions are more or less like: “Can we do this in APEX?” The answer in most cases is: “Yes we can!” Robeco is a very satisfied APEX customer.


Design of good-looking, flexible and responsive applications – iAdvise (Menno Hoogendijk) and Twinq (Laurens Hamelink)

Twinq develops software for co-operations of owners of apartments. People who use this software will do this on several devices like a desktop (24 inch), a tablet (10 inch) or smartphone (5 inch). Twinq’s vision is that software has to be sexy and good-looking. To make this kind of software for all types of devices, iAdvise and Twinq used bootstrap. The APEX application uses AJAX and javascript, but all in favor of usability. Besides this, the applications are equipped with the possibility to use keyboard shortcuts.

At the end of this presentation, the audience was asked to visit an online vote, just like tinder. They could indicate whether they really experienced the demo as “Sexy Software” or not. More than 80% was convinced of the sexiness of the software.


Hidden Nuggets in Application Express 5.0 Page Designer – David Peake (Oracle US)

Everyone knows that APEX 5.0 has a lot in store for us. In this presentation, David Peake took
us through the new page designer and told us his favorite features.

The page designer is now divided in three sections. The old tree view can be consulted on the left side of the screen.

The middle section consists of a wide grid layout where we can easily drag and drop new items to our page. Messages will show you what is missing for the new created items.

In the right section we can directly see and edit the properties of the selected item. This new interface allows us to develop much more efficiently. Besides editing one item at a time, it is now possible to edit multiple items. This will save us a lot of time, for example when you want to change the template of all your labels. And when the latest adjustment to your page does not meet your expectations, you can now undo and redo it by simply pressing a button.

Not only the grid layout is quite convenient, keyboard shortcuts will soon be our best developing buddies. To help us along the way, help texts and search capabilities have been increased considerably. Now we will lose less time, if we are looking for that one particular item.

The page designer will give us the possibility to develop even faster!


Interactive Reports: Watch out for the Pitfalls! – Peter Raganitsch (FOEX (AT))

In APEX, we’ve got two different report types to work with: Classic and interactive reports. Many developers prefer the interactive report, because the user can change the appearance of the data through several manipulations. This means that the query behind this report is also adjusted. To figure out how the query will look like after a few filters, you can use the debug function. To get the full query available in logging, you must replace the ‘YES’ with ‘LEVEL9’ in the url. This gives you a more detailed logging. You can also add a small PL/SQL code in the application properties (Security, Database Session, Initialization PL/SQL code):
“APEX_DEBUG.enable (9) ;”. Remember after testing to remove it again.

The pagination type also affects the query of your report. If you use the type ‘X to Y of Z’, then the query will be extended to return the total number of rows. Therefore, use the type ‘X to Y’ for reports with many records.

Also, there is a very useful package for interactive reports named APEX_IR. This can be used to see the full runtime query of your interactive reports, add filters, clear or reset the report settings, delete saved reports and manage subscriptions.

Version 5.0 has several enhancements on interactive reports. Henceforth, it will be possible to use multiple interactive reports per page. Besides that, the action region – after selecting an option in the action menu – will be showed in modal dialogs instead of above the report. The menu is also expanded with the pivot function and the end user can now do a group by on a maximum of eight fields instead of five. With all these improvements, version 5.0 will be very well received by both, developer and end user.


A Spotlight on the Smaller Features of APEX 5 – Dietmar Aust (Opal Consulting (DE))

After three early adopters and a pre-production version of APEX 5, everyone nowadays knows about the most important and biggest new features of APEX 5. But what about those features you don’t notice immediately? Dietmar Aust took us through some of those features during his session about the smaller features of APEX 5.

One of the functional improvements Dietmar told us about is: the file storage. In the past apex versions there were no relative file paths, you had to upload your files individually and updating your files took a lot of time. In the new file storage you do have relative file paths and there is the possibility to upload zip files that will be extracted into the correct folders. Updating your files can be done this way too. Also after updating your files you’ll notice at runtime that the version number, which you can find in the url referencing your files has changed to avoid caching issues.

Another runtime engine improvement is the extended substitution syntax where you can now define different escaping modes. For example: if you use a dynamic action that creates a JavaScript alert to show an application item like ‘&P1_ITEM.’. In this case, cross site scripting can be applied. To avoid this there is now the possibility to escape JS syntax by defining the application item like this: ‘&P1_ITEM!JS.’.  There are a few more escaping options that can be used. These can be found in the slides that you can download from Dietmar Aust’s blog (http://daust.blogspot.be/2015/03/slides-from-my-presentation-at-apex.html) like all other improvements that have been discussed in the session.


Keynote: Elegance in the Enterprise – Shakeeb Rahman (Oracle US)

On every project I’ll try to surpass my previous creations in usability and design. And every time I’ll spend some time analyzing the most popular websites about their latest user interfaces and the way they interact with the end user. How do they present their navigation? Where do they put the buttons? And how do they organize their content on a page? All these questions are important because you want your users to feel comfortable when they use your application.

This keynote felt like a spring breeze on the – maybe a little bit – too hot SS Rotterdam. It was refreshing to see the amount of dedication, consideration and research the APEX design development team put in their Universal Theme. Shakeeb Rahman brought a lot of liberating facts about the way users interact with web applications to our attention. One of the statements that caught my attention was:

Most users put a higher rate on an application after the design is improved because they believe it works better than the old one.

Shakeeb also told us to think twice before using reports. Because in some cases it may not be the best approach for presenting the data to the end user. Sometimes it’s more efficient to use a diagram or a chart because users instantly see how your data it related. And if using a report still is the best approach, try to eliminate the columns users don’t really need to see right away. Minimizing the amount of data on a screen results in faster reading and, in that way, is more efficient.

Another thing to reflect on when building your application, is to split the contents into smaller bits by grouping similar fields. By dividing your contents, users don’t see your page as a big chunk of data,  but more like smalls pieces of useful information.

The new built-in template that comes with APEX 5 results in easy-to-create, smart, responsive web applications because APEX has done the research for you. It uses built-in crisp icons and follows the currently hot “flat design trend”. Now it’s not only faster to create user friendly web application it’s also much easier because they put all the know-how about user interaction in the new and improved application builder.

That’s also handy because now you can take a peek at how APEX pages are designed if you’re looking for inspiration instead of googling around the web like I used to do before.

iAdvise consultant at APEX World 2015

iAdvise consultant at APEX World 2015

Java 8 and Spring 4

On March 27, 2014, the Spring community was happy to announce the Spring Framework 4.0.3. The reason why is that it was the first release of the Spring Framework with Java 8 support. Since then, the Spring team worked very hard to provide major updates for the Spring Framework to be even more supportive towards Java 8. As of September 4, 2014, the Spring Framework 4.1 has arrived with even more support towards the Java community.

Lambda support in Spring 4.0

A good example to show the Lambda support in Spring is the JdbcTemplate class. If we would like to obtain female employees and map them as an instance of type Employee, we could do something like this:

JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);

jdbcTemplate.query("SELECT first_name, last_name FROM employee WHERE gender = ?",
                   ps -> {ps.setString(1, "FEMALE");},
                   (rs) -> new Employee(rs.getString(1), rs.getString(2)));

The complete list of Spring 4.0 features can be found here.

Optional for injection points and MVC handler parameters in Spring 4.1

As of Spring 4.1, JDK 1.8’s java.util.Optional is now supported for @RequestParam, @RequestHeader, and @MatrixVariable controller method arguments. This means that while using Java’s Optional, you make sure that parameters are never null.

The following example shows an example of a @RequestParam in Spring MVC prior to version 4.1.

public String findEmployee(@RequestParam(value = "employeeId") String employeeId) {
  StringBuilder response = new StringBuilder("id: ");
  return response.toString();

When calling the findEmployee method without providing an employeeId, the method will return a NullPointerException. This can be solved by Java’s Optional element.

public String findEmployee(
  @RequestParam(value = "employeeId") Optional<String> employeeId){
  StringBuilder response = new StringBuilder("id: ");
  employeeId.ifPresent(value -> response.append(employeeId.toUpperCase()));
  return response.toString();

The same result can be achieved for the @RequestHeader, and @MatrixVariable annotations.

The complete list of Spring 4.1 features can be found here.