Tuesday, February 05, 2008

Mama! Help me! (dev)

What do you do when you're looking at one of your "bugs" (for ex. in your APEX application) and you just don't see it?

Some people do:

But you can also do:
  • go for a walk and come back with a "fresh" head and have another look
  • use Firefox and Firebug to track things down
  • write down what's happening and is going wrong, you would be surprised to see you didn't see the "obvious"
  • start talking about it to yourself or to another
  • ask somebody else to have a quick glance at your code
  • post a thread in the forum
  • debug, trace, ...
I also sometimes think "this can't be true", what am I doing wrong? But then I think it's technology and you'll always find a way to get it working, it's just a matter of time...

We don't have that much time, as we all have tight deadlines, but some of the above points will help you to find the solution faster. And learn from it, put it into best practices so you don't make that mistake again.

YOU CAN DO IT! IT'S JUST A MATTER OF TIME! AND IT'S FUN!

Sunday, February 03, 2008

Checkbox in APEX

You want to create a checkbox in Oracle Application Express and get it's value in javascript?

An example of a checkbox:
In my application I want to do an interactive search whenever the checkbox is checked.

So, how do you know if the checkbox is checked? Let's try with an example.

  1. Create a new "Check Box" item and give it a name, for ex. P26_CHECKBOX.
  2. In the List Of Values, put STATIC2: ;Y (this checkbox doesn't have a label, but will return the Y value whenever the checkbox is checked)
  3. If you look at the Session State (in the developer toolbar) of the item after a submit of the page, you see the checkbox item has a value of Y when it's checked...
  4. If you want to get the value of an item in javascript within APEX, you normally do $x('ITEM_NAME').value
  5. So let's try $x('P26_CHECKBOX').value -> it returns: undefined
  6. If you know a bit of javascript/html, you maybe think you need to use $x('P26_CHECKBOX').checked -> it returns: undefined
  7. The above doesn't work, because APEX is putting a number after the item. In my example: $x('P26_CHECKBOX_0')
  8. If you try with $x('P26_CHECKBOX_0').value, it return Y or with $x('P26_CHECKBOX_0').checked, it returns true... and that's what we'd like to have
  9. See it in action here
If you've more checkboxes (because the lov is returning more values) you can use following function to see what's checked:

Tuesday, January 22, 2008

When not to use APEX?

When I did some talks last year, I got the question "When would you NOT use Oracle Application Express (APEX)?".

I created a draft message in my blog posts as I found it interesting getting this question. I never posted it, but now I decided to post something about it.

During the last days the question popped up again, more than once, so I decided to ask for new ideas ;-)

I find it a difficult question for a person who's passionate about a technology!

So what do I normally answer?

As some smart people often say, ask questions! Why would you like to do this? What's it what you would like to achieve? etc. So during the first minutes I ask questions ;-)

Most of the time they insist to give more answers. It can't be true that you can use APEX for everything! To be honest, I don't think APEX is a good fit in every situation, but to name these situations that's something else.

If I would say... I wouldn't use APEX:

  • when your team exists out of JAVA and/or .NET developers
  • when the requirements are a rich client application
  • when you don't have a data centric approach
  • when you need to program for a specific device (calculator, hospital equipment etc.)
  • when you've high trough put of data (like the typical old Cobol programs)
Or some more...
  • when you hate the Oracle database (because you want to restart another database every week and love the blue screens - job protection)
  • when you don't know nothing about PL/SQL, html, css and javascript and don't want to learn it (learning .Net is so much easier)
  • when you're a freelancer and want a long term project to finish a job (doing it in APEX you'll get only half the money as you would spent only half the time to have the same result)
  • when you want different plugins to install just to get your application running (only a browser is too easy!)
  • when you want to change technology very often (java, bc4j, swing, uix, jsf, adf, ...)
  • when your company has too much money to spent on an application and the infrastructure (although Apex Evangelists can offer you a FREE service to help you spend the money)
Or ... What would you answer?

(would the above ALWAYS be correct? Of course not...)

Monday, January 21, 2008

APEX by Example - Default value of Shuttle

I got some questions about setting the default value of a shuttle. The example can be seen here.

Basically a Shuttle are two lists: on the left you'll see all values, which you can select by moving it to the right. If you already want some values on the right when you open the page, how do you do that?

The APEX components in my example: a Region, a Shuttle item and a Computation.
Creating the region and the Shuttle isn't that hard. The query of the Shuttle is:

SELECT ename, empno FROM emp ORDER by 1
The computation is of type "PL/SQL Function Body". The actual code looks like this:
What does it do?
It fills an array "emp_list" with all the values you want to have already selected (on the left in the shuttle). In my case the first 3 records.

The most important part is the last line APEX_UTL.TABLE_TO_STRING. Which transforms the array in a way so the shuttle can understand it. A string, with in between the values a ':'.

That's just one way of doing it. In APEX you can follow different ways to accomplish the same result. Hope it helps some of you.

Saturday, January 19, 2008

My 2008 Schedule

Just as last year I'll be speaking on some major Oracle events.

The biggest reason for me to go to these events is meeting others. I really like talking to and having drinks with other passionate users of Oracle technology. It's always interesting to hear about their experience, know the person behind the blog I'm reading or just to come into contact with that one person reading this blog ;-)


If you're at one of the following events and want to meet, drop me a mail or feel free to put a comment on this post:
I'm also talking at some smaller events (mostly one day seminars) in the BeNeLux, but the dates are not fixed yet.

Hope to see you at one of the events,
Dimitri

PS: I always like to put a picture in my blog post, but I didn't want to add an obvious one this time. Finally I decided to go for Smeagal (Lord of the Rings), somebody an idea why?

Thursday, January 17, 2008

APEX vs ADF (BEA?): Round 2

After the first round in Europe, there will be a second round in the States!

On the last day of ODTUG Kaleidoscope 2008 we'll have a new "fight"... This time my opponent is not Lucas Jellema, but Peter Ebell. Peter is also a big name in the Java world. He was one of the key persons in the JHeadstart team and he has a broad knowledge about Java, BPEL and SOA.

All details still need to be defined, but the approach will be not that different than what we did in Nieuwegein. Although I heard with Peter it can become bloody! ;-)

As a side note, did you see Oracle acquired BEA?

I'm happy I'm concentrating on the Oracle database and APEX is living in that. It doesn't change that much. The (Oracle) Java world is moving so quickly! I wonder if Peter will talk about deploying ADF to BEA Weblogic. But I suppose these days are exciting moments for the Oracle Java people.

Wednesday, January 16, 2008

My Top 15 Oracle DB 11g NF for APEX Developers: 14

This post is part of the series of blog posts about "My Top 15 Oracle Database 11g New Features for APEX Developers". Already published articles: 15-Virtual Columns.

14 - SQL Access Advisor

Why would you like to use this feature?

For some people APEX is a first touch in the Oracle world. People who just start to develop applications may not be that experienced in Oracle yet. They start creating schema's, tables, indexes etc. through the wizard or by copy/pasting from things they have seen.
Unless they've a senior person looking at their code or they hire an external company to get them to the next level, it's not that easy to get recommendations. You can read lots of books or search on the internet, or you could use some features of the Oracle database to help you. Oracle 11g provides a lot of "Advisors", one of them is the SQL Access Advisor.

Maybe you have used SQL Tuning Advisor before? That's nice to tune individual SQL statements, but SQL Access Advisor is even nicer as it looks at a lot more to give you the "right" advice.

What does Oracle say about it?

SQL Access Advisor evaluates an entire workload of SQL and recommend indexes, partitioning, materialized views that will improve the collective performance of the SQL workload.

In other words, where SQL Tuning Advisor looks at one statement, SQL Access Advisor looks at the complete picture. It may be possible that the SQL Tuning Advisor recommends creating an index, but SQL Access Advisor would recommend to not create the index, but to create a materialized view or partition as it looked at the entire workload, including considering the cost of creating and maintaining the index.

Syntax

You would need to create a plsql script which calls the dbms_advisor package or use Enterprise Manager to guide you through the steps of defining the workload and creating for ex. SQL Tuning Sets. More information can be found here.

Example

A very simple example to tune a SELECT statement:
BEGIN
DBMS_ADVISOR.quick_tune(
advisor_name => DBMS_ADVISOR.SQLACCESS_ADVISOR,
task_name => 'emp_dept_quick_tune',
attr1 => 'SELECT e.ename, d.dname, e.sal FROM emp e, dept d WHERE e.deptno = d.deptno AND e.sal >= 2300 ORDER BY e.sal DESC');
END;
/
I would encourage you to use Enterprise Manager to access SQL Access Advisor. The wizards will guide you to all the necessary steps.

The SQL Access Advisor is located in the Advisor Central - SQL Advisors section of EM.

As I already configured a Quick Tune for my SELECT statement through dbms_advisor, it's listed in the screen of Enterprise Manager.


When you click on the outcome of SQL Advisor Quick Tune, you get a nice graph with what the initial cost was for the select statement and what it could be like if you would implement the recommendation.

Especially the above screen makes it worth to use Enterprise Manager to tune your schema. In my example I only used the SQL Access Advisor to tune one statement (I could also have done it with the SQL Tuning Advisor), but tuning your entire schema isn't that different. You would specify the workload (even an hypothetical workload), the advisor would look at all that information and would give you of course more information as I had with one statement, but the principle is the same.

Behind the Scenes

The following views can be used to display the SQL Access Advisor output without using Enterprise Manager or the get_task_script function: DBA_ADVISOR_TASKS, DBA_ADVISOR_LOG, DBA_ADVISOR_FINDINGS, DBA_ADVISOR_RECOMMENDATIONS

Other useful information

There's another nice example of using SQL Access Advisor written by Arup Nanda here.

Conclusion

Having SQL Access Advisor available doesn't mean a good database design isn't important anymore! I would recommend taking time to get the design right from the start. As the database gets more and more complex, and you're having more and more data, it's nice to have a feature like SQL Access Advisor which can help you to look at the performance.

Maybe this features is more used by DBAs, but I think it's also nice for a developer to sometimes have a look at this. And let's face it, some of us are responsible for everything (dba/development) ;-) 

Monday, January 14, 2008

My Top 15 Oracle DB 11g NF for APEX Developers: 15

I thought it a good idea to write a series of blog posts about some new features of the Oracle 11g database I find useful in an APEX project.


I decided to do a "Top 15". It's very difficult to order them, as for one person or project a feature would be number 1, but for another, it would only be found on place 10. So don't see it as I like the feature I put on place 15 less than the one on place 10. I like all new features ;-)

My research... this top 15 came together after reading:
That was the background...

15 - Virtual Columns

Why would you like to use this feature?

If you've an orders table with the unit price and the quantity, wouldn't it be useful to have the total (= unit price * quantity)?
Or when a store has a price list of items they buy, they add 30% to it to get the price they sell the item too. Or getting the initials of a name. Or seeing the date in a specific format. Or... Having that kind of information already in the table may be of help.

What does Oracle say about it?

Virtual columns enable application developers to define computations and transformations as the column (metadata) definition of tables without space consumption. This makes application development easier and less error-prone, as well as enhances query optimization by providing additional statistics to the optimizer for these virtual columns.

Syntax

Part of the create/alter table statement:

column [datatype] [GENERATED ALWAYS] AS (column_expression) [VIRTUAL] 
[ inline_constraint [inline_constraint]... ]

Example
SQL> CREATE TABLE EMP_WITH_VC (
EMPNO NUMBER(4,0) NOT NULL ENABLE,
ENAME VARCHAR2(10 BYTE),JOB VARCHAR2(9 BYTE),
MGR NUMBER(4,0),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2,0),
NEW_SAL AS (ROUND(sal*1.10,2)),
TOTAL_SAL_COMM NUMBER GENERATED ALWAYS AS (ROUND(sal*1.10+NVL(comm,0),2)) VIRTUAL,
HIRE_YEAR AS (TO_CHAR(hiredate, 'YYYY')),

PRIMARY KEY (EMPNO)
);

SQL> INSERT INTO EMP_WITH_VC (empno, ename, job, mgr,
hiredate, sal, comm, deptno)
SELECT empno, ename, job, mgr, hiredate, sal, comm, deptno FROM EMP;

If we query the new EMP with Virtual Column table, we'll see all data of the normal EMP table + the new virtual columns (red): the new salary (10% higher), the total package of the salary and commission and the hire year.
SQL> SELECT * FROM EMP_WITH_VC

I wanted to put the examples online on the new APEX 3.1 instance, but it doesn't seem to run on 11g... (as my creation of my table failed). But as you see on the screenshot, it's running on my local machines.

Behind the Scenes

If you look at the user_tab_columns view you'll notice a column called data_default, which contains the expression of the virtual column.


Other useful information
  • An index can be created on a Virtual Column (this would be a function based index)
  • You can not do DML (insert, update, delete) on a Virtual Column, but you can use it in a WHERE clause
  • Virtual Columns are only available on relational heap tables
  • Virtual Column expression work only on the same table, so not cross table and they can't contain other Virtual Columns
  • You can use Vitual Columns in Constraints (PK, FK, Check)
  • You can partition on Virtual Columns !
The full documentation about Virtual Columns can be found here.

Thursday, January 10, 2008

Scary contacts...

The last couple of hours I got some mails, asking for help. But when I replied I got an "Undelivered Mail Returned to Sender". I'm not sure if they made a mistake or did it deliberate, that's why I blog about it as I can't reach "you".

The strange thing, it was even not from one person and even more bizar they even didn't ask for free help but wanted to pay, which I find great, of course ;-)

But without wanting to offend anybody, I guess it was an early first April joke?

Nevertheless these are some of the messages:

I wish project work for you, urgent dimitri needs fast will pay on project. call now.
Or a message like this:
I have a 1,000,000 Euro project and would be interested in talking to you about it.
So if you're serious please provide the right email address so I can contact you properly.
If it was a joke, thanks, nice for one time ;-)

Here we go again...

I remember the early days where we got some chain letters. You got luck when you would sent that letter to 10 others. I guess the guys started this, did a lot of these things before?

They used the same principle but an up-to-date technology. I got "tagged" by the great Tim's: Tim Hall and Tim Dexter... so I'm "it".

I never did chain letters! But as it's an "Oracle Wave" I would feel guilty to stop it, so here we go...

Eight things about me you may not know:
  1. When I was younger I had a crush on Pamela Anderson. In 1997 I even had a site dedicated to the blonde model! Although the early days of internet, I got more visits on that site than on any other site I'm hosting now ;-)
  2. I was a fan of Manchester United, especially when Eric Cantona and David Beckham were still there. I even went to the stadium and walked on the field and saw the dressing rooms.
  3. As a little kid (around 1983) I played Super Bunny on my fathers Apple II. At that time you had only floppies, but we had already a paddle (sort of joystick)!
  4. When I was 10 years old, I bought my first PC (an IBM XT), from that moment all my money went into buying pc stuff.
  5. I had only one "real" girl friend and she became my wife.
  6. Till 21 I never touched alcohol (beer). I didn't like beer, I was more into fristi! Things change...
  7. As a little kid I wanted to become a "Bank Director".
  8. When I had to fill in the "poezie album" of somebody, most of them filled in with "Favorite food"; French fries, but I was the only one who filled in; "Chicory with ham and cheese covered with breadcrumbs".
I wanted to start tagging the next 8 people, but then read this...

Tuesday, January 08, 2008

APEX 3.1 hosted environment updated

I just logged in into the online Oracle Application Express 3.1 hosted evaluation version.
I was surprised it got upgraded. The message says it got updated on January 7th 2008, so only a couple of minutes ago (as in Belgium we're a bit ahead of time).

The icons look more slick I think. The current version
is 3.1.0.00.19.

I'm still figuring out what has changed. I guess the APEX-team will tell us in a moment.
What I think changed, when I go to printing I see some more options:

It's always nice to see updates coming out. Thanks APEX Development Team and keep up the good work.

Update - Just got this mail:

First, thank you for all your comments about our public evaluation instance of Application Express 3.1. We wanted to let you know that we just completed an upgrade of the instance to bring it up to date with our development. Many of the issues with Interactive Reports should be fixed now and you will also be able to see and use other new features such as the new Workspace Themes. If you find any new issues, please report them using the feedback application. The link is also available from within the hosted Application Express 3.1 evaluation instance Home page.

Thank You!
The Application Express Team

and the best speaker of the UKOUG 2007 is...

Some people published the feedback they received from their presentation at the UKOUG.

I read first Marco Gralike's post how he felt with his scores. It's always interesting to see how the audience react to your presentation. You learn a lot from the evaluations afterwards. Worst would be you thought you did a great job and afterwards you find out people didn't like it. You can always learn something to make the presentation better!

But when I read John Scott's post about his evaluation I was really impressed with his scores! Unbelievable high scores! I wonder what scores Tom Kyte and Jonathan Lewis get? They must be used to these scores I guess... although I think people start expecting more and more from you when you're at that level. For ex. I saw some presentations of Rich Niemec and I believe he's a confident speaker. But at Collaborate last year he got some though questions from the audience and people expected he would know all that (it was a presentation about the new features of the 11g database). He didn't know some of the questions and some of the public started to become "angry". I don't know anybody who knows everything, but I know a lot of people knowing a lot ;-)

To come back to John's presentation, that was indeed a really good one. Especially the debugging of APEX applications through SQL Developer I found impressive. Immediately after the session a lot of people congratulated him, then you know you did a great job. Congratulations John! I guess you must be close to the "best speaker" award!
If you want to see him presenting soon... London, March, at the European APEX Training Days.

I also did a presentation at UKOUG about the integration of BI Publisher with Oracle Application Express and getting some advanced reports out of it. You find my scores below... Not as high as John, but I'm happy with them ;-)

Thursday, January 03, 2008

Start of 2008 and Wii

I hope you all had a nice Old on New.

This year I held it quite quiet. I played some (board-)games with family and had some nice food. I like playing games like Pentagon, The Settlers of Catan, Highscore, Ave Caesar, Poker etc.

Santa Claus also dropped a Wii under our Christmas tree. So games like Wii Sports, Mario Galaxy, Resident Evil, Table Tennis, Mario Kart, Mortal Kombat etc. have no secrets for me anymore ;-)

