Quantcast
Channel: Grassroots Oracle
Viewing all 405 articles
Browse latest View live

APEX 5 first peek - Syntax Highlighting

$
0
0
We're programmers and we need syntax highlighting.

Unfortunately the only way so far to accomplish this in APEX is to use the ApexLib developer addon.
Highlighting <= 4.2 using ApexLib
As promised since the original SOD Oracle APEX 5 has promised to deliver native syntax highlighting and they've done a decent looking job.

Places such as page template body will have HTML highlighting, although it's not widespread through the template editors - I wonder if that's just a EA thing and we will see it more prelevant come final release?
(my feedback on this has been 'acknowledged')
Page template body editor
In the nifty new page designer there is a mono-spaced text editor in the property editor. This should be sufficient to define calls to PL/SQL packages anyway... since people don't put massive amounts of PL/SQL within APEX, do they?
Property editor
You can press the first button (arrow pointing to window) to open the relevant code in a cool dialog window. If there are any validation errors we get shown a lovely yellow inline error.
modal window code editing
Modal window code editing

Or you can press the second button (two arrows pointing away from each other) to edit the relevant text in the "Text Editor" pane in the middle of the screen.
Edit code in Text Editor pane
This works well for PL/SQL and SQL content. It even synchronises between editors, though you may experience a slight lag depending on your connection (I live in Australia, so this can be quite bad...)

APEX developers note: there are maintenance & performance reasons why you shouldn't have too much code within these attributes - but there are times & places where this will be really useful.

It's a nice to have, it's a really nice to have - and it appears to have been done well. Thanks APEX team.



APEX 5 first peek - Navigation

$
0
0
The new Page Designer has brought with it a number of fundamental changes in how you move around the application builder.

I won't go into the designer itself because David Peake covers that well in his video - but some of the other things I noticed before watching David's videos. I will say, however, in addition to all this you'll find yourself using wizards a lot less

Moving around

If you start playing with property attribute values you'll find when it comes to moving between components & pages, we now have a warning for any unsaved changes. There have certainly been a few times when I wonder if I'm going crazy thinking - did I save? Now I'll know.
Though similar I believe to the way Oracle Forms used to behave, currently if the cursor doesn't leave an attribute before selecting another component on the page - it won't get recorded as a change.

By the way - you can check out people's feedback on the early adopter so far. I've put in a suggestion to potentially see a list of the outstanding changes we may have forgotten about, or wondering if we can ignore them all.
https://apexea.oracle.com/pls/apex/f?p=4840:5:0::NO:5:P5_ID:275492489463389040

Developer Action Bar

In regard to navigation options, this has probably undergone the most noticable change - I certainly spend a lot of time up there, pressing edit page or opening shared components - or typing a page number in the search widget.
APEX 4.2 action bar
This screenshot differs slightly when editing pages - it includes lock & export icons.

The new action panel currently has two distinctly different modes. The minimal toolbar shows the core options - on icons who's meaning we'll have to re-learn. (I hate learning new icons)

Amusingly (for me) the shared components icon is a triangle, circle & square - the original name of my blog. I also find it vaguely reminiscent of the old Electronic Arts logo.

Unfortunately the page number search doesn't allow entry when in the minimal mode - I presume this is just an early adopter bug.
When in the page designer, a swathe of options lies before us - including the all new & important save page and save/run options. This is starting to feel more & more like Oracle Forms development! In fact, if you're a former Forms programmer - watch this video from David Peake and tell me it doesn't remind you of the old days.

History conserved

For those like me who might like to occasionally find safety in the refuge of the past, you can find the 4.x Tree View and the 3.x Component View under the cog settings icon - which has been commandeered from shared components.
I've been laughed at on Twitter in the past for enjoying the use of the Component View, but I do appreciate & think it's right that the development team kept it in.
APEX 5 settings menu
I think the Group By Component Type is a good option to include, I'd say advocates of the Tree View in particular thought it an essential feature.
APEX 4.2 rendering icons
For me it kinda replaces the panel of icons to limit what we see. To be honest, the only one of these I pressed with any great frequency was the dynamic actions icon.

