Sunday, December 20, 2009

APEX 4.0: new public packages

I looked at the package we would be able to use in APEX 4.0 and saw some new ones.

Packages make it possible to do things in your own PL/SQL code which APEX does for you in the wizard. E.g. If you want to call a webservice, you can use the APEX Wizard to set this up, but it might be useful to do that from your own PL/SQL procedure or from a process in your APEX app.

On I had to write a lot of custom code to read the different rss feeds. If the APEX development team opens up the packages they use behind the scenes you can just leverage these and don't need to write your own.

Another good example which happened in APEX 3; everybody wanted to send mails with attachments, so we all wrote our own package to do that, in APEX 3 (if I remember correctly) the APEX Dev team provided a new package called apex_mail which did that, so you could just use it to send emails without having to write your own anymore.

The same with APEX 4.0, the more package they provide, the better. So here are the new ones I found so far (it's hard to research them without SQL Developer or having access at the code):

The packages speak for themselves I guess ;-)

Let me give you two examples, you can just do desc apex_javascript yourself in SQL Commands to review the full definition.

SQL> desc apex_javascript

So it looks like we can add attributes, add onload events etc directly from a PL/SQL package. You probably want to use this package a lot when you write your own plugins.

SQL> desc apex_web_service

This is a really cool package. It's the same (as far as I can see) as the flex-ws-api Jason Straub wrote. If you need that already in APEX 3.x you can download it from the sample code website.

Doing research on APEX 4.0 is so much fun ;-)

No comments: