Skip to main content

Collaborate 2011 - Day 4

The fourth day already...starting of with APEX, Tales from the Trenches by Paul Dorsey. Paul presented the results from a number of interviews (via email) he did with APEX users. He picked the people that presented on APEX somewhere (like me) and asked everyone things like, what do you like about the tool, what not, what's easy, what's not etcetera. And he presented the results of all this with his own opinions on top of it. One remarkeble quote of Paul (so don't shoot me, I am just the messenger): "APEX has succeeded, ADF has failed". This based on the "facts" (as Paul sees it) that most ADF projects fail and almost all APEX projects are succesful. Apart from that: The APEX community is growing, while the ADF community stays on the same level - but that probably will change when Fusion Apps will take off. The bottom line of his talk was: there is something way better than all of this and that's my product "Formspider". But alas for Paul, his product fills in some disadvantages of APEX that nobody sees (or even bothers)...but Paul himself.
After this session, Scott Spendolini, David Peake and myself had a talk about it - and some enhancement requests for APEX 4.x. So I missed the session I originally had planned to attend.
Next I went to a session about Oracle VM. With Oracle VM you can run multiple different guests, containing different operating systems and/or database versions on the same hardware. Good for short term labs situations: Easy and quick to set up, run your tests and destroy the VM. The VM can be managed using Oracle Enterprise Manager. O, yeah, did I already mention it was free? It is not similar to something like VirtualBox, because when you use Oracle VM, that VM is the Operating System (and Windows or Unix is just a guest). Great for training, testing, patching, trying out new technology and products. As a result you can apply patches faster and more frequently in production, just because it is easier to test them..
Just before lunch there was a 30 minute session about Dynamic SQL in APEX. Usually only used for reporting. Tip: Use apex_application.debug( ) within the dynamic part to show in debug mode what's been generated. Can make your life much easier. Alas, dynamic SQL doesn't work in Interactive Reports. A solution is using collections (another solution is using pipedlined functions, but the presenter didn't mention that. Getting the column names right might be a bit nasty though, but you can even use a function that returns those column names.
Scott Spendolin presented on Security in APEX. I think I've seen it before, because it sounded all very familiar - but you can't here it often enoough! Scott talked about multiple security issues and several ways to protect you against it: Be aware that the danger comes from within... First, create a "shadow" schema with read only views on views owned by the actual "data" schema. All DML should be executed using procedure calls, so you have to change the processes in the pages (another solution is: create a regular view with instead of triggers that use the API calls). The framework for these calls can be generated automatically within APEX. Be sure to revoke all privileges from the shadow schema (maybe not at first, but certainly in production) - as a side effect you can't use supporting objects anymore, as the schema has no rights to install them. And add system level triggers to prevent dropping objects. Another tip is : Reduce data access using context settings in every query. 
Back to back, Scott had another session about APEX Maturity. He walked us trough the whole history of APEX, from conception until where it is now. Interesting and especially entertaining.
The last timeslot was for my own presentation on building a Plugin for Google Visualizations. As I had noticed that the audience wasn't very mature yet, I had to change it a little on the fly - as only one person in the audience had ever used a plug-in, let alone build one! Afterwards I think I should have taken a complete different direction, by just showing them what a Plug-in can do for you - and skip the build stuff all together. But that's aftertalk. But they where amazed by the updateable Organizational Chart of course...sub-zero!
After all that, and some chilling down, Universal's Island of Adventures was at our disposal! So with no lines at all (instead of the regular 2, 3 + hour waiting lines), we could enter any attraction. And the most spectacular one, without any doubt, is the Harry Potter ride (check it out on YouTube). It's a sort of rollercoaster ride, with movie projection and a ghost house. Never seen something like that. Spiderman was also good (a little "lighter" than Potter), but a combination of a 3D movie and a rollercoaster like ride has it's effects...

Comments

Unknown said…
Thanks for the updates !
Learco Brizzi said…
Nice to read your update!

Popular posts from this blog

Filtering in the APEX Interactive Grid

Remember Oracle Forms? One of the nice features of Forms was the use of GLOBAL items. More or less comparable to Application Items in APEX. These GLOBALS where often used to pre-query data. For example you queried Employee 200 in Form A, then opened Form B and on opening that Form the Employee field is filled with that (GLOBAL) value of 200 and the query was executed. So without additional keys strokes or entering data, when switching to another Form a user would immediately see the data in the same context. And they loved that. In APEX you can create a similar experience using Application Items (or an Item on the Global Page) for Classic Reports (by setting a Default Value to a Search Item) and Interactive Reports (using the  APEX_IR.ADD_FILTER  procedure). But what about the Interactive Grid? There is no APEX_IG package ... so the first thing we have to figure out is how can we set a filter programmatically? Start with creating an Interactive Grid based upon the good o...

apex_application.g_f0x array processing in Oracle 12

If you created your own "updatable reports" or your custom version of tabular forms in Oracle Application Express, you'll end up with a query that looks similar to this one: then you disable the " Escape special characters " property and the result is an updatable multirecord form. That was easy, right? But now we need to process the changes in the Ename column when the form is submitted, but only if the checkbox is checked. All the columns are submitted as separated arrays, named apex_application.g_f0x - where the "x" is the value of the "p_idx" parameter you specified in the apex_item calls. So we have apex_application.g_f01, g_f02 and g_f03. But then you discover APEX has the oddity that the "checkbox" array only contains values for the checked rows. Thus if you just check "Jones", the length of g_f02 is 1 and it contains only the empno of Jones - while the other two arrays will contain all (14) rows. So for ...

Stop using validations for checking constraints !

 If you run your APEX application - like a Form based on the EMP table - and test if you can change the value of Department to something else then the standard values of 10, 20, 30 or 40, you'll get a nice error message like this: But it isn't really nice, is it? So what do a lot of developers do? They create a validation (just) in order to show a nicer, better worded, error message like "This is not a valid department".  And what you then just did is writing code twice : Once in the database as a (foreign key) check constraint and once as a sql statement in your validation. And we all know : writing code twice is usually not a good idea - and executing the same query twice is not enhancing your performance! So how can we transform that ugly error message into something nice? By combining two APEX features: the Error Handling Function and the Text Messages! Start with copying the example of an Error Handling Function from the APEX documentation. Create this function ...