So I feelthis combined with the Page Designer's new accordion shows they got the options balance pretty good. Dynamic actions certainly deserve their own category.
APEX 5 Page Designer Accordion
I wonder if the page designer will get it's own pretty icon in the old navigation bar; and what it might look like - perhaps something similar to the old Oracle Designer logo?
APEX 5 EA navigation bar
I want to add I notice the trees in the Tree View have a greater distance between nodes - anyone found that a problem? Maybe not now we have a categorised accordion?
Tree View has extra spacing
You may also notice a few additions in the context menu - I'll bring those up in another post.

The rest of the the development environment has stayed pretty much the same - albeit with flatted UI.
The Application list; Shared Components; Utilities; Administration; SQL Workshop; Team Development - all have not fundamentally changed.

Popups

Anyone who used APEX 3.x can attest that date picker popups were annoying.
In 4.x bigger I think popup windows could use a little jQuery treatment
APEX 4.2 page find
... and so APEX 5 delivers. In a true test of the new modal page mode, the page finder is a good example of how this can work effectively - though I have requested the search facility auto-refreshes.

APEX 5 modal dialog
Interactive Reports now appear to be using this framework, but I won't show any screen-captures because I'd say they need a little more dressing up for EA2.

For further detail on using modals for your own applications, check out a post by Joni at iAdvise.

Runtime Developer Toolbar

Last century it was about saving keystrokes, today it's about saving mouse clicks.

If I had a dollar for every time I did this...
Now you'll find that the runtime links open in a new window - presumable thanks to the final class
<a href="f?p=4000:RUN_PAGE:15746635751085:BRANCH_TO_PAGE_ACCEPT:::FB_FLOW_PAGE_ID,FB_FLOW_ID:0,10198"class="launch-aut">

And at runtime you'll noticed the toolbar has been enhanced once again. For a start it doesn't take up the entire page width and has an option to auto-hide.
APEX 4.2 runtime

APEX 5 EA runtime
There is also a display position option, but I'd be interested to meet someone who didn't prefer it on the bottom. I also can't see myself using the show icons only option, but hey - different strokes...

The new Quick Edit feature replaces the Show Edit Links option. Now it greys out the runtime page and offers you to point a crosshairs cursor at an item or region - it will then jump back to the browser window with your application builder then highlight and open the properties component you select - cool!
Quick Edit

Conclusion

A whole suite of changes and I didn't even have a good look at the new page designer. They all made sense and all we'll need to do is get used to a few new icons - but good progress has been made in helping us be productive.


APEX 5 first peek - Themes & Templates

$
0
0
Only a few reported changes in the themes & templates, but they are far reaching and show APEX is continuing to mature as a product.

Supporting Files

The main update mentioned in the new features list is the ability to associate your CSS files within your template definition.
Themes can now store all the files of a theme with the theme definition in the database.
This replicates functionality we already see in plug-ins.
Theme Property - File Location
We also have the ability to declaratively nominate the location of our files, making maintenance a little easier. Previously you may have defined this as an application substitution string and included in your page template.

New Themes

As versions of APEX go up, the number of new themes go down - this is a good thing. APEX 5 introduces one new desktop theme that is responsive and utilises a "navigation list" - this is their fancy term for a List Template (my favourite) that builds a menu that looks & behaves pretty much like the one in the application builder.
APEX 5 EA Desktop Themes
Keep reading on for how a quick way to convert your old Tabs to this format - yup, Tabs almost have their second foot in the grave. I'm not sure many APEX developers would attend that funeral.

When nominating a page template in the new theme you'll see a very succinct list of options. Well done APEX team.
Theme 31 Page Templates

Templates

While editing page templates you'll notice the syntax highlighter is making the content easier to read.
Syntax highlighting in page template property
I've provided feedback to the team requesting them to ensure they replicate this across all relevant properties in the theme maintenance pages - feel free to second this motion in the feedback.

Converting Tab to Navigation List

I think I've had this as a blog post idea for a while, so here's a quick & dirty go using the new tech.
  1. Change the theme of your sample application to 31 - you need the navigation list template
    I think all the template classes match ok without help.

  2. Create a List in Shared Components using something like the following SQL
    select 1, tab_label
      ,'f?p='||:APP_ID||':'||tab_page||':'
         ||sys_context('APEX$SESSION','app_session') target
    from apex_application_tabs
    where application_id = :APP_ID
  3. Brave the new page designer and add a new List region using the following properties
    (if only the OTN forums had an easy way to display a screenshot like this, now properties are tightly laid out)
