Saturday, July 26, 2008

Installing a Java app is so easy

I'm currently trying to install a java program and it's a nightmare.

The steps you need to make to just be able to install it, is unbelievable.
I'm running Oracle Linux and the program I'm trying to install needs jdk 1.5, which I don't have. No worries, go to the Sun site and you can download it there. I first tried to download the jdk with Sun's download manager. It never worked on my Mac! It took me 15 minutes to figure out there's also a direct link to get the download.

I didn't even touch the application, I'm just preparing my system to get another java app running. To get my system ready (investigating and installing) it took me about an hour.

Next to do: install a webserver. You can go for JBoss, Tomcat or others, but these two are in the documentation and well explained, so I went for Tomcat. I just hope it all doesn't interfere with my current system. I'm not sure you noticed, but I'm still not starting the install of the real app I want to test.

Finally I can install the java app itself. Of course all decends apps also need a database, so most of the java apps I know recommend to use MySQL, but as I'm against that and only want to use Oracle, I'm going for that. It's supported so it should work.

I tried to run the app and got a nice java error. I probably need to do some more investigation, but I don't find it strait forward to have a java app running in a short time.

With the upgrade of the app, I'll probably need another version of java and the nightmare starts again.

The world of Java is so nice. You just take one file and install it in your environment and there you go, right?!

Friday, July 25, 2008

When you've too much time...

On the way back to the hotel I recorded a little video with my camera. As I'm away from family I played around with iMovie (a great product which you get with OSX).

I put some music on it and tried to get it on YouTube. It's a matter of a click in iMovie. I didn't do any fancy thing, but as I found the video funny, I decided to keep it there.

So nothing educational or APEX related, just a man on his Vespa.

The title of the video: "My friend - Rich aka "the Fonz"

Friday, July 18, 2008

Show Blob of other table in APEX Form

A few weeks ago I got a mail with this question:
--
I read your answer in the forum on a problem regarding : display BLOB in Apex.

My question is if it is possible (and HOW) to display an image on a form page based on table A but the image is in table B (and table A contains the values to read the blob(s) from table B).

I guess I have to add an (file browse) item in the form but what's next ??
--

It's not that difficult to get around this problem with the standard functionality in APEX 3.0 and up, if we use the BLOB support that the APEX team developed for us.

Our test case:
* Database level


CREATE TABLE ex_A
(
id NUMBER(6) ,
name VARCHAR2(50),
picture_label VARCHAR2(30),
picture_id NUMBER ,
CONSTRAINT EX_A_PK PRIMARY KEY (ID)
);
CREATE TABLE ex_B
(
picture_id NUMBER ,
picture BLOB ,
picture_filename VARCHAR2(100),
picture_mimetype VARCHAR2(100),
CONSTRAINT EX_B_PK PRIMARY KEY (PICTURE_ID)
);

* APEX level

Create a new application with a Form based on table ex_A and a Form based on table ex_B by following the wizard.

We adapt Page 2 - Form based on table ex_B - and change the item P2_PICTURE to


(On Page 2 and Page 1 I also made the Hidden and Protected item - the pk - visible as I don't have a trigger to populate it, so I just give a unique id in myself.)

So now the answer to the question... How do you display the blob from ex_B table on the form that is based on table ex_A?

Add a new item: Display as Text (does not save state) and in the Source (PL/SQL Function Body) you specify:


As you can see we use the APEX_UTIL.GET_BLOB_FILE_SRC function. It will look at page 2 for the format of the blob and will pass the picture_id to it.

If you upload a file on Page 2 and after wards in Page 1 you reference the picture_id, it should get displayed.

You can try to upload a picture yourself here. Click first the Ex_B tab and upload a picture, next go to Ex_A tab and create a reference and add the same id as for the one you used for the picture.

The export of the application can be found here (save as blob_support.sql).

Hope that answer the question.

Sunday, July 13, 2008

APEX at OOW '08 - Sunday

From September 21-25, Oracle Open World (OOW) 2008 will take place in San Francisco. OOW is the biggest event of the year.

There will be a lot of Oracle Application Express (APEX) sessions. The complete schedule is not yet defined, as you can still vote on some sessions in the Oracle Mix.

On the Sunday we plan an "APEX Day" with the two biggest User Groups.

Before noon, IOUG will host a two hour "Ask the Experts Panel". It will be an excellent time to ask all your questions to a panel of leading experts in the APEX domain.

In the afternoon ODTUG will host "the little APEX Symposium with Case Studies". If you were at ODTUG Kaleidoscope before, I heard a lot of good feedback about these sessions as they provide real world examples of APEX implementations.

During the week there are already over 20 APEX sessions planned! You can find them at the Content Catalog.

Once the agenda at OOW is finalized, we'll also plan another APEX Meetup to meet eachother in a more fun, relaxed environment ;-)

More information to come... but it will be worth going!

Friday, July 04, 2008

APEX is getting popular

On Tuesday I was in the Netherlands to give a presentation about "The Future of APEX".

The location was astonishing! The place is called Media Plaza and is located at the "Jaarbeurs" in Utrecht, the Netherlands. It's definitely an innovative place where you get lots of ideas, so a very good place to talk about Oracle Application Express.

There were 135 people subscribed for this free seminar, so we can definitely say that APEX is gaining a lot of interest. I did a poll about who was in the audience and everybody already heard about APEX! Not everyone worked with it yet and I was surprised there were so little on the latest version of APEX. But that turned out great, as I could show them some cool new features ;-)


We split the evening in two parts. In the first part I briefly talked about my way to APEX, gave an introduction in APEX, but for the most part I did a demo with hints & tips. I like to show things and I think APEX is really good for that.

I created a completely new application and included some of the nicest features in APEX: of course Interactive Reports, but also how easy it is to include images (Blob support), do PDF printing and adhoc changes.

I liked the interactivity with the public very much! For ex. I gave an example where I created a new column in the Interactive Report, called "new list price", basically the list price of a product increased with 10%. At one time a nice lady asked me if the new value is physically stored in the database (which isn't) and how to get the changes in then. I first started to explain how you could do it, but as APEX is extremely RAD, I just decided to do it in front of 135 people. Live demo's is always a risk, but if it works, the public loves it! Doing these little things shows the real power of APEX.


In the second part I talked about the future of APEX or what we may expect in the coming releases. I briefly touched custom item types, new versions of 3rd party products, declarative ajax, improved error handling etc. but most of the time I spend on the Forms migration to APEX tool the Apex Development team is working on (I recorded David Peake's presentation at ODTUG ;-)), the Data Modeling capabilities that will be in SQL Developer and of course Websheets!

Looking at the many questions I got, the feedback afterwards and that people started to be enthusiastic with each other about our lovely development tool, I believe this evening was a success. I definitely enjoyed doing it!