Wednesday, October 28, 2015

ADF 12.2.1 ADF BC Support for REST

ADF 12.2.1 provides out of the box support for REST. You should read about all available REST functionality in ADF BC here - 16 Creating RESTful Web Services with Application Modules. I have created very quick sample application to test how it works.

Before generating REST on top of ADF BC, you must configure release version for REST. This can be any number:


To generate REST, go to REST Web Service interface in Application Module and add new REST resource. Here you can select VO and provide REST resource name:


JDeveloper generates REST resource where you could configure attributes to expose, custom methods, etc.:


As soon as you generate REST resource on top of ADF BC, JDeveloper creates new project with web.xml. You could use this project to run/test REST (simply right click and choose Run to test on integrated WLS):


I can test REST through URL: http://127.0.0.1:7101/restapp/rest/1/Employees, ADF returns well structured REST response:


ADF is smart to return only a subset of data, it offers a parameter to control how many rows to fetch in a single call, it also shows if there are more rows to be returned in the result set:


I can set limit parameter to retrieve only one row, this is how it works:


Download implemented sample application - ADFBCRestApp.zip.

Tuesday, October 27, 2015

ADF 12.2.1 Responsive UI Improvements

ADF 12.2.1 provides much better responsive UI support comparing to previous version ADF 12.1.3. Previously we were using CSS media queries to hide/show facets. This worked, but it was not great from performance point of view. Same region was duplicated into different facets, both loaded into memory, but only one displayed. ADF 12.2.1 comes with new tag af:matchMediaBehaviour, this tag is using CSS media query to detect screen size, and it updates layout component property. No need anymore to use different facets, we can update properties directly.

This is how works, check in the video. Two blocks implemented with ADF regions are re-arranged into top-down layout, when screen size becomes too narrow to render left-right layout:


Here is the example of panel splitter layout component with af:matchMediaBehavior tags:


This tag contains three properties - propertyName, matchedPropertyValue, mediaQuery. You can define property of layout component to override through propertyName. New value for the property is defined by matchedPropertyValue. CSS media query is set to define condition, when layout component property value should be changed based on the screen size (if screen size is less than defined):


Two ADF regions are displayed right to left, when screen size is wide enough:


Same two regions are re-arranged to display in top to down layout:


Download sample application - ADFResponsiveUIApp.zip.

Friday, October 23, 2015

Customer References - Red Samurai ADF Performance Audit

We have collected many customer references for Red Samurai ADF Performance Audit Tool around the globe. You can browse through and check what other people are saying about this tool and our ADF work - Red Samurai ADF Performance Audit Tool.

Pretty happy to receive such strong feedback from different countries. This encourages us to implement new features and release new versions.

Some of the references, read more in the dedicated page:

Orlando Kelly, AMEC Foster Wheeler, Canada

Thanks for the new version of this tool. For any serious production web application, being able to instrument the application and then analyze the use and performance of it should be a mandatory practice for all web development shops. We have been using this tool on our application for the last few years and it has helped immensely in improving the performance and stability of our application to a global audience.

In any large ADF application, the ability to drill down to specific view objects that may be causing an issue or look at historic data to spot trends is a lifesaver.

I'm looking forward to utilizing this next version of the tool in the next few weeks.



Torben, TIA, Denmark

We are using this tool, both in production and also during development. Our product is a large ADF application with ~400 taskflows, utilizing UIShell from Oracle. RSA Audit tool has been an integral part of our product since version 2.6, and has really helped us a lot finding performance issues. By using this tool as an integral part of the application, we have a common reference when sorting out performance problems with our customers. Internally we have a single RSA database installation which collects data from all our development- and test environments. So the possibility to differentiate log-data from individual servers is essential - and Andrejus was quick to implement this feature when we requested it! This tool just gets better and better for each release! Thank you Andrejus, for providing the ADF community with such a great tool - we really appreciate it!

Tuesday, October 20, 2015

We are Hiring - Red Samurai ADF Team

We are expanding and hiring ADF developers. In particular we are looking for ADF developers from these countries: Lithuania, Latvia, Estonia and Poland.

Your tasks will be related to various interesting ADF use cases implementation and direct interaction with the customer. You will get a chance to work in different roles - expert ADF developer, technical architect, performance tuning specialist. This will be great new step for your career. Use your chance to join Red Samurai team and let's work together.