I especially like the Wii when you can play against others. Do some boxing or playing a game of baseball against your family is so much fun!

If you made a resolution like doing more exercises or a bit more sports, the Wii can be very helpful! You really sweat while playing these Wii games ;-)

As you read this blog, there's a great chance that you're behind your pc for more than 10 hours a day... maybe the above can help you? It did help me to "relax" during my holidays.

Happy New Year!

Thursday, December 27, 2007

Flashback 2007... Flashforward 2008...

The last year went unbelievable fast. I've the impression, the older I get, the faster the world goes! Just as last year I took a moment to look back at some of my highlights.


My highlights for 2007 (per month):
  • January: I started helping Ordina to build up an Oracle team. I'm pleased with the result; 15 new people came on board, we worked for some new customers and did some nice projects.
  • February: Oracle Application Express 3.0 was released. I believe this was a big step in the current success of APEX.
  • March 14: the Apex Evangelists website went live. The idea started in October 2006 and after a couple of months of brainstorming and sorting things out, John Scott and I announced a company focusing only on Oracle Application Express.
  • April 2: I had a first discussion about APEX "against/next to" JDeveloper/ADF.
  • April 19: I gave my first APEX presentation in the States during Collaborate '07 in Las Vegas. A few days before I also sat in the APEX panel and organized the APEX Meet-Up.
  • May 17: Announcement of the first European APEX Training Days
  • June: my second ODTUG, in Daytona Beach. During that event I did an APEX presentation, the APEX Meetup and a Podcast with Lewis Cunningham. I also met the Oracle APEX Development team again and I met Patrick Wolf for the first time in real-life.
  • July 11: Launch of Oracle Database 11g
  • August 7: first Apex Evangelists onsite Oracle Application Express Training together with John Scott.
  • September was the month of the most exciting highlights of this year
  • September 4th-6th: First European Apex Training Days
  • September 19th morning: Announcement of the second European Apex Training Days
  • September 19th evening: my first baby... a son, Matthias, got born
  • September 30th: first time "away" with Matthias for a dinner with Steven Feuerstein.
  • October: prepare for November and enjoy Matthias
  • November: my second Oracle Open World. I also did an APEX presentation at OOW and organized the Apex Meetup and Apex Roundtable.
  • December 5: my first UKOUG where I flew in, did an APEX presentation and Roundtable on the same day and had some great food with some nice friends.
  • December 8: my first Mac, a MacBook Pro
  • December 17: presenting together with Lucas Jellema in the Netherlands: "APEX vs ADF"
  • December 27: this post, as I find it unbelievable what I did last year
It has been an amazing year! If I look at my post Flashforward 2007 I'm happy I could meet my "goals". I think I promoted Oracle and APEX even more by building up Apex Evangelists and an Oracle team and doing presentations at several events. I definitely explored new sides of myself by doing these presentations and trying to launch several projects.

In my private life, I got a nice little baby, which is an awesome experience. I didn't find an house, but we bought some land to build one.

Finally to end 2007, I did around 135 blog posts... The stats of this blog:


For 2008 I hope my family stays healthy and we may enjoy life even more as before.

If I'm allowed to ask for more, in private life; it would be nice if I find the time to also be with my family and we could start with the building of our new house.
On professional life; I hope we can let Apex Evangelists grow in 2008, promote APEX even more, give good APEX support to our customers, develop some outstanding software and do some nice projects.

My last lines of my blog post of 2007 is for all of you!
Thank you so much for reading my blog, giving comments and feedback and for meeting you at several events.
I wish you a very Happy New Year!

Thursday, December 20, 2007

I yielded... Welcome MacBook Pro

Two weeks ago I got my new MacBook Pro. For a long time I had to hear from certain people how much better Mac was... Finally I yielded and bought one!

For the techies... my configuration looks like this: MacBook Pro 15.4'', 2.4 GHz Intel Core 2 Duo, 4 GB of memory, GeForce 8600M GT 256 MB graphics card, 200 GB (7200 rpm) harddisk.

In the beginning I had to get used to this new machine, but after a week I was impressed by this jewel. The Leopard operating system is really impressive! The features I like most at the moment: Visual Look and Feel, Easy of installation of software, Expose, Spaces and Screen Sharing!

Before I tell you how I use my new laptop, this is the other software I installed: VM Ware Fusion, SQL Developer, Adium (chat), Firefox (with some plugins as Firebug), Cyberduck (ftp), Skype, iWork '08, SSH Tunnel Manager, QuickSilver and Adobe Creative Suite. I'm currently evaluating TextMate, MacFuse, Office and OmniPlan. If you know some other good software, let me know... I'm a newbie in the Mac arena ;-)

I'm using this Mac for everything now... from reading my mails or surfing the internet to APEX development and giving presentations and training.

For ex while I'm developing I open a tunnel to the AE servers and use SQL Developer to work on the application back-end (database stuff). In my browser I do the APEX development and when I want to discuss some things with John Scott for ex. (who has also a Mac ;-)) we just do Screen sharing (through iChat) and I see his screen or he sees my screen. Very useful!!

Giving presentations with Keynote is still something I need to get used to. I prepared the presentation of Monday (APEX vs ADF) on my Mac in Keynote. But when I arrived in the Netherlands I saw the connection to the beamer isn't straight forward with a Mac! Of course I didn't take the screen converter plug with me, so I ended up doing my presentation with my Dell laptop. Luckily Keynote could export to pdf and powerpoint. So I expect my first public "performance" with my MacBook Pro will be during the European Apex Training Days in March in London.

But I'm already well prepared ;-) The VM I had with Oracle Linux, Oracle DB 11g, APEX and BI Publisher Server was still working in this version of VM Ware (in Mac it's called VM Ware Fusion instead of VM Ware Workstation). Another VM I have is one with Windows 2003, Office 2003 and BI Publisher Desktop.

So my demos will be a browser and SQL Developer in OSX, my Oracle Linux VM for my database and my Oracle Windows 2003 VM to show the BIP Desktop features.

This is all working very smoothly! Unbelievable, really! Also... If you plugin some other hardware (like external hard disk, mouse etc.) it works immediate! No pain of drivers, it just works!

My "things to remember" if you come from a Windows environment:

  • get used to the new OS
  • use a mouse, or know that right click is CTRL mouse click
  • there're only 2 USB ports, use Firewire for your external harddisk
  • maximum resolution is 1440x900 (a bit larger as the 1900x1200 of my Windows laptop)
  • learn the new shortcuts and talk to others how to do things
  • if you need to connect to a monitor/projector, don't forget your converter
So far I don't regret having bought this Mac...

My wife, working in the Graphics industry, already works with Mac for years. She also said Mac was so easy, but maybe she just wants to have a "cool" guy... You should definitely have a look at this video!!! ;-)

Wednesday, December 19, 2007

APEX vs ADF: Round 1

As announced before, on Monday I did a presentation together with Lucas Jellema about the differences in APEX and ADF.

On the right you see the picture I used on the first slide. You don't know? Does David (APEX) and Goliath (ADF) rings a bell?

The goal was not to "tackle" each other, but show the audience both technologies. We had a lot of fun! Both Lucas and myself are very passionate about "our precious", so once and a while we teased each other. The 80 people had some good laughs, the atmosphere was very energetic, something you can expect of a good "fight" ;-)

So what did we do?

Michiel Jonkers was the host and he welcomed everybody, prepared the audience for the evening and introduced both Lucas and myself.

Then I started with an Introduction about Oracle Application Express (about 30 mins). Where did it come from? How does the architecture look like? And why should you use APEX?
Then it was time for Lucas to do the same for ADF.

During the preparation we discussed how we would do it and finally decided to start from the same ERD and try to create a survey application in 6 hours. We would see how much we could do in that amount of time. I was impressed with what Lucas did in that amount of time in ADF (and JSF). A few years ago I worked with BC4J, so I knew a little bit of it, but I must say they let the product evolve largely.

So we both demonstrated our application and explained how we did it. You can see the application I made here. The presentation (with in it the break down of the time used to create the application) you find here.

After the break, with some great food, we both explained how you can start with both products and showed how to create an application.

At the end we had the Q&A. Some questions are always coming back: "When shouldn't you use APEX/ADF?", "Does APEX also work for large applications?", "What about Business Logic" etc.

I had a great time! If you were there I hope you enjoyed it as much as I did.

PS/ Some others blogged about it too... Douwe Pieter van den Bos here and Marco Gralike here. If I missed yours, feel free to add a link in the comments. I believe Michiel Jonkers is also going to blog about it.

Thursday, December 13, 2007

ADVERT: Agenda European APEX Training Days

A few days ago we released our agenda to the people coming to the AE European Oracle Application Express Training Days.

This training will be held in London in March 18th-20th 2008. It's not a beginners training, more an advanced one, although "advanced" is difficult to measure.

There are still a few places left, so if you have been looking for some Advanced APEX training by some of the most passionate APEX people around then sign up quickly as places are limited. 

Monday, December 10, 2007

ODTUG - Last Day to Submit Your Abstract

Just got a mail that it's the last day to submit your presentation for the Kaleidoscope 2008 conference of ODTUG.

Title: Evolution of the Developer: Middleware and Beyond
Date: June 15-19, 2008
Venue: Sheraton New Orleans, Louisiana

There's also a new APEX Symposium the Sunday before the conference with some APEX Case Studies...

UKOUG Thursday

After a good sleep John and I went for an English breakfast. To be honest, I expected more about the breakfast, especially as I already stayed in Reading and Manchester where the breakfast in these hotels were amazing. But it can also be that I'm getting used to the "big" meals ;-)

The first session I was in was about APEX Security by Peter Lorenzen. He did a nice job, it's definitely an area people are interested in. I would have shown more demo's, but the downside then is that you can't cover the amount of content Peter covered now.

Next on my agenda was the famous talk by Steven Feuerstein about PLSQL Best Practices.
Although I already saw the presentation, I like to listen to Steven. The way he presents and the content are so good and I learn by repetition ;-) For ex. playing the SET game during his presentation was really fun.

In the afternoon everybody was leaving and the UKOUG was already history...

In the evening John showed me a part of Leeds and we had some nice Indian food.
On Friday I headed back home. My last flight of the year...

Sunday, December 09, 2007

UKOUG Wednesday

Wednesday morning I arrived in Birmingham. The weather wasn't great, dark clouds and rain.

I went to the hotel, the Jury's Inn, but couldn't check in until 2pm, so I headed to the ICC buildings where the UKOUG conference was being held. Luckily it wasn't to far from the hotel, only a 5 min walk. The building was quiet impressive: lots of glass and big.

I registered as a speaker and went to my first session, which I was a session chair for, which means I had to introduce the speaker. The speaker was John Scott, does that ring a bell?

When I entered the room John would present in, I was amazed and tumbled! Unbelievable! What a big and nice room!

John asked me to keep my introduction short as he had a lot to talk about. At OOW he did the same presentation but got 90 minutes, now he had only 60... A challenge!

I followed his instruction and did my fastest introduction ever, 8 seconds ;-)

John did a fantastic job in his presentation about "Debugging APEX Applications", which proves this article and that some people came to him and told him that it was "the best presentation" they had seen so far. Of course I didn't do mine yet ;-) (only joking!)

Right after John's presentation I had to participate in the APEX Roundtable. Jeremy Duggan was the host and in the panel we had Anthony Rainer, Peter Lorenzen and myself. John Scott was in the audience but answered also a lot of questions, so although it wasn't on the schedule, you can state John was in the panel too.
Jeremy asked the people the questions they had or the topics they wanted to talk about, noted that down and then we started to answer them. Some of the questions we had, were about javascript, security, when apex/when java and authorization.

Then I went for lunch, I was really hungry as I had only eaten in the early morning before I left and it was already 2pm (in Belgium time that's even 3pm). The catering and logistic could have been better I think, especially when I compare it to OOW, ODTUG or the IOUG events.

In the afternoon I walked a bit around and finally sat down to prepare for my presentation.

I had to do the last presentation of the day, before the keynote. As I thought the people started to become tired I tried to make it as digestible as possible.

I talked about the integration of BI Publisher and APEX. The more I do this presentation the more I try to put in things of BI Publisher. For ex. Conditional formatting, multiple datasets, ppt output... next time I might talk about the Scheduler and passing parameters to BIP reports.




In the evening John Scott , Peter Scott, Borkur Steingrimsson, Mark Rittman and myself went to a pub. We had some excellent tapas and some beers. They are all really nice guys, we had good talks and laughs! Later that evening we went to another pub, it's the unofficial Oaktable pub I heard later, and it must be said that the more famous Oracle people (bloggers) were in that bar. For ex. I talked to Marco Gralike, Lisa Dobson, Kurt Van Meerbeeck, Doug Burns, Mark Bobak, ... The later the evening the more tired I got, so at 11.30pm I went back to the hotel to get some sleep.


Wednesday, December 05, 2007

UKOUG first impressions

After too little sleep I left to Birmingham.

The flight went well and at 9 o'clock I was in a cab driving to the conference. At first sight the conference is more "serious". The people look more serious, wear suits and are more formal. But it can just be a first impression ;-)

I forgot my camera cable, so I can't show any pictures before Saturday.

I just finished the roundtable and I'm waiting to get in my room for my presentation, which starts in 30 minutes. In the evening I'll probably go for a beer and an early sleep.

I'll post again in the weekend with pictures, in the meanwhile you my read John Scott's blog or Mark Rittman or Doug Burns or a lot others.

Monday, December 03, 2007

Call BI Publisher report from APEX

After my post about the integration of APEX and BI Publisher I got some questions about further integration.

Also during my presentation "Advanced PDF documents from Oracle Application Express using Oracle Business Intelligence Publisher" at Oracle Open World I got some questions about security.

If you didn't see my presentation yet, you can download it here or you can see me presenting this week at UKOUG or in London in March 2008 during the European APEX Training Days.

When Daniel sent me a mail about his thread in the Application Express Forum I decided to post some more about BIP and APEX integration.

What we want to do: link a report made in BI Publisher to a button in APEX. This need to be as automated as possible...

Why do we want to do this as APEX is providing PDF printing out-of-the-box?

The answer is that APEX is limited in printing and BI Publisher is specialized in this area. In a next version of APEX (3.1 and 4.0) the printing is enhanced, but today that's not yet the case.
If you want to include multiple queries in your APEX report or print/export it as a ppt for ex. or even just fax a report, APEX doesn't provide this functionality declarative, but BI Publisher (BIP) does.

I suppose you know how to create a report in BIP, so I won't go into detail about that. In a previous post I already explained how you can install BIP (for Windows and Linux) and link it to APEX, so that's something you won't find here.

If you don't have a BIP report yet, you find some example/demo reports when logging in into BI Publisher (for ex. an url like: http://your-server:9704/xmlpserver).
An example of a report, go to: Home (Reports) > Shared Folders > Supply Chain Management > Warehouse Inventory Report

If you call that report you need to be authenticated (known by BIP) to get the result. That's something we want to avoid as we don't want to login in BIP again when coming from APEX...

To avoid you need to login again, go to: Admin > Security Center > Security Configuration

There're some different Security Models available to you (LDAP, BIP, DB). If you would use Single Sign-On, your live would be quiet simple as you don't have to do anything. But in this article I'm concentrating on the standard BI Publisher security.

To solve my logon issue, I'm making my reports public. In BIP this is called a "Guest".
In the Security Center of BIP I name my "Guest folder" (or public folder).

I'll need to create that Guest folder which will hold all the reports I'm calling from APEX.
Go to Reports > Shared Folders and create a new Folder "Guest". In that folder I created a new report (a copy of the example I showed above).

When you call that report by clicking on it, you'll see the result. You can adapt it to see it in a different output format. Then the most important part... Click on "Link to this report" and select" Document Only". A new window will pop-up on the same page with the link to the report.
Copy that url.


Now we'll use that url in our button in APEX. Create a new button and as Target select "Url" and copy the url you got from BIP in the "URL Target" field.

If you run your APEX application and click on the button you just created, you should see the report coming from BI Publisher...

Saturday, December 01, 2007

Installation of BI Publisher on OEL5 and BIP Desktop on Windows Vista

-- Update: This post remained in my drafts folder (for one month now), I guess I wanted to include something else, but I don't know what anymore, so I decided to post it as is...

As I blogged a few days ago, I created a VM with my Oracle soft. Now I'm extending my demo system with BI Publisher. So far, so good, wasn't it I also need Oracle BI Publisher Desktop, and that runs on Windows. I could have gone for another VM for only that, which would be the most secure thing as it would be a "fixed" working environment (without the windows updates etc.).

Nevertheless, I didn't do that, as my systems RAM is going bananas! Windows Vista is already eating 1GB of my RAM, the other 1GB I use for my VMware. So no room left for another VM with Windows.

As I'm giving a presentation at OOW and UKOUG about the integration of APEX and BI Publisher and creating some advanced pdf's, next thing for me to do ... install BIP!

When I'm talking about Oracle Business Intelligence Publisher (BIP), I'm talking about a server part, in my case BI Publisher 10.1.3.3.1 for Linux and a client part, BI Publisher Desktop 10.1.3.3.1 for Windows.

Installation of BI Publisher 10.1.3.3.1 in OEL5 (Oracle Enterprise Linux 5)

Installing BIP in Windows is a matter of minutes, click on the installation file and that's basically it. I hoped it would be as easy in Linux, but ...

After downloading BIP for Linux, I read the manual. There're not that many pre-requisites, so I started with "./runInstaller".

What followed was a nice java error thrown by the OUI (Oracle Universal Installer).
When you think you've all needed libraries installed, there's for an odd reason always one more! In my case I had to install the libXp-1.0.0-8.i386.rpm package to get the installation of BIP running.

So these are the steps I followed to install BIP (server) in OEL5
  1. Start a Terminal
  2. Install the required library: rpm -Uvh libXp-1.0.0-8.i386.rpm (you find the rpm on CD2 of OEL5)
  3. Download BI Publisher
  4. Extract the file: cpio -idmv < (the downloaded file)
  5. Do a Basic Installation of BIP: ./runInstaller
  6. Go for the defaults, which means you get a proper oc4j for your BI Publisher
  7. To configure your APEX with BI Publisher you may want to read my previous blog post.
    Be sure you did all pre and post installations for your DB and BIP.

Installation of BI Publisher Desktop 10.1.3.3.1 in Windows Vista

Installing software to demo on your daily OS, isn't maybe the smartest thing to do, but I already explained why I'm still doing it. Let's hope my settings will still be good at OOW ;-)

  1. Download and install Java Runtime Environment (JRE) 6 Update 3
  2. Download and install Oracle BI Publisher Desktop
  3. You may want to read this before installing BIP Desktop on Vista.
    I went for all default settings.
  4. In MS Word you'll see the BIP Add-in (see screenshot)

Friday, November 30, 2007

Dimitri @ UKOUG + APEX Meetup

I would normally leave on Sunday for the UKOUG of next week, but at the last moment I had to change plans.


I'll arrive instead on Wednesday morning in Birmingham, just in time to prepare for the APEX Roundtable of 12.25pm in Hall 1 Foyer Level 5. I look forward doing the roundtable with Anthony Rayner and Jeremy Duggan (this time I'm in the panel). I wonder if this roundtable will be different from the one at the other events in the VS (OOW, ODTUG, IOUG).

I'm also giving a presentation about the integration of Oracle Application Express and BI Publisher on Wednesday at 4.35pm. This is the same presentation I did at Oracle Open World.

There're a lot more APEX sessions at the UKOUG, John Scott gives an overview here.

It's a pity I will miss the first two days and the special nights (Blogger Meetup etc), but that's live... you can't do everything or be everywhere at the same time ;-)

John and I are also organizing another APEX Meetup on Wednesday at 7pm. The venue still need to be decided. If you know some good places, shoot! I don't know that much in Birmingham. So, if you want to have some drinks with other APEX users, feel free to join us!

See you in the UK!

Thursday, November 29, 2007

Myflimsyexcuse.com - New APEX website of SF

I realized I didn't blog about Steven Feuerstein's new website yet.

The myflimsyexcuse.com website was announced on Oracle Open World together with his new book "Oracle PL/SQL Best Practices 2nd Edition".

The website is completely build in Oracle Application Express (of course!).

It's a fairly simple website; there's a front end, which you see when going to the myflimsyexcuse.com url. You'll see two pages; one where Steven gives you some nice excuses and the second page to download some addition things from his book. There's also a back end, which allows Steven to manage his excuses.

I suppose I don't need to say this is one of the best PL/SQL books out there?

Wednesday, November 28, 2007

APEX or ADF?

There's already a lot blogged about "when" to use "what" development tool. At almost all Oracle events there's also a discussion about APEX, ADF, Forms, ...

A few months ago I also had some mail exchange with Chris Muir about what I thought are the strengths of APEX, and he about ADF. Normally an article should be made available soon. There were some other people also involved in this discussion, the final outcome is managed by Chris.

Next on the agenda... a live confrontation between the two technologies!

Michiel Jonckers of AMIS Technology (he was one of our students at our European APEX Training Days) contacted me with the question if I was interested to go on stage together with Lucas Jellema, a known "ADF lover" and a recognized Oracle speaker, to discuss the weakness and strengths of both technologies. I happily accepted, of course!

The date and place: Monday, December 17th from 16:30 till 21:00 in Nieuwegein (NL).

If you want to see the fight between APEX and ADF, register here.

Of course it's not a real fight ;-) Lucas and I will try to guide you through both technologies, the goal is not to have one winner. I guess at the end of the evening we should know what to use when...

Thursday, November 22, 2007

Oracle Application Express (APEX) 3.1 ready for your testing

As some others already blogged... APEX 3.1 beta is public now.

If you've seen the demos of the "Interactive Report Regions" you know they are worth trying ;-) You can see here an interactive report on top of the Emp table!

Warning: Use Firefox... in IE7 I still have problems! (Carl Backstrom warned us at OOW, but I thought it was bluf ;-))

You may also have had this mail from the APEX Development team:

