Friday, 5 December 2014

Boosting APEX menu SQL performance

If you're using dynamic SQL to source your menus and you're utilising the apex_application_pages dictionary view to build you list of menu options - I suggest you consider using Materialized Views.

We have a reporting application that does just this; and the query also links to an authorisation table that decides what types of users see which reports.

You can create a snapshot (materialized view) using something as simple as
create materialized view apx_application_pages
as select * from apex_application_pages;
Then you can add an index on application_id and page_id, then you have the perfect substitute for your menu SQL.

In our development instance containing all sorts of experimental applications - apex_application_pages returns about 1500 rows - but it's a relatively complex view. Using the snapshot instead of the supplied view makes the following difference in throughput when running our query 50 times (on dev)
    33.93 secs (.6786 secs per iteration)
     0.17 secs (.0034 secs per iteration)
Just don't forget to refresh it when your application grows.
exec dbms_mview.refresh('apx_application_pages');

A simple concept, but it can make a very positive difference when done right. It's also applicable to a number of other related scenarios.

Wednesday, 26 November 2014

Chrome Device Mode and Mobile Emulation

Recently a colleague suggested I take a fresh look at the mobile emulation button in Chrome's developer tools.

Apparently this was upgraded earlier in the year and it's a shame I didn't have this a year ago!

Chrome Developer Tools Mobile Emulation
Some immediate advantages I see for APEX development:

  • Specify the device you'd like to emulate from a decent range of contemporary devices
    • This viewport can then be easily scaled to suit whatever monitor you're using
  • Apply network throtttling to simulate access on a mobile network
  • Use the emulation tab to define a media type to render as - I've been using 'print' to test how certain pages look when printed
  • The cursor changes, indicating the behaviour will emulate finger touches on a touchscreen
    • touch & drag emulated perfectly - I removed touchpunch from my page and sliders stopped working as expected without jQuery mobile
    • scrolling drifts instead of static desktop movement (happy to improve terminology here)
Full details on how to use these features are available here:

Tomomi also has a great write up on the topic.

Nice work Chrome, nice work.

Friday, 21 November 2014

ODTUG from afar

I would like to extend my apologies to those people who persevered just now with our attempt to bring to you my presentation on APEX 5 Page Designer thanks to ODTUG.

Due to the massive time zone differences, the appropriate time on my end (6am) means I connect from home - where I'm limited to an ADSL connection. My location is even a bit of a dead zone for my smartphone's 4G plan which is normally better than my home internet speed. I considered just tethering the laptop to my phone, but I don't think it would have been an improvement.

After testing the audio last month it seemed things would be fine as long as I didn't use Prezi (not powerpoint), which hogged the connection with the visuals updating - but obviously the gremlins had other ideas today.
Blame him or Tony Abbott
Melissa from ODTUG has suggested we try record it another time so you don't miss out. In the meantime you can view the slides yourself here, you just don't get to enjoy my Australian accent attempting a few jokes - particularly at the start.

Next year I plan on attending Kscope in Florida, where I've submitted a few abstracts. I think we'll hear who's been accepted next month - but I look forward to meeting so many people I've collaborated with online in some form.

Stay tuned!

Tuesday, 28 October 2014

Perth 2014 Professional Learning Event

There's a little over a week left to this year's major Oracle user group event in Perth, so attention all locals (or even east coasters) - if you're interested in picking up new skills & ideas - you haven't got much time left to register!

This year it's called a "Professional Learning Event" instead of a conference and the program reflects it - plenty of hands on workshops mixed in with normal sessions. Considering it's easily half the price of a typical training course, you'd be crazy not to go - particularly since there are plenty of side benefits to events like this.

Here's where you'll probably find me (if I'm not at the Sage Computing Services booth, of course):

Update from Oracle Openworld - this panel discussion sounds like a nice fun but informative intro to the conference

Data Visualisation - Chris Muir - data visualisation is a growing interest with a world of possibilities, and even though it's ADF based I hope to pick up plenty of ideas.

Flashback Data Archives - Björn Rost - I haven't found myself with my of a need to use flashback gadgets, but Penny suggested I give this one a go. After seeing Björn present last year I'm sure it will be informative and enjoyable.

jQuery for PL/SQL Developers - you certainly don't have to be an APEX developer to attend my session. If you've always wanted to learn jQuery but struggle to make the leap, give this a go. I'll be making regular breaks from the presentation content to get hands on so bring your laptop or tablet.

Building a building App - Branka & Craig - I was heavily involved in this project and it should make for a really interesting case study - an APEX application built specifically for a 10 inch tablet, and the journey it took to get there.

Building maintainable applications in APEX - Jeff Kemp - I'm always keen to see some thoughts on best practices from other developers.

Mobile mumbo Jumbo - Chris Muir - I'm sure Chris will offer some thought provoking insights into the current state of play from Oracle's perspective.

12c for Developers - Connor McDonald - how could I not go to this one?

OHarmony - Penny Cookson - great theme, great topic, great presenter, great boss. Learn more tuning gold from the master.

PL/SQL Masterclass - Tim Hall - I'm not sure I've heard Tim speak too much about PL/SQL, and I think everyone should learn at least one important lesson in these two hours.

Presentation Skills - Penny & myself - I'm excited about doing this one - it should be fun & engaging.

APEX 5x5 - a third session I quickly said OK to, but has come together rather nicely based on experiences from my first 6+ years of APEX development. I'll have to run fast from the previous room!

And while the sessions are great, conferences are a lot of fun and a great chance to catch up with past colleagues, and find out what other people are doing with contemporary technologies.

Sunday, 26 October 2014

ODTUG Webinar: APEX 5 Page Designer

I'll be presenting an online webinar for ODTUG not long after the Perth conference.

It will be the same session I did for AUSOUG back in July, which is lucky since it's 6am for us Perth locals. It's a close look at the Oracle APEX 5 Page Designer, and what it means to you as an APEX developer.

Check the webinar registration page for details on the abstract and help with the time zone conversion for: Thursday, November 20, 2014 5:00 PM - 6:00 PM EST

It was originally written as a Prezi, but due to my ordinary ADSL connection I've had to convert it to PDF. It translates ok but some of the magic is lost. I'll provide a link to the Prezi on the day and you should be able to follow along with the original if you wish.

Even if you're like me and still love the component view, I reckon once you see all the benefits of the new IDE, you'll be a convert and will be itching for the new release to finally arrive.

Friday, 17 October 2014

PL/SQL Challenge Roundtable

Do you write PL/SQL? Me too!

Trouble is, sometimes it's hard to decide how to structure your packages - particularly in an APEX project. Over at the PL/SQL Challenge website run by Steven Feuerstein and friends there is a page dedicated to roundtable discussions.

I submitted my question not so long ago and hope to get some interesting responses. Why don't you give the site a visit and contribute? The discussions usually last for about a month.

Past discussions are available to view - last time Steven asked for use cases for DBMS_RANDOM. You could even test out your PL/SQL while you're there and take a few quizzes.

Wednesday, 8 October 2014

The moon is a sphere

I was fairly excited at the prospect of seeing tonight's lunar eclipse but I neglected to take into account not being able to see the eastern horizon from my house.

I missed most of the total but enjoyed the crescent of the partial eclipse re-emerging. It's amazing how distinct the shadow leading to the penumbra.

My friend said there will be some good shots in tomorrow's paper. I laughed and said here in the 21st century I could probably get a high res online right now that matched the view I had through my binoculars, with the moon sitting on a bed of a few dozen stars.

A Twitter search for #lunareclipse gave me this gem from Australian based astronomer Katie Mack.
Not quite hi-res, but certainly true to the view I had. Bring on the next of the tetrad.

My friend also suggested I could listen to update on the wireless, then I wondered at how the utilisation of radio waves were so revolutionary - being able to transmit signals with no telegraph poles.

I wondered what bit of kit we have today that our grandchildren will snigger at - and I figure it's probably smartphones.

"What do you mean we can't send signals by thought?"

Katie posted a few other great snippets, just as Neil Tyson often does with physics. I'll leave you to ponder this gem