List region properties
The template renders the menu like the following, where "Home" is current and the cursor is hovering over "Reports". Looks like it could use an order by clause.
Tab options rendered as List template
When a hierarchical query is provided, the menu neatly displays a tab-friendly sub-menu.
I think many people have waited for such a tidy list template to be built-in instead of relying on plug-ins or stitching together your own solution - here it is.

David Peake says the new theme consolidates the best bits of all the old ones, so I look forward to seeing how it treats us.

APEX 5 first peek - File Management

$
0
0
A number of changes have been made to dust off the file management facilities, some of which won't be immediately apparent until we get the chance to spread our wings in our own environments.

File Location

A Static File Prefix has been introduced and appears to use repository files when not specified, and virtual path for your webserver if specified.
It could be similar to the way you might parameterise your file locations with an application item like &F_FILE_LOCATION.
New User Interface property
Plug-ins will support the same behaviour.
I think this will probably make more sense to me when I can muck around in my own environment.

Shared Components

Thankfully the ambiguitity in shared components regarding static files has been removed.
Share Components
There is an Unzip File option, which I guess would make loading files in bulk really handy - but in the era of sprites you only need three files, right? CSS/JS & a massive image sprite ;-)

We also have the ability to define a directory for the static file location, which I didn't really understand at first...
Upload Static Files
... but it made more sense when I saw the file list, which has a very friendly Reference column showing how to identify the file.
Static file list
Perhaps you would synchronise with locations on your web server.

Templates

As I described in my themes & templates post, you can now associate supporting files with your template as you would currently for plug-in files.
Template definition
When referring to your files you can #MIN_DIRECTORY# to complement the #MIN# option - substituting /minified and .min respectively when not in debug mode.

These changes really seem to polish some of the slightly rough edges APEX has had in the past.

APEX 5 first peek - Features not yet implemented

$
0
0
It's an early adopter release, the APEX team have come a long way, yet there are still goodies to come.

What's on it's way

Some features aren't quite ready yet. Some you'll see, others you'll find out when you click on them - so no doubt we'll see a second, maybe even third early adopter release.

Notifications

The first you may notice if you've had a play is the notification message - this will be much nice once the development team are done.
A bunch more are already listed in the known issues.

Utilised Shared Components

In the current release I use the Shared Components section on the right often to click on templates used by the page. I already miss it's presence as I play around, and I noticed David delicately skipped over this one during two of the videos ;-)
Shared Components used by the page
Early adopter release 2, I guess.

I found a Tags plug-in item type but that doesn't seem to be quite ready. There are a few Region plug-ins built-in that you can play around with already.

What's not included

Some features have been bumped to 5.1, and fair enough - the amount of work it must have taken to get the Page Designer up & running, the team is making sure they get everything right.

Multi-row Edit Region

At the KScope14 conference Karen Cannell hedged her bets and lost - her submittion What the Muliti-Row Edit Region Type Means to You and Your End Users will probably have to wait.
Not that I'm going (most unfortunately), one year I'll make the trip...

To find solace in this, based on what we're seeing with the new Page Designer, I very much look forward to what this multi-row edit region type will deliver. No pressure team...

Wish list

I had a look through my APEX 4.2 Wish List post and I've remembered other features that I've been waiting/hoping/requesting for a while that are still absent. Some of these items are resolved with plug-ins; some have lost proirity; some we won't know until documentation is supplied; some have been nailed; some simply don't exist anymore with the new Page Designer. Some we just won't know until the use case comes up once more.

What I was hoping for though was enhancements to the Build Option infrastructure, thereby aiding release management.

There are currently 59 other features categorised as "Planned" in the APEX Feature Request application. For instance, feature "ACNA" suggests substitution string :APP_PAGE_ALIAS will be introduced in 5.0.
The new features documentation usually covers stuff like this - I reckon there might be a few other new substitution strings.

Other nuggets of gold will surely be discovered over time.

APEX 5 first peek - What I missed

$
0
0
When tackling early adopter versions I've enjoyed having a play before reading too much about it. I did look through the EA1 feature descriptions to get a feel for the sort of things to expect, but I waited before watching David's videos to see how easy it was to adapt to the changes - even though I wasn't concentrating on the new page designer itself.

It was certainly worth watching the videos in the end because not only does he describe the new features in the page designer really well, he outlines the state of play for the early adopter release.

So while I haven't gone too deep into the new page designer functionality, here are some less obvious features I think are worth mentioning.

New context menu options

I didn't notice the new options under the right-click when viewing components in the rendering/processing accordion options. I guess I missed these because I rarely use the Tree View.

So when David Peake pointed them out in this video - I agreed it would be a simple way to improve developer productivity, and I know I'd use them all the time.
  • Duplicate 
  • Delete
  • Copy to other page
How many times have we thought - wouldn't it be great if this could be done in one click?
Well, now it's done in two - but super fast, and no wizards.
Component Context Sensitive Right-Click
Copying (& duplicating) is great, but we've always got to be sure not to encounter what we call a cut & giggle, where you forget to change something minor during the process of copying. This is made worse when APEX misses a few attributes, or doesn't change the page prefix.

I've been on a project where copying dynamic actions to other pages was done frequently, and since they're a little newer they haven't had the time to perfect minor copy glitches - similar to those that used to appear copying pages in 3.x. Time will tell if this is still an issue, but we've been promised improvement.

Undo - viewing last change

Undo is one of the first features you might spot in the new page designer, but what I didnt' realise was the tooltip text you see when there is stuff to undo. Of course, I spotted this after I logged feedback suggesting we see a list of outstanding changes when we leave an unsaved page.
Undo Tooltip
Thankfully undo also works to restore deleted components - which may be a frequent accident with the new context menu option.

Autocompletion

When editing page templates I noticed a message under the text area to press ctrl-space to activate autocompletion - nothing happened there nor when using the modal edit (EA1) - but when editing using the Text Editor in the page designer it invokes an autocomplete.
Text Editor Autocomplete
You've probably seen this in products like SQL Developer, some people love it. Personally it's the first feature I turn off because I can't stand the lag it introduces. At least here in APEX it is only on demand.

Page designer search

While I did appreciate the search application feature that came with 4.x, I'm really liking this new feature available near the gallery in the middle of the page designer.
Page Designer Search
Results are instant, and when you click on a result the component is automatically selected and properties shown. Another big productivity booster.

Multi-item updates

Former Forms developers will particularly like this one - using the CTRL key you can select multiple heterogenous components and then update common properties in the editor in one go.
Multiple components selected