If you are interested, drop me email: abaranovskis at redsamuraiconsulting dot com

Saturday, October 17, 2015

Switching Alta UI and Skyros on Runtime ADF 12c

Skyros UI can be useful for heavy data entry screens. Both Alta UI and Skyros can be integrated into one application, depending on the form/module opened - application UI can be switched and render based on selected skin. This could be good compromise for front end screens implemented with Alta UI and heavy data entry screens with Skyros.

Sample application - ADFAltaApp_v12.zip, by default is rendered in Alta UI:


When user clicks on Maintenance button, different page from the same application will be rendered using Skyros style. You can notice - much more content (form fields, table columns) can be fit into screen with Skyros (although it doesn't look as great as Alta UI). This can be useful for applications implementing both pretty front end pages and heavy data entry forms:


I have implemented simple navigation between two pages in outbounded ADF TF:


There is a session scope bean method responsible to return UI to use, by default it returns Alta UI:


Skin family is set dynamically in Trinidad file, reading current value from the bean:


Button contains property listener to update skin to use:


I hope demonstrated approach will be useful for smoother migration to Alta UI and ADF 12c.

Friday, October 16, 2015

OOW'15 Session Preview - Oracle Alta UI Patterns for Enterprise Applications and Responsive UI Support

This is preview post for my OOW'15 session - Oracle Alta UI Patterns for Enterprise Applications and Responsive UI Support [UGF2717]. I'm going to talk and demo various useful things about Alta UI and ADF. Title talks about UI, but there will be much more. I'm going to show you, Alta UI is not only about look and feel, it is totally new way of building enterprise applications. Certainly UI is very important, but you should not forget about such topics as performance, scalability and reusability. All this and modern UI would make your enterprise application successful.

One of the key topics I will be speaking about - high performance data integration into Alta UI. I will be using live data from Twitter and through WebSocket channel communicating it to Alta UI ADF 12c dashboard screen. I have recorded preview video, you can watch it here:


Dashboard UI with live Twitter data is based on my previous example - Dashboard Implementation with ADF 12c Alta UI. Twitter stream data is managed in ADF 12c application by JavaScript function, here I'm receiving message from WebSocket, parsing it with JSON and assigning values to to ADF UI components:


This is the result displayed in Alta UI:


I will cover these topics during session:

1. High performance dashboard implementation for Alta UI

2. Responsive UI support

3. ADF Regions usage and responsive UI

4. List component usage

5. Menu and Panel Drawer

6. Editable forms implementation in Alta UI

7. Dynamic editable forms implementation

8. Master-Detail implementation in Alta UI

9. Table pagination implementation

10. ADF BC auto-refresh functionality

11. Coexistence of Alta UI and previous ADF skins

See you soon in San Francisco !

Saturday, October 10, 2015

Dashboard Implementation with ADF 12c Alta UI

Alta UI in ADF 12c provides great options for dashboard implementation. You can use so called 'info tiles' as blocks displaying summary information. These blocks are clickable and based on active tile, content can be rendered. It looks not only modern, but also user friendly.

I have implemented sample application - ADFAltaApp_v11.zip with Alta UI dashboard, based on code examples from Oracle WorkBetter application. You could download and run my sample, it renders two vertically aligned info tiles with summarised information:


Click on second info tile, main content will be changed:


Info tile block is implemented as ADF declarative component with a set of properties to make it generic and reusable:


Each info tile is defined as declarative component in the dashboard:


Declarative component requires to set several properties. Property 'selected' returns true/false if current tile should be rendered as selected. Each tile should be assigned with unique index, client listener method based on this index identifies selected tile:


Tile content is surrounded with panel group layout component. By default this component doesn't provide click support. However, click support can be implemented with client listener method (I will not go here into client listener implementation details, because this code is well documented in Oracle WorkBetter sample application referenced above):


Client listener invokes server listener method to pass user click request to the server:


Server listener method updates selected tile index and generates partial target refresh. This is how tile selection works:


Content area is rendered with ADF Faces deck component. This component allows to invoke transition between different UI blocks, based on currently selected tile:


DisplayedChild property identifies UI block to display. This property value is calculated from selected tile index:


First UI block contains ID = infd0. This corresponds to index of first tile: