Tuesday, June 30, 2015

Make even more of UKOUG Tech15: APEX 5.0 UI Training - Dec 10th in Birmingham !


APEX 5.0 has been released this spring. People who have already spent some time on this new version know this version is packed with new features aimed to make APEX developers even more productive, like the Page Designer.
Another striking new subset of features is aimed at creating better looking user interfaces for your APEX applications in an easy and maintainable way.
 The definition of user interface components in APEX 5.0 is very different to what we're used to. For example there is a new Universal Theme with Template Options and a Theme Roller. To get you up and running with this new toolset as quickly as possible, Dimitri Gielis of APEX R&D and Roel Hartman of APEX Consulting have joined forces and set up a one day course fully aimed at APEX 5.0 UI. So if you want to know not only how to use the new Theme, but also how to modify it to fit your needs, this is the event you should attend!

The training will be at the Jury’s Inn in Birmingham (UK) on Thursday Dec 10 - so conveniently immediately after the UKOUG Tech15 conference. More information and registration see www.apextraining.eu.

If you are from another country and think this training should be available in your country as well, please contact us - then we'll see what we can do!

Thursday, May 14, 2015

APEX 5.0 UI Training - Looking back and towards the future

This week Dimitri Gielis and I ran a training day about all the new APEX 5.0 UI features. We had a full room with 20 enthusiastic attendees from 4 different countries. We covered some general APEX 5 UI features, the Universal Theme, Responsive Grid layouts, Template Options, Theme Roller, Theme Styles and bringing it all together using some advanced features. See the website for more details.
And - as it was the first time - we received some very valuable feedback in order to make a next run even better. Thanks to all attendees for that!

And for a next run we are thinking about different options:
1. On line (broken down in 3 parts)
2. Another one in The Netherlands or Belgium
3. Somewhere else in Europe (Germany? Scandinavia? UK?)
4. Somewhere else in the world. 

Please let us know what you think. Please leave a comment or drop an email with your thoughts. We would really appreciate that.

Monday, March 16, 2015

APEX ReadOnly Pages - The easy way

If your Oracle APEX Application requires different types of access - full access or readonly - for different types of users, you can specify a Read Only Condition on Page level (or Region, Item, Button, etc.). 
You can set an Authorization Scheme on Application level, so it'll be applied to all pages. So if you have an Authorization Scheme named 'User Can Access Page' defined by a PL/SQL function like this:

return apex_authorization.user_can_access_page
( p_app_id  => :APP_ID
, p_page_id => :APP_PAGE_ID
, p_user    => :APP_USER
); 

then you can code all the logic in the database using the APEX Repository, your own tables or a combination to define whether a user has access to that page or not.
But alas it is not possible to define something similar Application wide for a Read Only condition. You can specify an Authorization Scheme 'User has Read Only Access' using a similar signature as the one above and use that on each and every page in the Read Only Condition using the APEX API:

apex_util.check_authorization( p_security_scheme => 'User has Read Only Access');

that way you still hide the PL/SQL logic. But you have to apply that to every Page ... and that's not very developer friendly. Another downside is that the Page is actually really rendered as readonly: It looks very different to the same page in regular updatable mode. So your layout may be screwed. The advantage is, it is (almost) impossible to hack a page rendered like that to make an illegal update to your database.

So can we achieve a similar / better result with less effort?
Yes, we can. Let's define a Dynamic Action (DA) on Page 0 that'll only run when our previously defined "ReadOnly" Authorization Scheme is met. That DA will run a snippet of JavaScript "On Page Load" :

// Remove Delete, Save, Create buttons and the Popup LOV and Calendar icon
$('a').has('.fa-trash-o, .fa-floppy-o, .fa-plus, img.uPopupLOVIcon').remove();
$('img.ui-datepicker-trigger').remove();
// Switch off input fields within div.uRegionContent 
$('input, select, textarea', 'div.uRegionContent').prop('readonly', true).prop('disabled',true);

So this is removing a number of "update" buttons and set all items to readonly and disabled. Be aware the selectors - especially for the buttons - may be different on your own environment depending on template settings etc.
But although the initial result looks good, as the layout isn't changed and all the items are not updatable, it isn't very secure. The buttons are removed - which is already a tad safer than just disabling them - but I can re-enable all the Page Items with just one line of JavaScript. And also a page submit doesn't require a lot of JavaScript knowledge. So if I can open up my browser console, it is easy to conquer this carefully crafted Read Only Page...
And of course we can add a Condition or Authorization Scheme to every page process to make sure they only run for users with full access, but that would require a lot work again!
So we have to close down the backend as well. And preferably not by adding triggers on every table.... But we can interfere with the PL/SQL that's executed when the page is submitted: There is a section called "Initialization PL/SQL Code" under Security Settings. Although that sounds like it runs only when you "initialise" a page .... it also runs when you initialise a submit!
So if we enter something like this piece of PL/SQL in that section:

if apex_authorization.user_has_read_only_access
   ( p_app_id  => :APP_ID
   , p_page_id => :APP_PAGE_ID
   , p_user    => :APP_USER
   ) and :REQUEST in ('SAVE', 'DELETE', <and a lot more>)
then
  raise_application_error( -20000, 'You are trying to make some changes with Read Only privileges' );
end if; 

a user with Read Only access who tries to fire an illegal SAVE or DELETE request, will be blocked (although that message isn't shown). If you look in the (standard) DML Processes you can see there are quite a lot of requests that should be in that list. Be aware that other - especially unconditional request - are not protected by this!

But with just one snippet of JavaScript and one piece of PL/SQL we implemented a Read Only feature on each and every page of our application - and the pages still look exactly the same!

Tuesday, January 27, 2015

Announcement: APEX 5.0 UI Training - May 12th


APEX 5.0 will be released between now and the end of May. People who have already spent some time on the Early Adopter versions know this version is packed with new features aimed to make APEX developers even more productive, like the Page Designer.
Another striking new subset of features is aimed at creating better looking user interfaces for your APEX applications in an easy and maintainable way. 
The definition of user interface components in APEX 5.0 is very different to what we're used to. For example there is a new Universal Theme with Template Options and a Theme Roller. To get you up and running with this new toolset as quickly as possible, Dimitri Gielis of APEX R&D and Roel Hartman of APEX Consulting have joined forces and set up a one day course fully aimed at APEX 5.0 UI. So if you want to know not only how to use the new Theme, but also how to modify it to fit your needs, this is the event you should attend!

The training will be at the Mitland Hotel in Utrecht (NL) on Tuesday May 12.
More information and registration see www.apextraining.eu

If you are from another country and think this training should be available in your country as well, please contact us - then we'll see what we can do!

Friday, January 23, 2015

Riga Dev Day 2015

While waiting at the airport for my plane back to Amsterdam, I have some time to write down my experiences of the last few days in Riga.
After arriving in the hotel, I walked to the old part of town and strolled around. The old part looks very medieval (it is - so no surprises there) with cobblestone streets, old houses and very few cars. Nice!
Then back to hotel, in time for the "official" speaker tour. With a small bus we toured around town for 45 minutes and we walked the old town (again) for another 45 minutes - but now including some stories about the buildings we saw. It was rather cold, so I was quite happy when we got back to the bus and on to the restaurant for the speakers dinner. All very well organised "extra's". Thanks guys!

The event itself was held in a movie theatre in a mall. About 400 attendees filled up the large keynote room pretty quickly. The nice thing about this setting is that the screens are huge and excellent: I've never seen my presentation that big! Also the fact that some people were eating popcorn during the presentations added something to the "movie effect". I would like to see more events in venues like this!
As they conference was a combination of three user groups (Google Dev, Java and Oracle) it was very easy to attend a session that is way out of my comfort zone. So I did a few sessions on Android, Node and REST API's. Just to see something different. My own session was well attended with around 50 people. Just a few of them were actual APEX Developers, the rest was DBA, PL/SQL - or out of their Google/Java comfort zone.
After the event we grabbed a cab bak to the hotel to drop off our bags and a cab back into the old town for the afterparty. Music, some food and lots of drinks. It was fun. Afterwards a cab back to to hotel for the after-afterparty. 
This morning after checking out, I walked back into the old city to check out the parts I haven't seen yet, like the big market halls. Then taxi back to the airport...

All in all a great event, very well organised. Thanks for inviting me - and thanks to the Oracle ACE program for the support !

Thursday, December 11, 2014

Can you build business critical applications with APEX?

Now and then this question pops up. And today this question was delivered in my mailbox again. A customer is starting a project to replace a current Oracle Forms application. So he asked Oracle and one of the Oracle partners: What should we use, APEX or ADF? A valid question that has been asked - and will be asked - by numerous customers. 
Of course, there is only one correct answer and that is: "It depends…"

But in this case, the Oracle representative and the partner answered (according to the client - so their might be some noise on the line) that you can’t build a business critical application with APEX, but only in ADF. My reaction was: "Sigh, here we go again…"
The mean reason was : Many APEX users means a high load on your database server. Most other solutions will have a high load on the application server, but the database server doesn’t suffer from that.

So what would my reaction be? Herewith some of my thoughts:

1. As this application is positioned as a replacement of Oracle Forms, all current users of the application already have their own session in the database. So if the current database can handle that volume of users, an APEX application - where you share the database resources / sessions - can handle even maybe up to 10 times more users.

2. There are examples out there of APEX applications that have a heavy load and are business critical. The internal Oracle Aria People system (to look up employees) may be a small one, but very heavily used and business critical as well - see Joel's blog for the proof of that. Another client of mine uses APEX as the main part of their logistics process. Up to a 1,000,000 page views a day serving 100’s of users. And certainly very business critical. 

3. In my opinion you can build everything with APEX. That doesn’t mean you should. There are certainly use cases where APEX wouldn’t be the tool of choice. And where ADF or .Net or whatever would be a better choice. But that’s all dependent on the situation. So in this particular case I can’t tell whether APEX would be the tool of choice. Maybe it is, maybe it isn’t.

So the statement “You can not build business critical applications with APEX” is simply not true. I would really like to see this based on evidence. If you say something like that, you have to prove it: What APEX projects building a business critical application failed because APEX just couldn’t handle it? I know some ADF projects that either failed or ran way out of time. A proof of the latter is Oracle’s own Fusion Applications. Oracle spent over 50,000 man years on building Fusion Apps. If you would remembers the first announcements, you know it was a couple of years late…. I don’t see that as a prove you can’t build something like that with ADF. I wouldn’t suggest you should build Fusion Apps with APEX. Not at all. But Oracle’s Fusion Apps project is often used as the “proof” you should use ADF for business critical applications. My conclusion is: Building Fusion Applications wasn’t the huge success / example project as it is often claimed for. And as a side remark: I really would like to meet the customer that can afford spending 50,000 man years of work. No other company in the world would or could do that! So the project of this customer we’re talking about is maybe1% of the size of Oracle’s one. But probably more in the magnitude of 0.01% = 5 man years. So my conclusion is: What works for Oracle doesn’t necessarily apply to you! It is all dependent of the situation. You can't and shouldn't generalise on this matter. That's like saying that you need the same tools and approach used building the Burj Khalifa in Dubai when you're building your own house.

Another issue, quite easily overseen at first, is the number of available ADF resources is rather limited - outside of Oracle. There are just a few companies that deliver theses scarce ADF resources. However APEX resources are widely available. So do you want to be dependent on just a few companies to deliver what you need? Or do you want to compare and make a well balanced choice? And of course there is a reason there's just not that many ADF developers...that's because there not that many ADF projects. Recently I heard a rumour that there were less than a 100. Worldwide...
And if your currents staff is used to code in PL/SQL and Oracle Forms they can be productive in APEX within a few days, while being proficient in ADF takes way longer.

Oh, and you would like to see some (general) proof that APEX can be used for building big business critical applications? Check out these examples:
- CampusIT from Dublin has created "Student Interaction and Management Solutions" in APEX - used by 100,000's of students, teachers, etc.
- Hoyer is using an APEX system, build by Yellowstar to manage their logistics. The previous version was based on Java btw.. It is huge, with 1,000's of pages and very business critical. You can read more about it on this Oracle's official own Customer and Partner page. So it seems that the statement that you can't use APEX for this kind of projects is not Oracle's official point of view. But more a personal opinion of the Oracle representative this particular company spoke with. And the bespoke partner might had some influence as well - being a 95% ADF shop....

If you have more examples of business critical APEX applications with some public accessible information, please leave a link in the comments and I will add it to this list!



UKOUG 2014 - A special edition

Although I’ve attended the UKOUG conferences since 2008, this year’s edition was somewhat special to me. Based on the attendee reviews of last year’s UKOUG, I was elected as “Best Overseas Speaker”. And for me that’s quite an honour and of course a recognition for years of work - and practice ;-)
And with a title comes a plaque - it’ll get a special place on my bookshelf. 

I didn’t just get all the way to Liverpool to collect my award. I also did three presentations - from my point of view it was only 2.5, but I have to round up according to Brendan Tierney…
The first one I did was “Ten Tiny Things” about a couple of the less known new features of APEX 5. And I showed something even one of the APEX Development Team members didn’t know ;-) . The second one was together with Brendan (that’s why I usually count this one only as .5) about the things you can do with the Oracle Data Miner and Oracle Text features in combination with APEX. We both thought it went very well and we had some very positive feedback.
The last one - and even the last one of the conference - was the same presentation that won that prize last year about creating hybrid APEX applications. Although I have done this one quite some times, I still like doing it.
Apart from my bow presentations I attended some other ones of course. Especially the ones about NodeJS - one from John Scott and one from Alex Nuijten - got my attention. And of course the presentations of the APEX Development Team about APEX 5: You see some new stuff every time they show it. And getting more and more eager to get my hands on it !
Alas I had to miss some of the sessions, because a couple of rooms were so tiny, they could only hold like 20 people or so. So they “sold out” in minutes. Too bad - luckily that doesn’t happen in Birmingham (where the conference will be held again next year).
And apart from the sessions, it again was an excellent opportunity to hang out with all the old and new friends. Really enjoyed it again. Hope to see you all back in Birmingham next year!

Thursday, September 25, 2014

I am running for the ODTUG Board of Directors

After some thought, I decided I will be running for the ODTUG Board of Directors this year. I have been attending Kscope since 2008 (New Orleans). Presented at Kscope and APEXPosed since 2009. Did a few webinars. Was a member of the APEX Content Team for Kscope12 and 13. And now I am the Content Lead for the APEX track for KScope14 and Kscope15. So I like spending my free time for ODTUG, to keep Kscope the best conference out there. But ODTUG is more than Kscope. And I would love to add my time, expertise and network to ODTUG in order to do more.
So that's why I am running for the Board.

But it seems I am not the only one running.... As for four positions, there are 24 nominations. Twenty-four! That means the changes are slim, but it shows how vivid ODTUG is. Most organisations that run on volunteers have a hard time filling these kind of positions. ODTUG doesn't. I don't have a full list of names, but I now know about six of them. And they are all well known persons and excellent for the job.
So that's good for ODTUG. Good for the community. And good for you.

My campaign will be focused around internationalisation. The current Board members are all based in North America. So it is natural ODTUG's focus is in that area. But luckily there already are some initiatives to "go global" - but that's not so easy. So I would like to add the views of other regions to the board, whether it's Asia, Australia, South America or Europe. In my opinion ODTUG should go more global, in close collaboration with the local user groups. (Co-)Organising events, webinars and web pages in other languages, etc. Doing so ODTUG should be able to get more members in those areas as well.
That's good for ODTUG, That's good for the community. And good for you as well.

My second focus will be around my favourite Oracle tool of course: Oracle Application Express. So I am in favour of special events that focus in APEX - like the APEXposed we had earlier. And probably we can make this global - that would be awesome. The APEX community within ODTUG already has a strong presence. Therefor we should benefit from this presence and grow even more.
That's good for ODTUG. Good for the community. And thus good for you.

You can cast your vote between October 7 and October 28. And you have to be a paid  member to vote. But that's only $99 a year. And for that small amount of money, you are not only allowed to vote, you have also access to tons of material: articles, recorded webinars and presentations. And you get either a discount or free access to ODTUG events. So in the end ... becoming a member is a no-brainer. Thus if you haven't signed up for it: do it now.
Good for ODTUG. Good for the community. And definitely good for you!

Oh, and then don't forget to vote in October. On me ....