The property editor (which no doubt I'll continually also call a palette) shows only common properties, and those properties that differ will be shown with a triangle/delta icon with value redacted under a blue shade.
Forms style property palette
I loved this feature in Forms because you could quickly identify any differences between items, of course in addition to making changes in bulk.

There are also little red triangles above certain properties, but I'm not sure what it indicates. In Forms we saw something like this indicate a value differing from default - but it doesn't seem that here, not are they identifying common attributes. Perhaps the APEX team might elaborate at some point, unless I forgot it mentioned in a video - anyone?

User interface

Something you may have noticed I've missed is commentary regarding other user interfaces. I've just neglected to mention it so far.

There are new features regarding the mobile UI which I'll cover in another post some other day - though there may be enough changes for a few posts.

And disappointingly for my current project interests, the tablet UI has been bumped to 5.1. This is a real shame because it's been an interesting challenge to adapt a desktop interface to a 10 inch touch screen environment. I'm keenly awaiting what goodies the APEX team may provide to make this task easier.

-- Is there something you've seen so far that has excited you that I haven't covered?

Advert: Packt celebrates 2000 books

$
0
0
No APEX5 blog post today, but it turns out today is the final day of Packt Publishing celebration of 2000 titles since their first book was published in 2004.
I like puns
I have the honour of being one of these titles with my Oracle APEX Techniques video series, and I've had the pleasure of reviewing a number of their books.

They have a buy one get one free offer but it ends today - which time zone I don't know so get in fast!

Off topic - 2014 predictions

$
0
0
Here are my predictions for 2014.

I realise that traditionally yearly predictions are made in the first month of the Gregorian calendar year... but I've been busy. So I'm going to make some predictions in my birthday month and see how things eventuate over the next 12 months. Many sites do this over the new year, and I do love the commentary when one looks back over the previous 12 months. It's amazing, well not really, how bad the "psychics" do.

While listening to my favourite podcasts over the new year I found myself thinking about stuff and I started noting some things down that while I didn't necessarily think would eventuate this year - I sure hope it comes soon! Other items just got me thinking where technology might eventuate at some point.

My evernote entry on these predictions were dated Jan 13th, and I promise I haven't cheated & backdated any predictions, not that any have already come to pass ... except one - see if you can spot it.
  1. Observational technology will enable astronomers to accurately determine the composition of exoplanet atmospheres and isolate even more "earth like" planets.
  2. There will be major outcomes regarding the sex scandals in the catholic church - broad statement, but outcomes that humanists will be agreeable to. Definitely Australia, hopefully worldwide. Faith in the church (pun intended) will recede further.
  3. In a similar vein, marriage equality will experience similar liberation racial issues received last century (some good news in March on this topic in the UK)
  4. Various worldwide easing of marijuana laws will facilitate more comparative studies which will eventuate into more targeted medical use with certain compounds.\
  5. A plane will go missing, sparking international interest and new conspiracies.
  6. In the nex twelve months we'll have another paradigm shift with smartphone capabilities - potentially relating to folding screen technology.
  7. Power storage technology is very slow moving, but we will overcome some big hurdles, providing order of magnitude increase in storage capacity and/or charging window.
  8. Augmented reality will become very popular in the "app" market, after experiencing slow and steady increases over the past few years, aided with Google Glass.
  9. We will learn key information about ocean ecosystems, such as cracking exactly what goes on with shark migrations - hopefully not too late due to us guiding selective pressures in the wrong direction
I think the faux-prediction is obvious, but I think you'll find none of the "professional" psychics & grief vultures will have predicted such a unique event.
My prediction on the outcome - few pieces of the wreckage will be salvaged, but confirmed as part of the plane. Conspiracy theorists will deny it & claim it all relates back to Rothschild. 
The black box will be recovered but possibly not for a few years and only by lucky, persistent searching. It will be determined the pilot went rogue.

My 5 cents

APEX Shortcuts Use Case

$
0
0
Recently Martin described APEX Shortcuts, a shared component that I don't often use - and probably even less now.

APEX wizards create them for the delete process in forms, but I thought I'd describe an example of how you might use one for your own needs.

The sole purpose I've used them is to generate HTML text from PL/SQL - often for links to appear near text items. For example, you could use them to

  1. Provide a quick way to clear the text in a field
  2. Populate a date picker with today's date
  3. Generate a list of quick picks, derived from a ref codes table.
The last one is now superceded by a the Dynamic Quick-Picks plug-in.

To show the simplest example, here is how you can add a link to clear an item. First, define the shortcut as some PL/SQL that simply returns some generated HTML - the link that clears the item. Note we can use #CURRENT_ITEM_NAME# to substitute in the relevant item.

Create APEX Shortcuts from Shared Components
Then we refer to the shortcut name in the Post Element Text of the item. Note the "SHORTCUT_NAME" syntax, which should be in uppercase. This renders the shortcut value after the item.
Item property using an APEX shortcut
The final output will differ depending on your theme, but here is a screenshot from my sample app that uses a bare-bones theme 25.
Final runtime result
Relevant documentation can be found here.

What I would like to know is why they're called shortcuts!?

Show APEX IR detail view by default

$
0
0
Since the Detail/Icon views were introduced to Interactive Reports in Oracle APEX 4.0, I've used the detail view a number of times to represent information in ways that don't even look like your standard columnar reports.

One example you may have seen was the original apexblogs.info - this was a detail view IR showing aggregated posts of APEX bloggers.
It's now hosted at odtug.com/apex and this appears to use an alternative method - Named Column report template. I now feel this is probably more superior and deserves it's own post.

I also thought the APEX 4.2 builder application search was another candidate, but looking under the hood it doesn't appear so. If you were just observing as a user you'd say ifthis wasn't implemented with an interactive report detail view, it certainly could have been.

Trouble is these Detail Views aren't shown by default. Good thing is this has a simple solution, though the mechanism may change in APEX5 or other versions.

All you need is to add this when the page loads, either under page attributes or as a dynamic action.
gReport.data.view('DETAIL');
'ICON' is the other accepted actual parameter.
Page attributes - JavaScript
And you may wish to exclude the IR search bar - allowing you to provide your users with a very customised, dynamic layout as soon as the page opens, and they won't even know it's an IR - though depending on the speed of your browser you may see the standard view rendered before the JavaScript kicks in.

Suggested links

Oracle Docs - Enabling detail view
Understanding detail view [video]
Oracle APEX Techniques - video course that includes this clip

Adding CSS buttons to your report

$
0
0
I've liked this concept ever since I saw the packaged applications use this technique:


I've finally gotten around to posting this in part due to some feedback on my sample application.

I used Chrome's inspect element tool to extract the CSS required to create this effect.
According to my notes I first did this when the Bug Tracking application used Theme 24.

You can then modify this to suit your requirements. I've changed the buttons from orange to green in my sample application. You can also change the size of the buttons using the last three attributes (highlighted) - something I've done to suit people's fingers tapping the screen in tablet based applications .

a.uButton.uButtonGreen {
border: 1px solid #55a955;
border-bottom: 1px solid #55a955;
background: #55a955;
}
a.uButton.uButtonGreen span {
background-color: #e6f0e6;
background-color: #e6f0e6;
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, startColorstr='#e6fae6', endColorstr='#e6f0e6');
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#e6fae6', endColorstr='#e6f0e6')";
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e6fae6), color-stop(100%, #e6f0e6));
background-image: -webkit-linear-gradient(#e6fae6,#e6f0e6);
background-image: -moz-linear-gradient(#e6fae6,#e6f0e6);
background-image: linear-gradient(#e6fae6,#e6f0e6);
color: #404040;
text-shadow: 0 1px 0 rgba(255,255,255,0.75);
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset;
padding-bottom:10px;
padding-top:10px;
width:85px;
}
You could also rename the classes to help prevent clashes with existing usage.

You can place this CSS within the "Inline" CSS page attributes, or more appropriately in your own CSS file that you would place in your images folder, perhaps in /i/themes/my_app/custom/ or uploaded to your APEX workspace.
Some define their own custom virtual path /c/ in the application server.

You would then include this file in your application from within your page template, conveniently highlighted in red below.
CSS referenced in Page Template

In this case I defined a substitution string in my application properties, that way I only need to define the location once and refer to it in a number of templates.
Shared Components -> Application properties

Now in every report you wish to use the classes you apply the following properties to the link column.
The link text could reference data from the report using the #COLUMN# syntax
<span>#ID#</span>
And the link attributes tag the span with the class you wish to reference.
class="uButton uButtonGreen"

These link attributes are a powerful tool, I use them frequently in conjunction with dynamic actions using jQuery selectors.

Have fun!

Shared authentication across multiple APEX applications

$
0
0
Quite a few times I see a questions regarding how to share authentication between Oracle APEX applications so the user does not need to log in a second time.

As long as your link between the applications share the session ID, the solution is simple - set the cookie name the same across your applications.
Shared components -> Authentication Schemes -> Edit current scheme -> Session cookie attributes -> Cookie Name
Set same cookie name across applications
This can help release management as you can modularise your applications. You could have a simple login/menu application that links to all your other applications.
Possible application map
If you wanted you could provide access to your application suite using different authenication mechanisms.
ie - if you log into application B using DB accounts, you can still hop across to application A.

The drawback I've found is that post-authentication will only fire during your initial login (in the relevant application). This means you need to be aware how to handle and share your authorisation mechanisms.

Divide and conquer!

Thursday Thought: Are web clients getting thick?

$
0
0
I stumbled across this great post from a non-Oracle specific developer, and I thought I'd mention it here because it's worth a read.

http://zderadicka.eu/web-clients-are-getting-thick/

I've re-posted my comment here because they were thoughts rattling in my brain that I was going to rabble on about one day.
I've been thinking the same thing recently in regard to requests for Oracle APEX pages to not rely on connection to the database in order to operate for a time - using HTML5 storage in the meantime, then synchronising once connection is established. 
Essentially native mobile app behaviour in a web/hybrid application. 
I've also noticed issues in performance during my general mobile usage, particularly when it comes to web surfing. If you visit a news site in desktop format with your smartphone (particularly earlier models) it takes a while to render, yet open the same pages on your laptop using the phone as a data tether (to facilitate same download speed) - I've noticed rendering is much faster. 
The front end will also have to do rendering work, and browsers have been competing against each other for rendering speed for ages, but yes - they're getting thick again.

Is this the circle of life?

Europa Report

$
0
0
Today I watched Europa Report - a movie that plays the same sport as Gravity, but seemed to go straight through to the keeper since I only heard about it while listening to a science podcast - which I think was StarTalk Radio hosted by the charismatic Neil deGrasse Tyson - of recent Cosmos fame.

Anyway - bloody brilliant movie. If you liked Gravity, you'll like this. And it does a fairly good job with the science, only a few minor issues if you really want to get picky. I'm often happy to ignore a few to help the plot along, though there was a horrible faux pas regarding 'absolute zero'.

A small cast includes Sharlto Copley of District 9 fame, who almost succeeds in hiding his thick south african accent. I love this critic's response:
"Claustrophobic and stylish, Europa Report is a slow-burning thriller that puts the science back into science fiction."
I recommend this review by Britney Schmidt - a planery scientist advising actual planned missions to Europa. Though I'd suggest only reading it once you've seen the movie - it's a movie worth not knowing much about before you see it, but soaking up some background detail after the fact.

The cinematography cleverly combines some real photos from NASA/JPL catalogues, including this iconic shot of Europa from the aptly named Galileo spacecraft.
Look familiar?

I find it gorgeously reminiscent of the Apollo 11 descent of the LEM.
Kudos 'merica

I won't include my favourite perspective/scene as not to spoil anything, but ever since I was a young space enthusiast I've dreamed of seeing Jupiter up close.

Keep looking up.

APEX 101: Cascading Select Lists & Dynamic Actions

$
0
0
This post was inspired by a question on the OTN APEX forum, which contains requests for two fairly common scenarios:
1) A select list dependent on another select list
2) A report the updates based on the selections.

The original post submitted the page after each select change - APEX 4.x makes this unnecessaary thanks to cascading select lists.
And the report can also be refreshed without submitting the page thanks to Dynamic Actions.

So a solution can be formed declaratively without submitting the page, we just need logical SQL to go with it.

The final result doesn't have many components, and the demo is available here in my sample application.
Page rendering properties
The P25_DEPT LOV definition is simply
select dname, deptno from dept
The P25_EMP item has a 'Cascading LOV Parent Item' of "P25_DEPT", and LOV which ensures employees are shown even with no dept selected.
select ename, empno from emp where deptno = :P25_DEPT or :P25_DEPT is null
I've enabled display of null values in both select lists.

My report SQL is
select empno, ename, job
from emp
where job = (select job from emp where empno = :P25_EMP)
or :P25_EMP is null
with 'Page Items to Submit' as "P25_EMP", and I've ensured 'Enable Partial Page Refresh' report attribute is Yes.

The dynamic action fires on Change of P25_EMP, and refreshes the report region.

Simple, effective use of declarative APEX features - so you can spend more time on stuff like jQuery ;-)

