Oracle & APEX Geekery

Friday, December 22, 2017

Recently I got this question (or better specification) from a customer:

"For exchanging data, we either want a SOAP webservice or a REST service offering a WADL".

WADL?

What's a WADL? I know WSDLs as descriptive endpoints for SOAP webservices, but WADL?! It occurs, that WADL's are intended to do just that, but in a more generic way. WADL stand for Web Application Description Language. The World Wide Web Consortium (W3C) currently has no plans to implement WADL as a standard. Oracle's ORDS is going the swagger/openapi route which is partially implemented in the 17.3 release.

With no existing functionality to provide a WADL for Oracle RESTful services, I had to come up with my own solution, using the APEX repository views to generate a WADL endpoint. I came up with a small procedure for this and add an additional URI Template to my service, called "wadl" with a single GET Resource Handler calling this procedure.

WADL endpoint in APEX RESTful definition

Because the RESTful service I had to provide was fairly simple, my solution is far from complete. In addition, the WADL definition structure examples I found were not really clear on which elements to include or not. So, I decided to provide my solution as a GitHub project, open for anybody who wants to contribute. In addition, I have used my procedure to provide a WADL on the "oracle.example.hr" example RESTful service in my Oracle Application Express workspace on apex.oracle.com. After some modifications (on the example), I was able to load the definition into SoapUI.

RESTful Module oracle.example.hr in SoapUI from imported with generated WADL

Naughty APEX RESTful service definitions

I tested the generated WADL with SoapUI, and the program does show all the handlers defined including all parameters. Unfortunately, a WADL is somewhat stricter then an APEX RESTful service definitionwhen it comes to case-sensitivity. Parameters have to case-match the resource path definition, which wasn't the case in the oracle.example.hr RESTful example. The 5.1 example has one definition per resource/URI template. In earlier version, I have seen multiple definitions with the same URI resource path (for exampleemployees/{id}), and in the APEX RESTful repository, parameters are always stored as child records of a resource handler (PUT, GET, …), while parameters can either be on resource template level or on handler level. Makes sense, as the {param} part of the path belongs to the resource, but you might want to pass some HTTP header parameters with the PUT request for a resource only, while the GET just needs the resource parameter. Not all parameters from the resource paths were defined as parameters in the resource handlers, so I had to add those. I provided an export of the "corrected" example RESTful service on the GitHub project of my WADL generator procedure.

Contribute

Well, I have a reasonably well working WADL generator for Oracle ORDS/APEX RESTful services now. It sure needs improvement for other cases, I bet. So, if you need to provide a WADL for your RESTful service in APEX, get the code from myGitHub project. If you have enhancements, please contribute to the code.

Friday, October 13, 2017

The APEX SmartPivot Plug-in is an Oracle Application Express Plug-in that enables users users to analyze data much like they are used to in Excel. It allows to present data in a customizable multilevel data grid. Developers can add the plug-in to any APEX application, just like adding an interactive report.

What’s new in Release 1.1

The new release of the APEX SmartPivot Plug-in focuses on integration with the latest APEX
version:

Users/UI Enhancements

Font APEX

The UI now supports Font APEX in APEX version 5.1 (Font Awesome in APEX 5.0). Your pivot report will look consistent with the rest of your application.

Font APEX can also be used in conditional formatting rules.

Conditional Formatting

Users can define, apply, save and share conditional formatting rules with a report layout. Conditional formatting is not restricted to setting text and background colors, but offers to translate (ranges of) values into text. For those users familiar with HTML: the text output can contain HTML, so even images or Font APEX can be used for presentation of the data.

Excel Export Enhancement

When exporting to Excel, the data and format will be kept exactly as in the APEX SmartPivot grid report.

Developers Enhancements

The APEX SmartPivot plug-in now supports report columns the same style as APEX Classic or Interactive Reports.

What about APEX 4.2 support?

