Wednesday, July 16, 2008

The future of SQL Developer - the end of Designer?

Last month Oracle released a statement of direction for SQL Developer (here it is). Apart from the enhanced testing capabilities the most important feature will be the support of graphical logical and physical data modeling - just like you normally would do using Oracle Designer - using the acquired CDW4ALL extension. This modeling can be used offline (file-based, using XML files) or repository based. So Oracle seems to be moving (some) essential Designer features towards SQL Developer, therefore reducing the need for Designer - which is obviously in 'maintenance mode' (no new features added).
One thing that worries me a little is that this "functionality is delivered as an optional extension". That sounds a little like $$$...., but I'm not sure about that!

Sunday, July 13, 2008

11th out of 233 OOW sessions in the mix

Out of the suggested 233 sessions for Oracle Open World 2008 on The Mix my suggestion on "(Re)developing a logistic application in the real world" ended on a joint 11th place. It is (officially) unknown how many sessions will make it to OOW, but there are rumors that it will be somewhere between 25 and 35.... So I expect to get an invitation from Oracle soon!
I'm really looking forward to present in San Fransisco!

Monday, July 07, 2008

Drag & Drop feature in APEX - The details

As I promised in an earlier post on Drag & Drop in APEX I would reveal the more technical ins and outs of this cool feature. But instead of blogging about it myself, I hereby refer to the blog of my colleague Rutger. He did a great job in explaining how we achieved this - with a link to an application on apex.oracle.com, so you can try it out yourself - , so please take a look there!

Wednesday, July 02, 2008

Reusable Module Components in APEX

When building a serious application you often need to repeat certain regions in a couple of pages, for instance customer or order information. In APEX you can ofcourse copy a region to another page, but that enhances your maintenance effort when changes are needed on this copied region. Another solution is to group all the pages that share this region in one application and define the region on the famous Page 0. But maybe there is a more elegant way to solve this....

As an example I use the 'My Favorite Tasks' region I described in the previous post. First we set the page alias to 'MYFAV', to circumvent a static reference to a page number. In the region header of 'My Favorite Tasks' we set a HTML tag '<snap>' and '</snap>' in the footer (this <snap> is just an example, it can be anything, as long as it isn't a regular HTML tag). Now define a new HTML region on the page where you need to 'reference' this 'My Favorite Tasks' region and set the region source to <div id='Favorites'></div>. Now we created a placeholder for future use...

Now let's fill this placeholder with the contents of the 'My Favorite Tasks' region.
Set the Page HMTL Body Attribute to : onload="ShowFavs();". This will fire a javascript function when the page is loaded. You probably have to set the value of 'Cursor Focus' to 'Do not focus cursor' otherwise you'll get a 'You may not declaratively set cursor focus' error. Next define the javascript function in the HTML Header section.

<script type="text/javascript">
function ShowFavs(){
var get = new htmldb_Get(null,$v('pFlowId'),null,'MYFAV');
gReturn = get.get(null,'<snap>','</snap>');
get = null;
$s('Favorites',gReturn);
return;
}
</script>


This function will request the 'MYFAV' page. Then the page is 'stripped' so only the HTML between the tags is returned. And this HTML is rendered in the placeholder...

So with this simple and elegant solution you can define 'region building blocks' (even more meaningful than 'My Favorite Tasks') and assemble pages using this building blocks! So re usability increases and your maintenance effort decreases.

In a next post I will show how you even can put regions anywhere on a page without defining a placeholder at all...

Tuesday, July 01, 2008

Dynamic 'My Favorites' Links in your APEX Application

For a (even more) Web 2.0 like look-and-feel in your APEX application you can define a dynamic region 'My Favorite Tasks', that shows links to the pages you visit most frequently.
For these favorites we can query the APEX repository. Follow these steps to get this thing working:

  1. Enable logging on Application Level. Enabling the logging will result in records in the view apex_workspace_activity_log.
  2. Create a Report Page with a region based on a SQL Query.
  3. Enter the query to show the links for the three most visited pages:
select htf.anchor( 'f?p='||:APP_ID||':'||page_id||':'||:APP_SESSION
, page_name ) Task
from

(
select page_name
, page_id
, count(*)
from apex_workspace_activity_log
where application_id = :APP_ID
and apex_user = :APP_USER
and page_id <> :APP_PAGE_ID
group by page_name, page_id
order by 3 desc
)
where rownum <= 3
In a next post I will show how you can embed this report page in any other page in your application.