The web we want

$
0
0
I'm not a huge user of Firefox anymore. My exodus from IE brought me to Firefox, but then Chrome came along and I've been happy ever since.

That's quite analogous to my mobile telephone experience - starting with Nokia, big jump to first generation iPhone, now happy with Android.

I still use Firefox, but only so I can have a separate browser with an independent development builder session for Oracle APEX development. The FireFTP extension was pretty good, too. It doesn't render our tablet application very well, though - has trouble with some JavaScript libraries.

Anyway, I upgraded today and the Firefox team is asking the world what kind of web we want. It has a short, clever video using young children asking us to think know about the internet of things we make for our future generations, then asks us we want from our web from a choice of seven options :
  • Creates opportunity
  • Safeguards privacy
  • Inspires learning
  • Is available to all
  • Puts me in control
  • Promotes freedom
Personally, I chose "Inspires learning" because I feel that grassroots education is very important and these other aspects will be borne from an educated young.

The most interesting part was looking at the world map showing the percentages distributed by continent. I think it highlights the geo-politcal boundaries we currently face, relevant to each region.
The continents that value learning 
I think the learning map shows the people who want it the most probably don't have the best access to quality education.

Check it out, look at the maps for the other options and have a think about what is important to you.

ps - I'd also like a web with bigger "refresh" buttons, just like Chrome.