Release 1.1 requires APEX version 5.0 or higher. For customers using Oracle Application Express 4.2 version 1.0.5 of the APEX SmartPivot plugin is still available and supported.

Sunday, June 26, 2016

Most of the information on APEX 5.1 has been presented at conferences earlier this year, but here at Kscope there are 7 sessions from APEX Development team, entirely dedicated to APEX, which makes this the single most important one-event source of APEX news.

Here a short summary of the, in my opinion, highlights from the presentations of the Oracle APEX development team´s presentations.

1) Shakeeb showing improvements and new features in Universal Theme 5.1

- Font APEX icons replacing Font Awesome. That is: you can choose, but the APEX team did a wonderful job on the APEX Font, like adding declarative icon modifiers (an icon with an additional small icon in the lower right corner) in a different color. This is not only easy to use and very beautiful, but very useful too. I like this a lot.

- UT JavaScript events are available and usable. Great for someone trying to customize UT, as UT makes extensive use of adding/removing classes on certain events, like hover etc…

- An integrated button builder! Are you kidding? Love this.

- easy upgrade from UT 5.0 to 5.1, if you left your applications UT copy subscribed. Custom components will be left untouched.

- The UT sample application has been refurbished to reflect all the new feature. Very nicely done. This is one of my most favorite references, next to APEX API guide.

Conclusion:

The direction the APEX dev team took when developing UT is continued with these improvements, making the APEX developer life more and more easy. There is a lot (very much!) you will get out-of-the-box with UT in APEX.

2) Marc talking about Page Designer (enhancements):

- Component view is now integrated with the new Page Builder IDE as a tab and not a separate page anymore. Legacy Old Component View will be deprecated in 5.1, de-supported and removed in 5.2. The new component view component is fully integrated in the Page Builders client-side mechanism.

- except for some improvements in UI of the attribute tab there are not a lot changes, as far as I can notice. I really would have liked to see some of the features that are currently provided by the browser-plugin-name to be integrated in this release, as these have been proven to be very handy and just give you this extra bit of productivity. The Page Builder, after all, is very click-intensive and will let your mouse run a lot of miles/kilometers and every additional shortcut is welcome.

plans for Page Designer beyond 5.1:

- components options tab in attributes pane instead of item in tree

- more intuitive editing when creating new components, instead of error in item/region, like having to enter a query.

- declarative support for most Oracle JET Chart components, entire library included, so special charts, not decoratively included can be coded manually.

- Jet charts are default option in builder. Responsive! Query in region source enables multiple series to be based on it.

- upgrade path from AnyChart to Oracle JET-Charts, … with tools, not the plug-in examples

Conclusion:

Charts in APEX 5 very powerful and nicely integrated with Page Builder.

4) Interactive Grid, Patrick

one most talked about and awaited feature of APEX of 5.1, the multi-row edit, next level user interaction component in APEX. The Interactive Grid (IG) is so packed with features, I will only log the highlight, which is still a lot:

- changes (edit, delete, updates, adds) are not immediately submitted to server, user has to submit all changes at once.

- textarea popup

- improved inline-validations error handling

There is a IG sample application. Have a look at it!

Conclusion:

This component is a mayor step forward for creating applications with APEX. End users have been asking and waiting for this feature. Developers have spend (far too) much time, trying to build just a fraction of these functionalities, resulting in avoiding tabular forms, and loosing the build-in features. I´m very excited to finally be able to use the IG in my projects. Very well done, APEX team!!!

- JavaScript API to access FullCalendar library options

- Interactive Grid Item Type plugin support

- RequireJS included in APEX

- Read-only administrator role in builder

- Build Options default ¨excluded¨

- improved error page

Conclusion:

Many of these features will makes the life of an APEX developer so much (MUCH) easier. I myself have implemented some of these features in every recent APEX project. Now these features are available declarative is great and proves that the APEX development team is growing and expanding APEX with the real-life development in mind. Bravo!