SlideShare ist ein Scribd-Unternehmen logo
1 von 44
ADF DVTA Picture Paints a 1000 Words ODTUG Kaleidoscope 2011 – Long Beach, California Luc Bors, AMIS, The Netherlands
Overview The DVT Component in ADF Architecture Using DVT for data analysis Interactive Graphs Maps XAJA
DVT in ADF Architecture Desktop Browser-Based Metadata Services (MDS) JSF JSP Office ADFSwing Mobile View ADF Faces       JSF Struts ADF Controller ADF Binding Model Business Services EJB BAM ADFbc Portlets BI BPEL Web Services Java Data Services
Before It gets complicated Creating Basic Graphs is easy
Using DVT for data analysis From plain numbers to interactive data analysis
A Needle in a Haystack ,[object Object]
Demand ?
… ?,[object Object]
Use Gauges as an indicator
Bar Graphs : Beyond the Defaults Default coloring can be confusing Default coloring can be ugly Overwrite Default colors <dvt:seriesSetdefaultColor="#0000ff">
Bar Graphs : Beyond the Defaults ,[object Object]
500 ?
…  ?,[object Object]
Bar Graphs : Beyond the Defaults Use a Custom ClickListener In Listener iterate, compare and highlight clickListener="#{backingBeanScope.barGraphBean.clickHandler}" //iterate over the row data         for (inti = 0; i < rowCount; ++i) { // when row is found, color it RED barGraph.getSeriesSet().getSeries(rwIndex, true).setColor(Color.RED); // when row is NOT found, color it BLUE barGraph.getSeriesSet().getSeries(rwIndex, true).setColor(Color.BLUE);
Bar Graphs : Beyond the Defaults ,[object Object],[object Object]
Grouping Sales : Sales overview  Create a graph based on a ‘read only’ viewObject that produces the query result select  products_base.product_id,  sum(quantity) total ,  product_nameprd,  order_datedt from   orders , order_items , products_base where  ………. group by  ……..
Bar Graph : the Basics Per day, the amount ordered for this item in this warehouse 2 1 3
Grouping Sales : Sales overview  Display sold items as percentage of total What was the ‘percentage sold’ in a given week ?
Grouping Sales : Sales overview  Create a graph based on a ‘read only’ viewObject that produces the query result select    sum(quantity) total  , product_nameprdnam  ,to_char(order_date, 'IW') week from   orders,  order_items,  products_base Where …… group by  …..
Pie Graphs Add some ‘flashy’ behaviour <dvt:pieGraph id="pieGraph1"                       value="#{bindings.OrderTotalsPie1.graphModel}" subType="PIE" threeDEffect="true" animationOnDisplay="flipLeft" animationDuration="2000" clickListener="#{pieClickListenerBean.processClick}" imageFormat="FLASH" seriesRolloverBehavior="RB_HIGHLIGHT" seriesEffect="SE_GRADIENT" dynamicResize="DYNAMIC_SIZE" interactiveSliceBehavior="explode"visualEffects="AUTO">           <dvt:background>             <dvt:specialEffectsgradientDirection="GD_RADIAL" fillType="FT_GRADIENT" gradientNumStops="4"/>           </dvt:background>           <dvt:graphPieFrame/>           <dvt:seriesSet>             <dvt:series/>           </dvt:seriesSet>           <dvt:legendAreaautomaticPlacement="AP_NEVER" position="LAP_TOP"/>           <dvt:sliceLabelautoPrecision="off" scaling="auto" textType="LD_PERCENT"/>           <dvt:pieLabel rendered="false"/>         </dvt:pieGraph>
Pie Graphs What is behind the information in the Pie ? public void clickListener (ClickEvent event){ ComponentHandle handle = event.getComponentHandle(); System.out.println(handle.getName()+" is clicked.");     }
Do you remember this one ? Per day, the amount ordered for this item in this warehouse Let get some more detail here….
Time Selector : Component info Using the TimeSelector Component to ‘drill down’ TimeSelectorComponent can select date ranges in graph Can be difficult to use with existing datamodels Needs date range with no gaps Option: Create a view to fill in date gaps
Time Selector : Example (1) Add timeSelector component to Graph Use the TimeSelectorListener, for instance to use start and end dates in a filter. <dvt:timeSelector timeSelectorListener="#{timeSelectorBean.processTimeSelector}“ explicitStart="#{timeSelectorBean.startDate}                               explicitEnd="#{timeSelectorBean.endDate}“         mode="EXPLICIT" fillColor="#ff7d7d“ borderColor="#ff0000" id="tsl1“ fillTransparent="true"/> public void processTimeSelector(TimeSelectorEventtimeSelectorEvent) {     Date sdate = new Date(timeSelectorEvent.getStartTime());     Date edate = new Date(timeSelectorEvent.getEndTime());  // convert dates and use them OperationBinding ob = bindings.getOperationBinding("ExecuteWithParams");     Map params = ob.getParamsMap(); params.put("b_startDate", Minorderdate); params.put("b_endDate", Maxorderdate); ob.execute();
Time Selector : Example (2) Show what customers placed order in that particular time frame.
Make graphs Interactive Listeners do the Trick ZoomListeners ScrollListeners ClickListeners
Interactive Graphs : add References How to use the ClickListener to change or add a <dvt:referenceObject /> Bind Graph to bean Get Handle to getReferenceObjectSet(); Change the ReferenceObject
Interactive Graphs : Update Data In Click Listeners you can do almost anything you like Get to the Data value (if needed) Display or… Process Long clickedValue = (Long)dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE);
Interactive Graphs scrollbarPresenceGroups ZoomListener  public void zoomListener (ZoomEvent event){   double zoomMin = event.getAxisMin(ZoomEvent.Y1AXIS);   double zoomMax = event.getAxisMax(ZoomEvent.Y1AXIS); intgroupStart = event.getAxisStartGroup(ZoomEvent.O1AXIS); intgroupCount = event.getAxisGroupCount(ZoomEvent.O1AXIS);  System.out.println("Y1 Axis range "+Double.toString(zoomMin)+" to "+Double.toString(zoomMax)); System.out.println("O1 Axis starting group index of "+Integer.toString(groupStart)+", and a group count of "+Integer.toString(groupCount));     }
Lets take a closer look : Zooming ZoomListener  public void zoomListener (ZoomEvent event){   double zoomMin = event.getAxisMin(ZoomEvent.Y1AXIS);   double zoomMax = event.getAxisMax(ZoomEvent.Y1AXIS); intgroupStart = event.getAxisStartGroup(ZoomEvent.O1AXIS); intgroupCount = event.getAxisGroupCount(ZoomEvent.O1AXIS);  System.out.println("Y1 Axis range "+Double.toString(zoomMin)+" to "+Double.toString(zoomMax)); System.out.println("O1 Axis starting group index of "+Integer.toString(groupStart)+", and a group count of "+Integer.toString(groupCount));     }
Interactive Graphs ScrollListener The listener interface for receiving scroll events on the graph. The event triggers when an axis of a graph is scrolled. Here is an example of scrollListener implementation that displays the range of the Y1 Axis and the O1 Axis -  public void scrollListener (ScrollEvent event){    double zoomMin = event.getAxisMin(ScrollEvent.Y1AXIS);    double zoomMax = event.getAxisMax(ScrollEvent.Y1AXIS); intgroupStart = event.getAxisStartGroup(ScrollEvent.O1AXIS); intgroupCount = event.getAxisGroupCount(ScrollEvent.O1AXIS);  System.out.println("Y1 Axis has a range from "+Double.toString(zoomMin)+" to "+Double.toString(zoomMax)); System.out.println("O1 Axis has starting group index of "+Integer.toString(groupStart)+", and a group count of "+Integer.toString(groupCount));     }
Do you remember this one ? Where do these customers live ?  Lets use a map to plot them
Geographical Map Create a viewObject to provide the data.  SELECT …………..     adr.ADDRESS1,  adr.CITY,  …………. adr.POSTAL_CODE,  adr.COUNTRY_ID,  ord.ORDER_TOTAL , ……… FROM      ORDERS ord,      PERSONS per,      ADDRESSES adr WHERE
Geographical Map Points is plotted to a Map
Geographical Map Adding Circles  Use MapviewerJavascript API combined with ADF Javescript API ,[object Object],[object Object],[object Object]
Thematic Map : New in 11g R2 Create Map Create Layers
Thematic Map : New in 11g R2 Relevant states are highlighted Drilldown  Drillup Reset Zoom
Interactive DashBoard Demo DEMONSTRATION
Feeding the graphs Stock Level changed by: Services ? Batch Process ? …. ? How to inform application ?
Active Graphs : Push DB Changes What are the options ? Use ADS via Databinding ? Use ADS via Active Data Proxy ? Use Polling ?
Active Graphs : Push DB Changes Use Database ChangeNotification grant change notification to <user>; Set AutoRefresh ‘true’ for ViewObject Use Shared ApplicationModule Use Poll component
Active Graphs : Push DB Changes
DashBoard DATA PUSHDemo DEMONSTRATION
Contextual Events ADF Code Corner Example 17 To Refresh a Region Based on A Graph Click Event in an other Region public void handleEvent(Object payload){  //cast the payload to the ClickEvent.  ClickEventclickEvent = (ClickEvent) payload;  DataComponentHandledch =                     (DataComponentHandle)clickEvent.getComponentHandle();  //get the selected row key from the graph (click event)  Key rwKey = (Key) dch.getValue(DataComponentHandle.ROW_KEY);

Weitere ähnliche Inhalte

Mehr von Luc Bors

Real life-maf-2015
Real life-maf-2015Real life-maf-2015
Real life-maf-2015Luc Bors
 
ADF Essentials (KScope14)
ADF Essentials (KScope14)ADF Essentials (KScope14)
ADF Essentials (KScope14)Luc Bors
 
Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Luc Bors
 
OgH Data Visualization Special Part III
OgH Data Visualization Special Part IIIOgH Data Visualization Special Part III
OgH Data Visualization Special Part IIILuc Bors
 
OgH Data Visualization Special Part II
OgH Data Visualization Special Part IIOgH Data Visualization Special Part II
OgH Data Visualization Special Part IILuc Bors
 
OgH Data Visualization Special Part I
OgH Data Visualization Special Part IOgH Data Visualization Special Part I
OgH Data Visualization Special Part ILuc Bors
 
MAF push notifications
MAF push notificationsMAF push notifications
MAF push notificationsLuc Bors
 
Doag wysiwyg
Doag wysiwygDoag wysiwyg
Doag wysiwygLuc Bors
 
amis-adf-enterprise-mobility
amis-adf-enterprise-mobilityamis-adf-enterprise-mobility
amis-adf-enterprise-mobilityLuc Bors
 
Oracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-caseOracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-caseLuc Bors
 
Oracle MAF real life OOW.pptx
Oracle MAF real life OOW.pptxOracle MAF real life OOW.pptx
Oracle MAF real life OOW.pptxLuc Bors
 
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...Luc Bors
 
ADF Mobile: 10 Things you don't get from the developers guide
ADF Mobile: 10 Things you don't get from the developers guideADF Mobile: 10 Things you don't get from the developers guide
ADF Mobile: 10 Things you don't get from the developers guideLuc Bors
 
oow2013-adf-mo-bi-le
oow2013-adf-mo-bi-leoow2013-adf-mo-bi-le
oow2013-adf-mo-bi-leLuc Bors
 
Goodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating LayoutsGoodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating LayoutsLuc Bors
 
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFDont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFLuc Bors
 
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileLuc Bors
 
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)Luc Bors
 
Real life forms to adf
Real life forms to adfReal life forms to adf
Real life forms to adfLuc Bors
 
ADF Mobile - an intro for Developers
ADF Mobile - an intro for DevelopersADF Mobile - an intro for Developers
ADF Mobile - an intro for DevelopersLuc Bors
 

Mehr von Luc Bors (20)

Real life-maf-2015
Real life-maf-2015Real life-maf-2015
Real life-maf-2015
 
ADF Essentials (KScope14)
ADF Essentials (KScope14)ADF Essentials (KScope14)
ADF Essentials (KScope14)
 
Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)
 
OgH Data Visualization Special Part III
OgH Data Visualization Special Part IIIOgH Data Visualization Special Part III
OgH Data Visualization Special Part III
 
OgH Data Visualization Special Part II
OgH Data Visualization Special Part IIOgH Data Visualization Special Part II
OgH Data Visualization Special Part II
 
OgH Data Visualization Special Part I
OgH Data Visualization Special Part IOgH Data Visualization Special Part I
OgH Data Visualization Special Part I
 
MAF push notifications
MAF push notificationsMAF push notifications
MAF push notifications
 
Doag wysiwyg
Doag wysiwygDoag wysiwyg
Doag wysiwyg
 
amis-adf-enterprise-mobility
amis-adf-enterprise-mobilityamis-adf-enterprise-mobility
amis-adf-enterprise-mobility
 
Oracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-caseOracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-case
 
Oracle MAF real life OOW.pptx
Oracle MAF real life OOW.pptxOracle MAF real life OOW.pptx
Oracle MAF real life OOW.pptx
 
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
 
ADF Mobile: 10 Things you don't get from the developers guide
ADF Mobile: 10 Things you don't get from the developers guideADF Mobile: 10 Things you don't get from the developers guide
ADF Mobile: 10 Things you don't get from the developers guide
 
oow2013-adf-mo-bi-le
oow2013-adf-mo-bi-leoow2013-adf-mo-bi-le
oow2013-adf-mo-bi-le
 
Goodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating LayoutsGoodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating Layouts
 
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFDont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
 
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
 
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
 
Real life forms to adf
Real life forms to adfReal life forms to adf
Real life forms to adf
 
ADF Mobile - an intro for Developers
ADF Mobile - an intro for DevelopersADF Mobile - an intro for Developers
ADF Mobile - an intro for Developers
 

Kürzlich hochgeladen

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

A picture-paints-a-1000-words

  • 1. ADF DVTA Picture Paints a 1000 Words ODTUG Kaleidoscope 2011 – Long Beach, California Luc Bors, AMIS, The Netherlands
  • 2. Overview The DVT Component in ADF Architecture Using DVT for data analysis Interactive Graphs Maps XAJA
  • 3. DVT in ADF Architecture Desktop Browser-Based Metadata Services (MDS) JSF JSP Office ADFSwing Mobile View ADF Faces JSF Struts ADF Controller ADF Binding Model Business Services EJB BAM ADFbc Portlets BI BPEL Web Services Java Data Services
  • 4. Before It gets complicated Creating Basic Graphs is easy
  • 5. Using DVT for data analysis From plain numbers to interactive data analysis
  • 6.
  • 8.
  • 9. Use Gauges as an indicator
  • 10. Bar Graphs : Beyond the Defaults Default coloring can be confusing Default coloring can be ugly Overwrite Default colors <dvt:seriesSetdefaultColor="#0000ff">
  • 11.
  • 12. 500 ?
  • 13.
  • 14. Bar Graphs : Beyond the Defaults Use a Custom ClickListener In Listener iterate, compare and highlight clickListener="#{backingBeanScope.barGraphBean.clickHandler}" //iterate over the row data for (inti = 0; i < rowCount; ++i) { // when row is found, color it RED barGraph.getSeriesSet().getSeries(rwIndex, true).setColor(Color.RED); // when row is NOT found, color it BLUE barGraph.getSeriesSet().getSeries(rwIndex, true).setColor(Color.BLUE);
  • 15.
  • 16. Grouping Sales : Sales overview Create a graph based on a ‘read only’ viewObject that produces the query result select products_base.product_id, sum(quantity) total , product_nameprd, order_datedt from orders , order_items , products_base where ………. group by ……..
  • 17. Bar Graph : the Basics Per day, the amount ordered for this item in this warehouse 2 1 3
  • 18. Grouping Sales : Sales overview Display sold items as percentage of total What was the ‘percentage sold’ in a given week ?
  • 19. Grouping Sales : Sales overview Create a graph based on a ‘read only’ viewObject that produces the query result select sum(quantity) total , product_nameprdnam ,to_char(order_date, 'IW') week from orders, order_items, products_base Where …… group by …..
  • 20. Pie Graphs Add some ‘flashy’ behaviour <dvt:pieGraph id="pieGraph1" value="#{bindings.OrderTotalsPie1.graphModel}" subType="PIE" threeDEffect="true" animationOnDisplay="flipLeft" animationDuration="2000" clickListener="#{pieClickListenerBean.processClick}" imageFormat="FLASH" seriesRolloverBehavior="RB_HIGHLIGHT" seriesEffect="SE_GRADIENT" dynamicResize="DYNAMIC_SIZE" interactiveSliceBehavior="explode"visualEffects="AUTO"> <dvt:background> <dvt:specialEffectsgradientDirection="GD_RADIAL" fillType="FT_GRADIENT" gradientNumStops="4"/> </dvt:background> <dvt:graphPieFrame/> <dvt:seriesSet> <dvt:series/> </dvt:seriesSet> <dvt:legendAreaautomaticPlacement="AP_NEVER" position="LAP_TOP"/> <dvt:sliceLabelautoPrecision="off" scaling="auto" textType="LD_PERCENT"/> <dvt:pieLabel rendered="false"/> </dvt:pieGraph>
  • 21. Pie Graphs What is behind the information in the Pie ? public void clickListener (ClickEvent event){ ComponentHandle handle = event.getComponentHandle(); System.out.println(handle.getName()+" is clicked."); }
  • 22. Do you remember this one ? Per day, the amount ordered for this item in this warehouse Let get some more detail here….
  • 23. Time Selector : Component info Using the TimeSelector Component to ‘drill down’ TimeSelectorComponent can select date ranges in graph Can be difficult to use with existing datamodels Needs date range with no gaps Option: Create a view to fill in date gaps
  • 24. Time Selector : Example (1) Add timeSelector component to Graph Use the TimeSelectorListener, for instance to use start and end dates in a filter. <dvt:timeSelector timeSelectorListener="#{timeSelectorBean.processTimeSelector}“ explicitStart="#{timeSelectorBean.startDate} explicitEnd="#{timeSelectorBean.endDate}“ mode="EXPLICIT" fillColor="#ff7d7d“ borderColor="#ff0000" id="tsl1“ fillTransparent="true"/> public void processTimeSelector(TimeSelectorEventtimeSelectorEvent) { Date sdate = new Date(timeSelectorEvent.getStartTime()); Date edate = new Date(timeSelectorEvent.getEndTime()); // convert dates and use them OperationBinding ob = bindings.getOperationBinding("ExecuteWithParams"); Map params = ob.getParamsMap(); params.put("b_startDate", Minorderdate); params.put("b_endDate", Maxorderdate); ob.execute();
  • 25. Time Selector : Example (2) Show what customers placed order in that particular time frame.
  • 26. Make graphs Interactive Listeners do the Trick ZoomListeners ScrollListeners ClickListeners
  • 27. Interactive Graphs : add References How to use the ClickListener to change or add a <dvt:referenceObject /> Bind Graph to bean Get Handle to getReferenceObjectSet(); Change the ReferenceObject
  • 28. Interactive Graphs : Update Data In Click Listeners you can do almost anything you like Get to the Data value (if needed) Display or… Process Long clickedValue = (Long)dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE);
  • 29. Interactive Graphs scrollbarPresenceGroups ZoomListener public void zoomListener (ZoomEvent event){ double zoomMin = event.getAxisMin(ZoomEvent.Y1AXIS); double zoomMax = event.getAxisMax(ZoomEvent.Y1AXIS); intgroupStart = event.getAxisStartGroup(ZoomEvent.O1AXIS); intgroupCount = event.getAxisGroupCount(ZoomEvent.O1AXIS); System.out.println("Y1 Axis range "+Double.toString(zoomMin)+" to "+Double.toString(zoomMax)); System.out.println("O1 Axis starting group index of "+Integer.toString(groupStart)+", and a group count of "+Integer.toString(groupCount)); }
  • 30. Lets take a closer look : Zooming ZoomListener public void zoomListener (ZoomEvent event){ double zoomMin = event.getAxisMin(ZoomEvent.Y1AXIS); double zoomMax = event.getAxisMax(ZoomEvent.Y1AXIS); intgroupStart = event.getAxisStartGroup(ZoomEvent.O1AXIS); intgroupCount = event.getAxisGroupCount(ZoomEvent.O1AXIS); System.out.println("Y1 Axis range "+Double.toString(zoomMin)+" to "+Double.toString(zoomMax)); System.out.println("O1 Axis starting group index of "+Integer.toString(groupStart)+", and a group count of "+Integer.toString(groupCount)); }
  • 31. Interactive Graphs ScrollListener The listener interface for receiving scroll events on the graph. The event triggers when an axis of a graph is scrolled. Here is an example of scrollListener implementation that displays the range of the Y1 Axis and the O1 Axis - public void scrollListener (ScrollEvent event){ double zoomMin = event.getAxisMin(ScrollEvent.Y1AXIS); double zoomMax = event.getAxisMax(ScrollEvent.Y1AXIS); intgroupStart = event.getAxisStartGroup(ScrollEvent.O1AXIS); intgroupCount = event.getAxisGroupCount(ScrollEvent.O1AXIS); System.out.println("Y1 Axis has a range from "+Double.toString(zoomMin)+" to "+Double.toString(zoomMax)); System.out.println("O1 Axis has starting group index of "+Integer.toString(groupStart)+", and a group count of "+Integer.toString(groupCount)); }
  • 32. Do you remember this one ? Where do these customers live ? Lets use a map to plot them
  • 33. Geographical Map Create a viewObject to provide the data. SELECT ………….. adr.ADDRESS1, adr.CITY, …………. adr.POSTAL_CODE, adr.COUNTRY_ID, ord.ORDER_TOTAL , ……… FROM ORDERS ord, PERSONS per, ADDRESSES adr WHERE
  • 34. Geographical Map Points is plotted to a Map
  • 35.
  • 36. Thematic Map : New in 11g R2 Create Map Create Layers
  • 37. Thematic Map : New in 11g R2 Relevant states are highlighted Drilldown Drillup Reset Zoom
  • 38. Interactive DashBoard Demo DEMONSTRATION
  • 39. Feeding the graphs Stock Level changed by: Services ? Batch Process ? …. ? How to inform application ?
  • 40. Active Graphs : Push DB Changes What are the options ? Use ADS via Databinding ? Use ADS via Active Data Proxy ? Use Polling ?
  • 41. Active Graphs : Push DB Changes Use Database ChangeNotification grant change notification to <user>; Set AutoRefresh ‘true’ for ViewObject Use Shared ApplicationModule Use Poll component
  • 42. Active Graphs : Push DB Changes
  • 43. DashBoard DATA PUSHDemo DEMONSTRATION
  • 44. Contextual Events ADF Code Corner Example 17 To Refresh a Region Based on A Graph Click Event in an other Region public void handleEvent(Object payload){ //cast the payload to the ClickEvent. ClickEventclickEvent = (ClickEvent) payload; DataComponentHandledch = (DataComponentHandle)clickEvent.getComponentHandle(); //get the selected row key from the graph (click event) Key rwKey = (Key) dch.getValue(DataComponentHandle.ROW_KEY);
  • 45. Summary Graphs not only display data Interact with Graphs and Maps Use Graphs and Maps clever and whenever needed Get the best out of your Graphs and Maps
  • 46. Final Notes A Picture Paints a Thousand Words… …..And even then there is more to tell Contextual Events in Graphs Saving Graphs as Image Use Graphs in Reports
  • 47. A Picture Paints a 1000 Words ODTUG Kaleidoscope 2011 – Long Beach, California Please Fill Out Your Evaluations Luc Bors, AMIS, The Netherlands Luc.Bors@amis.nl LucBors@gmail.com Follow me on Twitter : @lucb_

Hinweis der Redaktion

  1. Process
  2. This session is all about clarifying data by means of ADF Data Visualization Components. You will learn how to present your data in a different way and you will learn to recognize when and how to use DVT components for data analysis. From pretty straightforward usage of gauges, graphs and maps, to more sophisticated features like time selectors, drill down functionality, data manipulation in DVT and real time update via server push. And finally this will all come together in a fancy interactive dashboard.After a short introduction explaining DVT and their place in the ADF overall architecture, the rest of the session will be all about DVT added value. You will see situations where ADF Data Visualization Components come to the rescue and how DVT add value to your application and business.
  3. Because of the overall ADF Architecture it is possible to base graphs on any dataset that can be made available via an ADF data control (ADFm JSR227). Binding to a standard rowset and binding to hierarchical data controls is supported. This means that graphs can be based on data from a database exposed via ADF Business Components, but also data from a BAM server or BI server. One can also use web services to provide graphs with data.It is easy to create a graph by dragging and dropping a collection from the data control palette, the same way that you create a databound form or table on a page. Data for a graph can also be provided via a managed bean. DVT components support both skinning and partial page refresh. DVT’s can be PPR targets, but they are also able to initiate a PPR event. It is also possible to dynamically change almost any property of a DVT component by means of EL.
  4. Data Visualization Components consist of over 50 different kinds of graphs. All graphs support animation (initial display and data change), zooming and scrolling, and some of them support a time selector window.
  5. This session is all about clarifying data by means of ADF Data Visualization Components. You will learn how to present your data in a different way and you will learn to recognize when and how to use DVT components for data analysis. From pretty straightforward usage of gauges, graphs and maps, to more sophisticated features like time selectors, drill down functionality, data manipulation in DVT and real time update via server push. And finally this will all come together in a fancy interactive dashboard.After a short introduction explaining DVT and their place in the ADF overall architecture, the rest of the session will be all about DVT added value. You will see situations where ADF Data Visualization Components come to the rescue and how DVT add value to your application and business.
  6. In the warehouse stock displayed on this sheet there are some products that are somewhat low on stock. Only if you know what the critical stocklevels of all product are, you will be able to determine exactly those products. An amount of 345 is indeed less then 600 or 1100, but you cannot tell is a stock of 345 is more critical then a stock of 600. We need a solution for that to start with. We want to see instantly where the pain is.
  7. &lt;dvt:thresholdSet &gt; &lt;dvt:thresholdthresholdMaxValue=&quot;#{row.CriticalStockLevel}&quot; fillColor=&quot;#d62800&quot;/&gt; &lt;dvt:thresholdthresholdMaxValue=&quot;#{row.CriticalStockLevel + (row.CriticalStockLevel * 5)}&quot; fillColor=&quot;#ffff00&quot;/&gt; &lt;dvt:thresholdthresholdMaxValue=&quot;#{row.CriticalStockLevel + (row.CriticalStockLevel * 10)}&quot; fillColor=&quot;#00ff00&quot;/&gt;&lt;/dvt:thresholdSet&gt;
  8. &lt;dvt:thresholdSet &gt; &lt;dvt:thresholdthresholdMaxValue=&quot;#{row.CriticalStockLevel}&quot; fillColor=&quot;#d62800&quot;/&gt; &lt;dvt:thresholdthresholdMaxValue=&quot;#{row.CriticalStockLevel + (row.CriticalStockLevel * 5)}&quot; fillColor=&quot;#ffff00&quot;/&gt; &lt;dvt:thresholdthresholdMaxValue=&quot;#{row.CriticalStockLevel + (row.CriticalStockLevel * 10)}&quot; fillColor=&quot;#00ff00&quot;/&gt; &lt;/dvt:thresholdSet&gt;
  9. Usually on cannot tell what is the currently selected bar in a bargraph, so you are not able to tell to what bar any displayed detail data belongs.The barGraph variable is an instance of the graph created through the graph component Binding property. It grants access to the ADF binding layer. The clickEvent provides the information about the bar (the series) the user clicked on.The bar&apos;s row representation is then set as current in the ADF binding layer.
  10. Usually on cannot tell what is the currently selected bar in a bargraph, so you are not able to tell to what bar any displayed detail data belongs.The barGraph variable is an instance of the graph created through the graph component Binding property. It grants access to the ADF binding layer. The clickEvent provides the information about the bar (the series) the user clicked on.The bar&apos;s row representation is then set as current in the ADF binding layer.
  11. To ensure master-detail correlation to happen when users click on a bar, check the Set current row for master-detail checkbox (1), which ensures the current row to be set in the ADF binding layer iterator. Press the Swap Bars with X-Axis button (2) to turn the product name entries into their own series, which is key for the color highlighting. The major change is between setting and not setting this option is that the product names are displayed in the graph&apos;s legend than beneath its bar. The barGraph variable is an instance of the graph created through the graph component Binding property. It grants access to the ADF binding layer. The clickEvent provides the information about the bar (the series) the user clicked on.The bar&apos;s row representation is then set as current in the ADF binding layer.
  12. The barGraph variable is an instance of the graph created through the graph component Binding property. It grants access to the ADF binding layer. The clickEvent provides the information about the bar (the series) the user clicked on.The bar&apos;s row representation is then set as current in the ADF binding layer.
  13. In this pie graph we can see the amount available in all warehouses.We can add extra info to the pie by means of :a) b)c)d) &lt;dvt:pieGraph id=&quot;pieGraph1&quot; value=&quot;#{bindings.OrderTotalsPie1.graphModel}&quot;subType=&quot;PIE&quot; threeDEffect=&quot;true&quot;animationOnDisplay=&quot;flipLeft&quot; animationDuration=&quot;2000&quot;clickListener=&quot;#{pieClickListenerBean.processClick}&quot;imageFormat=&quot;FLASH&quot; seriesRolloverBehavior=&quot;RB_HIGHLIGHT&quot;seriesEffect=&quot;SE_GRADIENT&quot; dynamicResize=&quot;DYNAMIC_SIZE&quot;interactiveSliceBehavior=&quot;explode&quot; visualEffects=&quot;AUTO&quot;&gt; &lt;dvt:background&gt; &lt;dvt:specialEffectsgradientDirection=&quot;GD_RADIAL&quot;fillType=&quot;FT_GRADIENT&quot; gradientNumStops=&quot;4&quot;/&gt; &lt;/dvt:background&gt; &lt;dvt:graphPieFrame/&gt; &lt;dvt:seriesSet&gt; &lt;dvt:series/&gt; &lt;/dvt:seriesSet&gt; &lt;dvt:legendAreaautomaticPlacement=&quot;AP_NEVER&quot; position=&quot;LAP_TOP&quot;/&gt; &lt;dvt:sliceLabelautoPrecision=&quot;off&quot; scaling=&quot;auto&quot;textType=&quot;LD_PERCENT&quot;/&gt; &lt;dvt:pieLabel rendered=&quot;false&quot;/&gt; &lt;/dvt:pieGraph&gt;
  14. In this pie graph we can see the amount available in all warehouses.We can add extra info to the pie by means of :a) b)c)d)
  15. The timeselector listener enables you to respond to changes in the date range.Not only can you requery a collection based on the new date range, but you can also execute ant y kind of logic that you need.
  16. Use a click listener on &lt;dvt:shapeAttributes /&gt;&lt;dvt:barGraph &gt; &lt;dvt:shapeAttributesSet&gt; &lt;dvt:shapeAttributes component=&quot;GRAPH_TWODMARKER&quot; clickable=&quot;true&quot; clickListener=&quot;#{clickListener.processClick}&quot;/&gt; &lt;/dvt:shapeAttributesSet&gt; &lt;/dvt:barGraph&gt;
  17. public void click(ClickEvent event) {ComponentHandle handle = event.getComponentHandle();if (handle instanceofDataComponentHandle){DataComponentHandledhandle = (DataComponentHandle)handle;Long clickedValue =(Long)dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE);ReferenceObjectSetros = graph.getReferenceObjectSet();ReferenceObjectro = ros.getReferenceObject(0, true);ro.setLineValue(clickedValue);}}
  18. public void click(ClickEvent event) {ComponentHandle handle = event.getComponentHandle();if (handle instanceofDataComponentHandle){DataComponentHandledhandle = (DataComponentHandle)handle;Long clickedValue =(Long)dhandle.getValue(DataComponentHandle.UNFORMATTED_VALUE);Use the clickedValue}}
  19. Give end users the ability to zoom in on and scroll through a data set that may be too large or complex to fit comfortably within the area allocated to the graph using the &quot;zoomDirection&quot; attribute. Zoom and scroll may be enabled for horizontal and or vertical axes. The &quot;scrollbarPresenceGroups&quot; attribute provides control over when a scroll bar appears for the group axis: the horizontal axis in Bar graphs, for instance. The &quot;scrollbarPresenceX1&quot;, &quot;scrollbarPresenceY1&quot;, and &quot;scrollbarPresenceY2&quot; attributes control the appearance of scroll bars for the various data axes.
  20. Give end users the ability to zoom in on and scroll through a data set that may be too large or complex to fit comfortably within the area allocated to the graph using the &quot;zoomDirection&quot; attribute. Zoom and scroll may be enabled for horizontal and or vertical axes. The &quot;scrollbarPresenceGroups&quot; attribute provides control over when a scroll bar appears for the group axis: the horizontal axis in Bar graphs, for instance. The &quot;scrollbarPresenceX1&quot;, &quot;scrollbarPresenceY1&quot;, and &quot;scrollbarPresenceY2&quot; attributes control the appearance of scroll bars for the various data axes.
  21. for (var level in markers) { for (vari = 0; i &lt; markers[level].length; i++) { var details = markers[level][i]; markers[level][i] = new google.maps.Marker({ title: details.level, position: new google.maps.LatLng( details.location[0], details.location[1]), clickable: false, draggable: true, flat: true }); }
  22. public void handleEvent(Object payload){ //cast the payload to the ClickEvent. Note that the ctx event //handler could have used a typed argument instead of &quot;Object&quot;, //in which case a) an error would be raised if the value in the //payload is of a wrong type and b) a casting in the method is //not required. //There are good arguments for the use of both approaches. The one //using an Object argument for example allows you to gracefully //handle possible type cast exceptions instead of handling it //using the configured ADF or ADFc exception handlers. ClickEventclickEvent = (ClickEvent) payload; //determine the area that the user clicked on if (clickEvent.getComponentHandle() instanceofDataComponentHandle){ DataComponentHandledch = (DataComponentHandle) clickEvent.getComponentHandle(); //get the selected row key from the graph (click event) Key rwKey = (Key) dch.getValue(DataComponentHandle.ROW_KEY);
  23. Process