APEX 4.2 Application builder icon size

$
0
0
A common bug-bear for me is the large distance on web pages between the browser toolbar and the start of any real content on the page.

I remember providing feedback during a tryapexnow beta release on the issue

Gimme content without scrolling!
I can't expect too much - while news websites are frequent offenders for this, newpapers have also been doing it for years.
Pravda 1912
Today I (re?)discovered how to make these buttons smaller - by accident, while clicking between windows.
This was on 4.2.0.00.27.

It rings a vague bell...
Some developers may prefer it. Some developers just do this
Samsung physical monitor rotation
I've finally go the opportunity to try it - I've always preferred height to width.
It's great for APEX and my text editor, but there is still software that works better in landscape - Balsamiq for instance.

Millions of big androids

$
0
0
This latest analysis on the population of mobile device technology got me thinking more about the typical sized screen you might encounter as a global web developer.
So it's looking at 2014 Quarter 1 shipment of nearly 280 million smartphones. 81% are now android, only 16% related to Apple - that next iPhone better be a seller!

The telling statement for me was regarding a third of those shipped:
Smartphones with 5″ and larger screens grew 369 percent, substantially faster than the overall market
I've been working on an APEX project for delivery on an Apple Air - building for a table sized interface has been fascinating. I can only imagine how different a functional APEX application for a 5" screen would need to be.

