Skip to main content

Page Zero Supernova

Page Zero in APEX is a powerful tool.  For the uninformed, it allows you to put APEX components  on it and have them render on every other page in your application - unless conditionally set to do otherwise.  Components supported on page zero include regions, items, buttons, branches, computations and dynamic actions.

For years now, anytime that I needed a region or item or button on more than one page, I would put it on page zero, and if needed set the condition to display as needed.  It saved a lot of time, as I would only need to create the component once, and was a lot easier to manage as there was only one copy for multiple pages.  As you needed that component to render on additional pages, all that was required was a small change to the condition.

Dynamic Actions, which were introduced in APEX 4.0, are in my opinion, the best feature to happen to APEX.  In a nutshell, they make JavaScript development - specifically of the jQuery type - declarative.  You can specify a number of simple options to do things such as show and hide an item or region, disable items, change the select list values based on the value of another item, etc.  The possibilities are literally infinite, as once you outgrow the declarative features of dynamic actions, you can execute either JavaScript or PL/SQL code.

Thus, the combination of Dynamic Actions on Page Zero is quite powerful, as once you define a Dynamic Action, it would be available on each and every page.  Add a couple of Dynamic Action Plugins to the mix, and you can create some powerful, reusable components in your APEX applications.

But like almost anything else, too much of a good thing is also bad for you.  I recently started using a plugin that allows you to pop open a region on a page via dynamic action in sumnevSERT.  Initially, our requirements were simple - show a single region and allow the user to edit a couple of fields.  But as development progressed, the requirements got more and more sophisticated.  In some cases, the region needed multiple conditional items and even a report.

At this time, we took a step back and had a look at page 0, and it was a mess.  Over 30 dynamic actions, several regions, items and buttons - all of which would render on almost every page - were present.  Since we didn't know which dynamic action or region would be required, we had to render most of them on most of the pages in the application, thus reducing performance and adding a whole lot of complexity.

We fast realized that there had to be a better way.  After some research, we found a different plugin that supported popups based on pages, not regions.  While it did take some re-tooling, it was a lot easier to manage these popups as individual pages, as development could use almost all default functionality and require few, if any, conditional components.  Since the page would only render when requested, the application became much more efficient.  We reduced the number of dynamic actions on page 0 to 8 and eliminated all additional regions, items and buttons.  This was a huge savings not only for immediate performance, but for overall manageability of the application.

Lessons learned here - don't get too attached to any specific plugin or technique that you become blinded by it.  I've often advocated the use of page 0 and will continue to do so, but that recommendation should be taken as such, not as an absolute rule that can not be bent.  If you find yourself in the same scenario, it may be time to retool your approach as well.

Comments

Raymond said…
Hi Scott,

Which plugin have you used now instead?
Scott said…
Raymod,

We're using the Skillbuilders Page Plugin by Dan McGhan: http://apex.oracle.com/pls/apex/f?p=46685:MODAL_PAGE:0:::::

Thanks,

- Scott -

Popular posts from this blog

Spaced Out

A while back, I wrote about how to give the Universal Theme a face lift.  If you follow the steps in that post, the base font for an APEX application with the Universal Theme can easily be changed.

While that's all well and good, sometimes you only want to change the font for a report, not the entire page.  One of the applications that I'm building contains a number of IRs based mostly on log data.  Thus, having that data in a monospaced font would make it a whole lot easier to read.

You can search Google Fonts for monospaced fonts by selecting only that option on the right-side menubar.  You can also opt for the standard yet kinda boring Courier and achieve the same thing.

To implement this in your application, follow the steps in my other post, but stop shy of the final step.  Instead of pasting in the text that I specify, paste in the following to the Custom CSS field in Theme Roller, using the name of the font you selected for the font-family:

.a-IRR-table tr td { font-fam…

Whose Deck is it Anyways?

This year at KScope, we're going to try something new.  And fun.  And funny to watch - we hope.  It's called "Whose Deck is it Anyways?", and will occur on Sunday at 8:30pm.  It's only 30 minutes, but it will likely be the best 30 minutes of the conference.  Or at least the most embarrassing.

Here's what we're going to do: the will be four 5-minute presentations - one on each of the following: BI, EPM, Database & APEX.

Sound interesting?  Probably not.  We get that, too.  So here's what we did.

Each 5-minute session will be presented by a non-expert.  For example, it's highly likely that I'll be presenting on BI or EPM.

To make it even better, each slide deck will be prepared by the corresponding expert.  So again, it's highly likely that my slide deck's creator will be either Stewart Bryson or Edward Roske.  If nothing else, this session will be a crash course in how not to make cohesive, easy to read slides.

Interested now?  Ya,…

Thanks, ODC (Oracle Developer Community)!

I owe a lot of thanks to the ODC - which stands for Oracle Developer Community.  What is ODC?  You may remember it as OTN, or the Oracle Technology Network.  Same people, different name.  Why they changed it I can't say.  People just liked it better that way... (love that song)

In any case, what am I thankful for?  A lot.  To start, the tools that I use day in and day out: SQL Developer, ORDS, Oracle Data Modeler, SQLcl and - of course - APEX.  Without these tools, I'm likely on a completely different career path, perhaps even one that aligns more closely with my degree in television management.

While the tools are great, it's really the people that make up the community that make ODC stand out. From the folks who run ODC and the Oracle ACE program to the developers and product managers who are behind the awesome tools, the ODC community is one of, if not the greatest asset of being involved with Oracle's products.

If you have yet to get more involved with this communi…