The Oracle Application Express Team is pleased to announce the debut of our 3.1 release for public evaluation. To access our hosted instance, please register. If you have participated in a previous evaluation, you will bypass the short survey. After registering, you will be provided with access to the evaluation instance from which new accounts can be requested.

You will need to request a workspace and then wait on the email notification.

The new feature that we would really like feedback on is our new region type - Interactive Report. This is a new SQL query based region type that lets end-users customize which columns they see as well as column order. End users can also, sort, filter, break, sum, highlight, and add computed columns using simple pull down menus.

The full list of 3.1 features available with this Early Adopters release is:

  • Application Builder
    • Interactive Report Regions *
    • Templates
      • Improve Searching of templates
      • Replace Templates
      • Publish Templates
      • Bulk Unsubscribe of templates
      • 2 New Themes
    • Wizards
      • Allow for early exit when creating HTML region
      • Create Interactive Report Wizard
      • Remove 32k limit on Create Application on a Spreadsheet
    • Addition of Application Groups
    • Simplification of Page Group pages
    • Addition of Application Date Format
    • Support for Declarative Media Type
    • Can view existence of run-only application (but cannot edit them)
    • Display Application Name in App Builder footer
  • Workspace Administration
    • Workspace-specific Builder Notifications
  • Runtime Installation
  • APIs
    • Augment APEX_MAIL API to support adding attachments to e-mails
Please remember, the success of this Application Express 3.1 evaluation depends on user feedback. All participants are strongly encouraged to provide feedback using the feedback application. The link is also available from within the hosted Application Express 3.1 evaluation instance Home page.

Saturday, November 17, 2007

OOW07: The day after + heading back to Belgium

After a long sleep Patrick Wolf, John Scott, Carl Backstrom and myself went for breakfast. It would be our last breakfast together. Patrick was leaving at noon, Carl in the evening and John and I on Saturday.

Carl lived in San Francisco a few years ago, so he knew the city. He showed us some nice places and had some nice stories about statues and buildings.

We also visited a really nice store called "Sharper Image". That shop had so many gadgets (robots, digital paintings, special heating, ...) and an unbelievable chair! I tried it out and got a wonderful massage. I didn't want to leave, but the guys wanted to go further ;-)

At noon we went for the best Chinese in town... I must admit, it was a heavenly experience. Carl warned us the service wasn't that good, but the food was delicious. He was completely right, although I even found the service not that bad. If you're in San Francisco you definitely need to have some food there. Apparently there's always a long queue of people waiting for a seat, but it's worth it. It was the best Chinese food I ever had. I don't really know how the place is called, but Carl knows all about that ;-)

In the afternoon John and I went for some shopping and had a lovely dessert in the Cheesecake Factory at the top floor at Macy's. Also a recommendation to go there not only for the famous cheesecake but also for the nice view.

In the evening I finished my blog posts and had a last drink in the bar of the hotel.

Now it's time to go home. The thought I'll see my family again will help me to survive the long flight.
Bye Bye San Francisco...

OOW07 Day 4: My presentation + Last day

The week went very fast... as the days passed by I became more tired. Good it's the last day (Thursday).

In the morning I went for breakfast with John Scott and Marc Sewtz. In the States the breakfasts are pretty heavy. With almost all dishes eggs are served. If you know it's the third day in a row you can imagine I don't need eggs when I'm back in Belgium ;-)

After breakfast I went back to my room to go once more over my presentation, making sure my pc was still alive and the demos worked.

I went to Moscone West were I followed Tony Jedlinski session about "Mastering Application Express E-Mail". I already saw that presentation before, but I wanted to support him. I know it's a challenge to present on the last day ;-)

Then it was time for my presentation: "Advanced PDF documents from Oracle Application Express using Oracle Business Intelligence Publisher".

I didn't like the schedule... I not only had to present on the last day, my presentation was also the same time John had his (APEX) presentation! Normally we follow each others presentation, take some pictures and support each other. This time Apex Evangelists went head to head!

We both asked if they could change the schedule, but they didn't. It's a pity as a lot of people told me they didn't like to have to make a choice between two APEX presentations as they preferred to see both of our presentations.

John was talking about "Delivering pages in 3 seconds or less", mine was about PDF printing. Of course the people being in my session made the right decision. Did you ever hear somebody getting a raise because his page loads in 0.8 seconds instead of 0.9 seconds? Who notice that? ;-) Instead printing a nice PDF with some nice graphics to show your boss... I'm sure he'll be pleased!

Oracle gave me a very big room (capacity of about 500 people). I really liked the room, but it would be a bit too big, especially when two APEX presentations were going on the same time. I think about 60 people followed my presentation. One part of the audience were more into BI, where the other part were all into APEX.



It's a pity there are no evaluation forms at OOW as I would love to know what people really thought about the presentation. Afterwards some people came to me to say they liked the presentation, which I really appreciated. In such a big room it's difficult to "feel" the audience. It's always difficult to pitch the content. Is it too basic? Is it too advanced? If you were in my session, feel free to put a comment what you thought about it or how I can improve the presentation.

After my presentation I was really hungry and needed a drink. Last year I had Nacho's and I really wanted to taste that again. So John and I went to the same bar we held the APEX Meetup last year (and this year). In the bar we saw Doug Burns and Chris Muir and joined them. A bit later other Oracle bloggers joined us.



Afterwards we went to the OOW Wrap-Up, basically the last closing party of Oracle Open World. We had some more drinks and food. Doug, Tim, Chris walked to the Irish pub close to the Hilton hotel, but as I was so tired and wanted to drop my bag (with my laptop) I took the bus to my hotel and would join them later. In my room I dropped my bag and wanted to quickly check my mail, but I literally "crashed". I fell a sleep and before I knew a few hours passed by.
Sorry guys I didn't make it to the Irish pub anymore!

I enjoyed Oracle Open World a lot but it was also very tiring.