Applying the APEX 4.2.3 patch

$
0
0
My experience patching Oracle APEX v4.2.1 to 4.2.3 on my Windows 7 laptop.

Background

Personally my main driver for this is to experience the updated themes and templates. I'd also like to explore the packaged applications and see if any of the dynamic PL/SQL regions have been converted to templates.

I already had 4.2.1 installed and before the patch was available to me I thought I'd try running scripts on the full download of 4.2.3

It turns out if you attempt the apxpatch.sql script you get
ORA-39702: database not open for UPGRADE or DOWNGRADE

If you run the apxins.sql
Error: This version of Application Express is already installed (APEX_040200).

So you kinda need to use the patch. If I had more time and a virtual machine ready I would see if it were possible to revert to 4.1, then upgrade.

Process

First I closed my APEX Listener stand-alone console, preventing myself from playing with APEX in the meantime.

I'm still running on Oracle 11g XE, so I run the non-CDB option (referring to 12c container databases)
This means I unzip the patch p17347169_423_Generic.zip to my c:\apex4.2.3 folder.

I then open a cmd window, change directory to that folder and run SQL*Plus as SYSDBA, then run the patch script.
cd \apex4.2.3
sqlplus sys as sysdba
@apxpatch.sql


While that was running I need to manage the images folder. For me I decided this meant copying custom content from c:\apex4.2\images to my new c:\apex4.2.3 folder.
This was a /sage folder that houses my training supplementary files
I also decided it was time to create a /scott folder to store my nick-nacks I play with, instead of dumping that in the root /images folder.
I didn't have anything under /themes I needed to transfer.

This means I modify my start_listener.bat file that launches APEX Listener stand-alone to
cd c:\apex_listener2.0.1\
java -jar apex.war standalone --apex-images \apex4.2.3\images


The next thing I did was open a browser tab to see what the latest APEX Listener version was - and if there's anything that would compel me to upgrade.

After all that, the patch script finished in 28 minutes (on my laptop), and I was ready to restart my listener and log in.

I initially had a blank page with a bunch of resource GET errors - but then I realised I had a typo in the path of my start listener batch file.

At runtime, there is a difference in the developer toolbar - can't we just leave these things alone? ;-)
Difference spotted between 4.2.1 and 4.2.3
Bring on APEX5.

Enhancing APEX "no data found" message

$
0
0
Truth be told, the default "no data found" message for APEX reports is pretty boring.

Out of the box

Even the default wording irritates me just a little bit every time I see one amidst a page I thought was looking pretty snazzy.


There are two things I've done recently to make it look a little better.

1) Surround it with a nice soft coloured box.

Something with a little pop

This is pretty simple, just add the following CSS to your page (Edit page properties -> Inline CSS) or application's .css file. Tweak it to your heart's content - just no blinking text, please.

span.nodatafound {
font-size:120% !important;
border: 1px solid #FC0;
background: #FFC;
color: #384F34;
display: block;
font-weight: bold;
margin: 2px auto 14px;
padding: 15px !important;
text-align: left;
}

2) Customise the output

Speaking of cats (if you clicked through the reference), there are probably a few ways to skin this one.

If you create a dynamic action the fires after refresh of your report region, you can execute this JavaScript

var ndf;
switch($v('P4_REPORT_SEARCH').length)
{
case 1:
ndf="One character and you found no records?!";break;
case 2:
ndf="Make sure there is no type";break;
default:
ndf="No employees by this name, sorry.";
}

$('span.nodatafound').text(ndf);

And that's it!

See a demonstration on this sample search page.
Note it refreshes the report on key release.
Try type letters not found in the emp table.
Viewing all 405 articles
Browse latest View live