Pages

Thursday, 28 November 2013

Build option use case - experiments

I find build options as nifty tools to not only categorise components for the very purpose build options are documented for, but to help inform developers & testers of applications.

Here I've added a region on the global page to inform users of the status of the page - based on it's allocation to a build option.
Build option in action
I created the following classic report in my global page using region template DIV region with ID and report template One Column Unordered List, with some styling on the columns.
This shows detail of the build option allocated to the page (via page attributes).
select b.build_option_name, b.component_comment 
from apex_application_build_options b
    ,apex_application_pages  p
where b.application_id = :APP_ID
and   p.page_id        = :APP_PAGE_ID
and   b.build_option_name = p.build_option
and   b.application_id    = p.application_id
I applied the following condition will ensure the global page region is only displayed when the page has been assigned a build option.
select null
from apex_application_pages  p
where p.application_id = :APP_ID
and p.page_id = :APP_PAGE_ID
and p.build_option is not null
The region is also allocated to a relevant build option so it doesn't display outside development.

My build option in this case has a status of Include, but Exclude on export.
Build option setings
I'd like to see build option features expanded in future release, perhaps including extended release management options.

Friday, 22 November 2013

Use jQuery to dynamically modify Region title

In a recent post I showed how to determine the APEX region title on load of the page. This post will show how to change the region title dynamically - without submitting the page, and still in three steps.

1) Add a static ID to the region you want to change, this helps the jQuery selector identify the component to change. I set mine to edit_emp

2) Add JavaScript variable to your function and global variable declaration section in your page attributes.
var orig = "x";
I'm not completely happy with this part of the solution, but I find greater confidence than null comparisons in JavaScript.

3) Create a dynamic action on the event you wish to invoke change on the region heading. In my case I'll set it on change of the department. It needs to execute some JavaScript.
Dynamic Action definition
The JavaScript does two things. First, it records the original value of the region title - if this isn't done then the title will keep extending after each change. We use the region static ID to identify the region, then refer to H1 to identify the header text.

As I suggested in point 2, this comparison of orig is a little clunky, I welcome suggestions to make it more elegant (besides just defining your own text from scratch).
if (orig == "x")
   orig = $('#edit_emp h1').text();

$('#edit_emp h1').text(orig + ' (' + $('#P6_DEPTNO option:selected').text() + ')');
The second part extents the original region text with whatever you like - in my case I take the label of the value chosen in the select list.

This is demonstrated in my sample application.

Scott

Tuesday, 19 November 2013

Spice up your APEX application with third party plug-ins

At this year's Australian Oracle User Group Insync13 conference series I conducted a half-day workshop in Melbourne, Brisbane and Perth called "Spice up your APEX application with third party plug-ins"

I selected some commonly used plug-ins that I thought would be interesting and showed attendees how to download, configure and use them. I hoped this would build further awareness of the usefulness and expandability of APEX 4.x

I spent the first 10-15 minutes introducing what plug-ins are all about, and you can find link to the slides here.



I have a tutorial application that demonstrates the eleven GPL/MIT licenced (available for commerical use) plug-ins I chose do illustrate:
http://apex.oracle.com/pls/apex/f?p=PLUGIN

Future readers may find this useful as I've also listed instructions on how to use each of them.

Plug-in instructions
You can now ignore the 'claim workspace' section. On a side note, when running workshops at conferences I certainly learned a few ways to make things run more smoothly!

You can also download setup scripts to run the application in your own environment from here
sagecomputing.com.au/workshops

Many thanks to the author's of the APEX plug-ins that make our lives easier!
Find more at apex-plugin.com

Scott

Friday, 15 November 2013

Perth Insync13 Conference Review

From my employer's perspective we had a very successful year at the Perth Insync13 conference. Sage had 7 papers from 4 of our team, and as usual our exhibition booth was very popular.

We were pushing the mobile theme this year to help stand out to enter our giveaway you needed to use an APEX application, instead of the usual business card in a bowl.  It seemed we were going against the grain of some old habits, but this is 21st century IT so we encouraged all visitors to give it a go.

SAGE exhibition booth

Day 1

I was a busy boy with a half-day workshop and two presentations so I didn't get to see many other papers, but I had already seen quite a few at the Melbourne and Brisbane legs.

So I ended up being rather selective, and I was pretty happy with the ones I attended. First off the rank was an international guest Bjoern Rost Tackling Time Troubles. He was entertaining, engaging and a nice fellow - so we felt me must teach him some Australian vernacular.

I had already seen Penny's 12c optimizer [pdf] presentation but listened to the first few lego star wars jokes and she was well received - so I snuck in to see most of Chris Muir talk about UX design patterns.

I then had to prepare for my half-day workshop on consuming APEX plug-ins. My laptop started to get clammy and freeze which gave me a little scare, but I ended up kicking off in time. Attendees would claim a workspace from my laptop, but in hindsight I now know a much better way to arrange this - next time...

Interaction was good, and my main mission was accomplished - more awareness of the capability and availability of APEX plug-ins. I'll write a separate post on this with all the relevant links.

I finished the day with Phil Robinson talking about testing - I would have liked to see more developers at this very informative session.

Unfortunately I had to leave early on the best session of all - networking drinks, so I didn't attend any dinners. I did bump into Tariq Farooq, great to put a face to an online entity!

Day 2

Andrew Rosson from Lansen started the day with a comparison of GlassFish & WebLogic, which also included some very interesting news about GlassFish.

I took a break before the feature from Connor McDonald on CloneDB. It delivered much more than I was expecting, including 7 very impressive demonstrations.

Once again I did some presentation hopping, listening to Chris' perspective on the future of Oracle Forms before listening to Phil Robinson talk about mind maps and rich pictures - all conferences should have more presentations like this.

It was my turn again with my talk regarding an APEX tablet application. I had the pleasure of including an introduction on the issues at hand from our client Craig Purser from Ventura Home Group.

My prezi is available here: APEX in your hands - lessons learned from an APEX table project
Again, I'll write a separate post later summarising things we've learnt.

Jeff Kemp followed up with more APEX content using row level security, a paper inspired by information received from Connor earlier in the year.

Penny & I finished the day with a light hearted session on Being Productive in IT [pdf]. This was originally presented in Brisbane by Tim Daniell from Fresh Computer Systems, and he kindly gave us permission to offer our perspective on left-right brain issues. Penny was the left brain and I acted as the right - it was entertaining and well received.

While Sage wound down with a beer at the pub next door, I came up with an idea for a similar presentation next year - focussing on one of the issues we covered, stay tuned ;-)

It was great to see everyone I managed to catch up with, and hope it's not another year until I see you all again.

Thank you to all presenters, organisers, volunteers and delegates for making this another enjoyable conference.

Scott
2013 Perth Program Chair

Thursday, 14 November 2013

Why I think GlassFish isn't dead

At this week's Perth Insync conference I attended a great session comparing Oracle Glassfish Server (OGS) with Web Logic Server (WLS), only to find out that Oracle will discontinue future commercial support of the OGS product as of 4th November 2013.

This instigated a great flurry of discussion as one of our current clients is on the way to deploying a server dedicated to APEX using one of the Glassfish products.

Background

Oracle recommends WLS as the web tier of choice for JDeveloper ADF, and the only choice for legacy Forms applications currently running on Apache that want to keep up with upgrading OS platforms.
OGS is typically a cheaper, lightweight alternative that can also support ADF - but is a more obvious choice for APEX deployments, in conjunction with the APEX Listener.

My head is rarely in the application server space, and I tend to not get too caught up with licencing discussions - no doubt others I refer to in this post know more about the topic than I, but I'm more than happy to provide an opinion from my perspective.

I try to catch up on my RSS feeds before the conference to keep an eye out for major announcements, this one obviously got through.
My first impression is that GlassFish has returned to what it was prior to the Oracle-Sun acquisition, so I found this made reading people's passionate opinions on the topic even more interesting.

The announcements

After finding this news story from ZDNet, this first post from familiar sources I encountered on the topic was from Kris Rice regarding APEX Listener support for application servers.

He confirmed the APEX Listener was still supported for WLS and Glassfish (3+), and in future support will be available for Apache Tomcat - thanks to public demand.

He also linked to the Aquarium's official annoucement regarding the Java EE and GlassFish Server Roadmap Update.

The discussion

I felt I needed more input so I started poking around to find a very vivid discussion on the topic, from Markus Eisele suggesting OGS is essentially dead and "thanks for all the fish".

I continued to read articles and they did seem to lean to one direction (anti-Oracle). Some looked back at Oracle's history with with open source projects, considering MySQL's fork into MariaDB.
The general concern is that since MySQL wouldn't be a revenue earner for Oracle, it would go neglected - stating that Oracle is even removing features.

To me this sounded like a slanted discussion without asking the other side. I'm not familiar with how MySQL works, but I'm sure Oracle limits the amount of hard parsing of SQL statements similar to this feature, just in a different component of the architecture.

I remember listening to a podcast describing what's new in MySQL 5.6 thinking that Oracle is vastly improving the MySQL architecture with solutions to match how the Oracle DB solves typical database issues. I didn't get the impression of neglect after reading these new features.

A number of people seem cynical of Larry Ellison's commitment to open source projects, but the information out there doesn't seem to reflect that.

Oracle's opinion

Then I started finding other contributions from Oracle's direction that started to provide some balance - and facts over fancy. Bruno Borges offered 6 Facts about GlassFish Announcement.

Someone else (I can't find the reference) noted the number of free/open source projects Oracle still delivers  - some of them rather high profile, so I think GlassFish shares some great company. To note just a few:
  • VirtualBox
  • SQL Developer
  • Oracle Express Edition
  • Hudson CI
  • Various Linux projects
Many of them supporting arms for Oracle's revenue engines - as per what the Aquarium originally stated:
The primary role of GlassFish Server Open Source Edition has been, and continues to be, driving adoption of the latest release of the Java Platform, Enterprise Edition
Oracle can't resource every project, so others such as OpenOffice have been handed over to the Apache Software Foundation.

Conclusion

At the end of the day we can always refer to Oracle support document. Premier support ends for OGS 3.1.x in March 2016, extended support until 2019 - but sustaining support is indefinite.

GlassFish continues to feed & support important components of Oracle's infrastructure and I would have confidence it will continue to thrive in the forseeable future.

The following points help me come to this conclusion
  1. APEX Listener continues to support OGS, in addition to WLS (and maybe Tomcat) - Oracle is pandering to customers needs, they don't need to 
  2. OGS and WLS share code and are closely coupled with the Oracle JDK - oracle is committed to Java EE
  3. OGS fills a niche and already shares a decent portion of the market - it has critical mass
I welcome further discussion on this and welcome any corrections to my statements.