Wednesday Feb 05, 2014

How to solve "apapt.exe file missing" error when uprading ADF Mobile

Investigating the issue in which a missing aapt.exe file is reported by JDeveloper after upgrading to the latest ADF Mobile patch I found a bug that fixes a previous problem which was that Google moved the executable file. As a response ADF Mobile now looks in the Android build path for the executable and also allows you to select the build tools location in the ADF Mobile preferences if the executable cannot be found by JDeveloper. If you are on an old version of the Android SDK that does have the aapt.exe file in its original location (the one before Google moved it) you will see the error mentioned in the title of this post.

 You can then use the ADF Mobile preferences to search for the build tool, or in addition, use it as a reminder to launch the Android SDK Manager and upgrade to a recent version of the SDK.

Frank

Monday Feb 03, 2014

Setting-up ADF Mobile for Android using JDeveloper 11.1.2.4 with the latest ADF Mobile patch

Installing the latest ADF Mobile patch for JDeveloper 11.1.2.4 prevented deployment of mobile applications with some weird error messages. I concluded that its probably my Android SDK that needed renewal. To go for a clean approach, I deleted my Android SDK and downloaded the latest and greatest from the Web. Since my last SDK installation, Google has changed the Android directory structure quite a bit. For those struggling, here is what I configured in the Android SDK and JDeveloper.

 First observation, to install the gcm.jar file (Google Cloud Messaging) you have to check the "Obsolete" checkbox in the SDK Manager.

=============================================

In the JDeveloper preferences, I provided the following entries

=============================================

Adroid SDK location
--------------------------------------
<drive>:\android-home\sdk

Android Platform Location
--------------------------------------
<drive>:\android-home\sdk\platforms\android-19

Android Build Tools Location
--------------------------------------
<drive>:\android-home\sdk\build-tools\19.0.1  (I installed v. 19 of the SDK)

The "<drive>" in my case was D:\ on Windows (funny that on the Apple Mac, which I use for writing this blog the backslash is shift+alt+7)

Frank

Friday Dec 20, 2013

To German Customers: Get Trainined on ADF Mobile

To all German Customers! Oracle Germany runs two free-of-charge ADF Mobile single day workshops in Munich (Feb. 4th) and Frankfurt (Feb. 6th)

Agenda

09:30    Registrierung          
10:00    Beginn: Vorstellung Agenda und Workshop   
11:00    Übungen Teil 1 - ADF Anwendung erstellen und deployen          
12:00    Mittagspause mit Mittagessen          
13:00    Übungen Teil 2 - ADF Mobile Anwendung erweitern, deployen, testen          
15:00    Kaffeepause          
15:30    Übungen Teil 3 - ADF Mobile - Webservice konsumieren          
16:30    Wrap up          
17:00    Ende Workshop

 Presenter: Jürgen Menge    Bernhard Fischer-Wasels

Registration for Frankfurt:

http://apex.oracle.com/pls/apex/f?p=38040:111:0::NO:RP:P111_WORKSHOP_ID,P111_KATEGORIE,P111_URL:1401,ADFMOBILE,

Registration for Munich

http://apex.oracle.com/pls/apex/f?p=38040:111:0::NO:RP:P111_WORKSHOP_ID,P111_KATEGORIE,P111_URL:1421,ADFMOBILE,

Please register today. There is no better way to get mobile than ADF Mobile. 

Frank

Wednesday Dec 11, 2013

Review: Oracle Data Integrator Essentials [Video]

Packt Publishing (http://www.packtpub.com/). released a new video tutorial about Oracle Data Integrator http://bit.ly/1i8k1jr  authored by Andreas Nobbmann of TrivadisAG in Switzerland.

The video is well paced and structured and in its larger parts focuses on ODI Studio, the IDE for building data integration projects. The TOC shown below is from the Packt Publishing website and while it gives  the timing for each section as +20 minutes, each item on the TOC is provided in its own 3-7 minute video, making it easy to listen and consume:

  1. The ODI Core Concepts [24:15 minutes]
    • Key ODI Concepts
    • Differentiating between ETL and ELT
    • Exploring the Graphical UI
    • ODI Basics
    • Defining Your Strategy
    • The ODI Staging Area

  2. Developing in ODI – the Core Objects [21:47minutes]
    • Organizing Your Project
    • Creating an Interface
    • Using Joins, Data Sets, Filters, and Sequences
    • Using Temporary Interfaces and Lookups

  3. Your Data Transformation Strategy – Knowledge Modules [11:06 minutes]
    • Adapting Knowledge Modules to Your Needs
    • Executing Data Transformation in an ODI Interface
    • Executing a Mapping on Your Source

  4. Workflows in ODI [19:08 minutes]
    • Creating a Workflow in ODI
    • Reusable Workflows: Procedures
    • User Functions as Useful Functions
    • Customize Development Objects in ODI

  5. Data Quality and Delta Detection [15:08 minutes]
    • Oracle Data Quality Products
    • Using Data Integrity Controls and Integrating Data Quality in ODI
    • Running EDQ
    • Delta Detection via CDC

  6. Version Management and Deployment [13:06 minutes]
    • Version Management
    • Scenarios: Smallest Deployment Units
    • Solutions
    • Export and Import

  7. Operating and Maintenance [12:51 minutes]
    • Loadplans
    • ODI Repository Tables
    • Security

  8. Additional Supporting Functions [11:11 minutes]
    • How to Automate ODI Object Creation
    • Impact and Data Lineaging
    • ODI Studio Enhancements

The videos explains the development environment and replaces lots of readings. As someone being new to the whole project of data integration I missed a chapter 0 that introduces data integration principals and concepts to put viewers into a context that allows them to follow the rest of the tutorial.

Maybe people like me are not the envisioned audience this video is recorded for. Questions I had while watching the tutorial included i) what is the end product of a Oracle DI project (a script? a service API?), ii) how is the repository installed and where iii) what is the result of data integration, is is a data loading from a source into a target? An end-to-end example would have been nice to see the problem solved by the product and how this solution then looks. 

All in all I think its a good tutorial if you are BI savvy and know what the Oracle DI Studio is good for (as it seems to be quite powerful). Given my non-BI background and using the Amazon star ranking as a shared language, I would give 3 stars. If there was a chapter 0 (missing) that introduces the concepts of data integration it would be worth a 4th star. An end-to-end example would have made me giving a 5th star in my rating.

Monday Sep 09, 2013

ADF Mobile Deployment Problem to Google Play

Joe Huang from ADF Mobile Product Management answered a question on OTN regarding changes in Google Play that cause ADF mobile applications to fail deployment if accessed from a tablet. The OTN question and answer is referenced from this link:  https://forums.oracle.com/thread/2575378

However, Joe went the extra mile and wrote  a blog summary of what happened at Google Play and how you can fix this for current ADF Mobile applications (up to version 11.1.2.4, as I expect a fix to be added to any future versions of ADF Mobile): https://blogs.oracle.com/mobile/entry/android_device_permissions_and_form

Frank


Thursday Sep 05, 2013

JDeveloper 11g R2 and 12c: How-to "virtually" press a button on page load

A frequent asked question is about how to press a command button upon load of a page or view. If you are on JDeveloper 11g R2 or JDeveloper 12c, then the solution to this programming challenge is the use of JavaServer Faces (JSF) 2 system events (If you are on JDeveloper 11g R1 then you are on JSF 1.2 and this JSF functionality doesn't exist).

System events are phase listeners that you  associate with a component instead of a view or page as a whole. In the use case mentioned above, the system event would be added to the command button you want to pres on initial page load, e.g.

<af:commandButton text="Press on Page Load" id="cb1"
       actionListener="#{viewScope.OnLoadHandler.onButtonPressed}"
       partialSubmit="true">
   <f:event listener="#{viewScope.OnLoadHandler.pressButton}" type="postAddToView"/>
</af:commandButton> 

 As you can see the f:event tag is added as a child tag to the af:commandButton (You find the event tag in the JDeveloper component palette under JSF -> Core) pointing to a listener defined in a managed bean that listens for the "postAddToView" phase. The managed bean is configured in viewScope to ensure the button in the use case is only "virtually pressed" once and not upon PPR of the button area. Using a managed bean in view scope, a flag can be kept that determines whether or not the button has been invoked already.

The event handler uses JavaScript to "virtually press" the button after the page or view is loaded:

...

boolean initialPageLoad = false;

...

public void pressButton(ComponentSystemEvent componentSystemEvent) {
 //only execute button once and not on PPR is used
 if (initialPageLoad == false) {
  //get access to the command button to execute "click"
  RichCommandButton rc = (RichCommandButton)componentSystemEvent.getComponent();
  String clientId = rc.getClientId();

  //compose the JavaSCript to invvoke from the server. The button client ID allows 
  //us to locate the button even if it is saved in a naming container (e.g. a region) 
  //so the absolute component access will do
  String javaScript = "var button = AdfPage.PAGE.findComponentByAbsoluteId('"+clientId+"');
                      AdfActionEvent.queue(button,true)";
    
  //invoke the JS
  FacesContext facesContext = FacesContext.getCurrentInstance();
  ExtendedRenderKitService service = Service.getRenderKitService(facesContext, 
                                              ExtendedRenderKitService.class);
  service.addScript(facesContext, javaScript);

  //change flag   
  initialPageLoad = true;
 }
}

 This way, whatever is configured for the command button press is executed upon page / view load.

A valid question is: "why don't you execute the Java method associated with a command button directly instead of  using JavaScript?" The answer to this is that using JavaScript, associated behavior tags (e.g. for printable behavior or to show a popup) are executed too as it "mimic" a user behavior.

Of course, if there is no client side behavior associated with a command button, its better to not use JavaScript but call the Java method associated with the button directly.

 Frank




Tuesday Jul 23, 2013

New: Check-out the ADF Architecture TV Channel on Youtube

The new Oracle ADF TV channel - or ADF Architecture TV channel - on YouTube is a direct outcome of the "Real World ADF Design & Architecture Principles" training Oracle Product Management built over the last year and a half.

This channel is free and publishes, week by week, episode by episode, a huge array of short, distinct topics as relating to all parts of the ADF development lifecycle, from planning, to design, to development, deployment and delivery.  All in all we have current plans for near 100 episodes.

The complete set of topics to be covered is currently indexed on the ADF Architecture Square for you to check out.  We’ve already published episodes on the YouTube channel so you can get a taste of what's to come, which you can enjoy from either work with a small time investment each week, or even from your iPad/Android tablet at home.


Important to mention to you that this channel is all about stuff and no fluff. This said, its not an ADF overview or sales pitch to Oracle ADF, nor is it a beginner training to start learning ADF.

The goal of this training is to accelerate your skills and understanding of ADF beyond drag and drop and thus teaches to think ADF.

Personally I wished we had such a training from the early days on. But in this case late is better than never and I am sure what we produced will turn out to be a great help for you. Check it out and also make sure you subscribe to the channel to receive updates whenever we upload a new episode.

Frank

Thursday Jul 18, 2013

Free EMEA ADF and ADF Mobile 2-day workshop for beginners


We offer free 2 days hands-on ADF & ADF mobile workshops for Oracle partners who want to become ADF Specialized.

Oracle Application Development Framework (ADF) is the standards based, strategic framework powering Oracle Fusion Middleware and Oracle Fusion Applications. From desktop, to Web, to mobile, we′ll introduce you to the development platform Oracle is using for its Fusion enterprise applications, discuss its architecture and offer hands-on experience on how to get up to speed with it.

Highlights of the Workshop

  • Oracle Fusion Middleware Development Platform
  • Developing Reusable Business Service
  • Developing Rich Web User Interface and Portals
  • Developing Mobile Apps for iOS and Android with Oracle ADF Mobile

Target Audience

  • Developers, Project Managers,Architects
  • ADF beginners
Quotes from previous Bootcamps
  • ″Oracle trainings are the best″
    Pedro Neto Novabas
  • ″Excellent training, well organized″
    Pedro Antunh, Capgemini
  • ″This course dives you into Oracle WebLogic giving you a quick start on benefiting from Fusion Apps″
    Leonardo Fernandes, Outsystems

Read more and register!

Saturday Jun 08, 2013

Book Review: Instant Oracle BPM for Financial Services How-to

Just recently, Packt Publishing released "Instant Oracle BPM for Financial Services How-to" (http://www.packtpub.com/oracle-business-process-management-financial-services/book)  by B. M. Madhusudhan Rao (a.k.a James Smith  - http://jamessmith73.wordpress.com/ - for those familiar with the SOA blog-sphere.

The book follows the layout of the cookbook series the sample publisher runs, is cheap as it only costs 3.39 Euro for 62 pages it covers, which appears to be a fair price.

The publisher itself sets the expectation towards this book as

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results
  • Simplifies complex business problems for financial services
  • Optimize, enhance, and modify your business processes
  • Includes enterprise architecture best practices
  • Highlights various roles of Business Process Management

The same website then says that:

"Oracle Business Process Management helps in process automation and improvement with a very high level of flexibility for all the process participants from the process planning team to the end users. It also makes it possible to have corporate employees and customers collaborating towards common goals.

Instant Oracle BPM for Financial Services How-to covers many concepts that can be easily reused across industries such as core banking, healthcare, travel, self service automation, e-governance, and so on. It highlights various roles of Business Process Management such as Business Process Modeling, Process Developer, Process Owner, and Process Participant along with the way they work together in a financial services environment.

Instant Oracle BPM for Financial Services How-to is your guide to implementing Oracle Business Process Management whilst working in the Financial Services industry.Starting through the discovering of implementation and Business challenges for financial services we will move on to Modeling, Implementation, Process ork-flow’s, deployment and testing.

Moving on to cover advanced topics such as Process administering, changing business processes using process analysts, business reporting, participants and notifications and finally collaboration. You will learn to setup, maintain and alter your Business Process Management aimed specifically for the Financial services industry."

and then ....

 "Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. This book is a practical Packt How-to guide that is designed to provide targeted information for experienced BPM professionals in the financial sector."

Why am I quoting all of these? Because I think that the text on the publisher website describes a book different from the one I reviewed and in fact the real book falls shorter. Still I think its a good book that you certainly learn from. It however is no book for newbie developers.

To give you a background to what I expects a book to deliver, lets talk about my own goals when writing articles, samples or my book. In all of my writings I aim for a specific type of users and skill set. For this group then I try to be as comprehensive as possible to share my experience. Since you cannot start by Adam & Eve in all articles, samples or books, you have to make assumptions at some point. In such cases I usually point to references, which could be articles, blogs, documents and books written by Oracle or 3rd parties so the reader gets all the information he or she needs to get the best out of my writing. I think I demand a great deal of my own writing and do the same for 3rd party and Oracle documentation, articles and books I review.

So what to say about this book: This book surely is a good bargain looking at the minimal cost it comes for and the quality of content you get. Technically I feel the book is correct and flawless, written on a good level of knowledge. In Amazon parlance I would rate it 4 for the content and then reduce it by 1 star (to 3) for the delivery which in some areas is too bumpy for my taste.

My detailed comments on this book: This book is designed to be a how-to for SOA developers in financial services, though the book preface states:

"The book is for Java/SOA/BPM Developers and Architects, and is also for people working in financial services in various roles such as Process Administrator/Developer/Business Process Owner or Process Participant."

This in my opinion is a elegant way of saying that I don't know for what audience this book really is. Java developers by definitions have no in depth product specific SOA / BPM knowledge, as otherwise they would be SOA developers. Administrators are no developers and as such are completely overwhelmed with the technical hands-on steps in this mini-book

The how-to itself is not very detailed and here-and-there makes assumption about the readers knowledge, which at least means that readers following the hands-on steps must have some previous experience with Oracle JDeveloper and Oracle BPM. You should also be familiar with installing the Oracle SOA Suite and WebCenter software because this part is in wide parts assumed by the author. To quick start the hands-on, the author provides sample project sources.

I only wished the author provided a URL for downloading the sources, which are available on his blog (so go and ask Google for it) and the Packt Publishing website (still didn't find it there). So here's the download URL that the author provides on his blog: https://www.dropbox.com/s/3et7ye207x2uuhv/BPMforFS-Sourcecode.zip (Note that this is a dropbox reference, which means that the book may be probably longer on the market than this resources. So you want to download it instantly of hope the publisher provides it on his website)

An example for where - as a non BPM expert - I would have liked more explanation is on page 11

"It would also be interesting to know that Oracle has process accelerators—a prebuilt, 'ready to deploy' BPM process that meets industry standards. These process accelerators not only use Oracle BPM, but other Oracle products as well, depending on the business requirements."

I have no idea if this means templates, standard software or starter processes (but if you are from BPM or SOA, you maybe know). An example of which Oracle products use these also would have been helpful. In my opinion, this is not a problem of the author but should have been caught during the review process and I would have flagged this.

The example implemented in this book is a home loan application to give customers a quote based on their income. For this the author introduces a formula EMI = (L*I)* {(1+I)^N / [(1+I)^N]-1}  for which he explains what all the different variables mean and do. This formula needs to be implemented in PL/SQL by you the reader (and no guidance are provided in the book, so make sure you get the sample sources). I don't have a problem with the sources to be available as a download, however, personally I like books to provide this information so I can follow reading even in a disconnected environment (my personal taste though).

An example for where the instructions come with unnecessary gap is on page 19

14. Select the Database Adapter service that we have created in the service list.
15. Now click on Data Associations and ensure that the necessary input and outputparameters are passed.
16. Save the process and deploy on SOA Suite.
17. Generate a web service-based Application Development Framework (ADF) data
control by using the deployed WSDL URL, and drag-and-drop it on the JSPX page.

Note the gap between step 16 and 17. No mentioning about how to create a WS data control, just a mentioning of that you have to do it. Google is your friend and you will find an ADF tutorial in case you are not familiar with ADF. Here I would have liked to see more guidance in form of references to tutorials or documents that provide this information (sorry B. M. Madhusudhan Rao, I had to mention this)

All in all this book is good for readers that know the Oracle software involved and that like challenging how-to instructions that don't aim for pushing the mouse for you but outline what you should do (Interestingly I myself found the instructions towards the end of the book more detailed than in the beginning). Its the first book from the Packt Publishing "Instant" series I reviewed and I see room for improvement, which either is to reduce the scope of such a tutorial or increase the page budget to the benefit of more explanations that in the end would have helped me to pick on the authors expertise.

 As mentioned earlier, this book is a bargain compared to its cost. If you are familiar with Oracle BPM and JDeveloper then you may enjoy the challenge to test your skills, understanding and what you don't yet know

Frank


Tuesday Jun 04, 2013

How-to highlight input field content when accessed from auto-tab

A question on the OTN forum has been how to highlight the content of an input field when navigation to it occurs using the auto tab functionality. As a reminder, the "autotab" property of an input field, if set to "true", tabs out of the field that you currently edit when the maximum length of the field entry is reached.

The problem reported on OTN for JDeveloper 11.1.2.4 (and I am sure its the same on other versions of JDeveloper) is that manual tabbing into a next field will highlight the fields content (value) whereas autotab doesn't. To enforce consistent highlighting behavior, you can use JavaScript as shown in the page sample below:

<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="AutoTab.jsf" id="d1">
    <af:resource type="javascript">
      function onFocusHandler(inputEvent){
         var textfield = 
             AdfAgent.AGENT.getElementById(inputEvent.getSource().getId()+'::content');
         textfield.select();
     }
    </af:resource>
      <af:form id="f1">
        <af:panelFormLayout id="pfl1">
            <f:facet name="footer"/>
             <af:inputText label="First Name" id="it1" 
                           value="#{viewScope.fieldValues.firstName}" 
                           maximumLength="5" autoTab="true"/>
             <af:inputText label="Last Name" id="it2" 
                           value="#{viewScope.fieldValues.lastname}">
                <af:clientListener method="onFocusHandler" type="focus"/>
             </af:inputText>
          </af:panelFormLayout>
       </af:form>
   </af:document>
</f:view>

The af:clientListener is attached to the input field for which you want to show content highlighting on autotab. Attach the same client listener definition to  all field that should have the content highlighting. Instead of adding the JavaScript to the page, you want to create an external JS library file and link it from the page as the JS code above is reusable.

Note that the use of "'::content" in the JavaScript uses knowledge about the way component IDs are rendered at runtime in ADF Faces. If component rendering changes in a future release (you never know) then your code will break at this point and needs to be corrected. So heads-up on this risk (though should be a small one). To the time of writing this lines there is no other API (option) available to get to the HTML field handle in ADF Faces.

Also note the use of AdfAgent.AGENT.getElementById, which is a performant wrapper API in ADF Faces around the document.findElementById function of the Browser DOM. As a rule of thumb you should always work with ADF Faces JS APIs and don't directly reach out to the DOM yourself.

Wednesday May 15, 2013

Table Pagination with JDeveloper 11.1.1.7

One of the new features listed for JDeveloper 11.1.1.7 is pagination for tables, a frequently requested and long awaited feature (http://www.oracle.com/technetwork/developer-tools/jdev/index-088099.html). The tag documentation about this feature states that to switch pagination on you simply set the scrollPolicy property to page.Truth to be told, there is a little bit more for you to do.

1. You need to set the autoHeightRows property to 0

2. You need to make sure the surrounding container provides a floating layout and doe not stretch (e.g. using a panelGroupLayout)

3. To bring the table into shape (full width) you then set styleClass="AFStretchWidth"

All changes at a glance:

scrollPolicy="page"  autoHeightRows="0" styleClass="AFStretchWidth"

Once you did this, the table renders as shown in the image below.

ADF table


Tuesday Feb 26, 2013

Heads up! ADF News Session - Thursday March 7th, 8.30 - 9:00 AM (CET) - Topic: ADF - Q & A

The German ADF Partner Community organizes a webcast with Duncan Mills. This session is in English and thus suitable for everyone to attend (as far as timezone differences allow it).

To quote from the official announcement:

Duncan Mills is a senior director of product management.for Oracle´s application development tools. In recent years responsible for the Oracle Application Development Framework (ADF). With a strong background as well in Forms<<<

You are invited to join the next ADF News Session, that is going to take place March 7th.

speaker:  Duncan Mills / Oracle
time:         8.30 AM (CET)
duration:  30 minutes
topic:        ADF - Q & A

dial-in webconf:
https://oraclemeetings.webex.com
meeting-number:            257 666 519
meeting-password:        123456
(topic:                            ADF)

When dialing in you are asked to enter your name and your mail address. The name will be shown in the participants list. The mail address will not be visible.


if using WebEx for the first time there will be some minutes needed before you can join the webcast

dial-in telco:

          +49 (0)69 2222 16 106 or +49 (0)800 66 485 15
          ConfCode: 208 503 9
          SecurityPasscode: 112233

to request international dial-in numbers please contact dirk.reinemann@oracle.com prior to the webcast

Frank

Wednesday Feb 20, 2013

Book Review: SOA Made Simple by L. Dikmans and R.v.Luttikhuizen

Just finished reading "SOA Made Simple" by Lonneke Dikmans and Ronald van Luttikhuizen, published in 12/2012 by Packt Publishing and use this summary to share my thoughts. 

"SOA Made Simple" is a very good book that - beside of helping readers to do SOA right - will have an impact to how you look at going out for breakfast. The "breakfast example" is one of the great samples that the authors consistently use throughout the book.In addition, this book is well written and covers really no fluff but just stuff. Reading this book you learn what SOA is, the benefit it brings to IT, as well as how you design and model your SOA and services.

 Whenever Packt asks me to review and write about a new book, I ask for a printed copy so I can annotate the page with comments and questions. My copy of this 257 page book has a lot of annotations, mostly about information I want to share in my review.Too many annotations, which clearly indicates I liked the book, though I am not directly involved in SOA (which probably makes me the perfect candidate for reading this book). According to the Preface, yes I read this too, the book is "for anyone (architect, designer, developer, administrator, team lead) who is implementing or is about to implement SOA in anIT-related environmenet". Well, I would call this mission accomplished and recommend you to buy this book for your learning and career.

So lets have a look what this book covers and what I liked so much:

Chapter 1: Understanding the Problem

This chapter is a well structured introduction to the current state of IT that leads to a problem statement that demands for SOA to come for the rescue. However, though A SOA book, the authors don't make it too obvious that SOA is the answer. The chapter also gives you some questions by hand you should ask before starting a SOA project so you ensure your decision is right before starting a SOA project. This chapter also introduces the examples (I already mentioned the diner for breakfast, but there also is an insurance business and others).

Chapter 2: The Solution

This chapter introduces services and the SOA term. It does so not from a pure technical perspective and without calling WS* services too soon. Or would you have considered the waiter service in a diner to be a service? In fact it is and therefore services don't need to be SOAP or REST to be called a service. SOAP and REST come into play later, when the talk is about standards and SOA.

Chapter 3: Service Identification and Design

This chapter introduces various concepts around the design of services  like top-down, bottom-up and meet-in-the-middle. Walking towards WS services, this chapter summarizes and explains service characteristics. Unless you are a WS expert already, this is one of the chapters that really help you to understand what a service should be, how isolated and de-coupled it must/can be and how complex IT architectures can be mapped to a sensible service oriented architecture.Here you get a good analogy of services to lasagna (really good examples that stick as pictures)

Ps.: As a note to the publisher, I think the images on page 73 and 74 are in the wrong order. Too late though, the ink has dried.

Chapter 4: Classification of Services

This chapter allows you to organize services into elementary services, composite services and process services.  It also covers the difference between service composition (BPM/BPEL) and aggregation (ESB, client). Other concepts for organizing services in this book are: granularity, actor (who works with a service), channel of access, security requirements and many more.

Chapter 5: The SOA Platform

This chapter switches gear for a moment and uses SOA terminology that hasn't been introduced until here but is getting explained in the following. The chapter also talks about REST and SOAP services as first class citizen technologies in a SOA. This chapter thus is where you learn about ESB, BPM, Case Management, Events, Business rules and user interfaces to SOA (which is also where Oracle ADF gets its mentioning). A lot of pages are dedicated to service security, design and develpment tools.

Chapter 6: Solution Architectures

Chapter 6 is one of my favorites and compares SOA offerings and suites provided by Oracle, IBM and Microsoft, allowing readers to understand what each of these vendors has to offer and how products could integrate. The chapter doesn't announce a winner, which I think would be a bad move for a generic SOA book, but really saves you from investigating this yourself. As the authors stress it, it is important to understand what is best in breed for a project and where you shop this best looking at the full package.

Chapter 7: Creating a Roadmap, How to Spend Your Money and When

This chapter discusses what it takes to implement SOA in a company: stake holders, requirements, wrong and right expectations, benefits and money gains. Personally I think the graph on page 1999 is a great idea for showing what you can expect on each of the stages involved when implementing SOA. Its really well done.

Chapter 8: Life Cycle Management

What you build today is what you maintain tomorrow and throw away the day after tomorrow. This basically is what the authors call the the lifecycle of SOA solutions. and in fact its all about change management and the conflict that exists between developer and administration personnel that both have a different agenda. Governance plays into this as well. Basically you learn that you need to keep the "eye on the bal" during the realization of SOA architectures. 

Chapter 9: Pick your Battles

This chapter is all about how to get people to buy in to a SOA architecture and how to ensure that the implementation - especially when implemented in distributed teams and by different departments - follows defined rules and definitions without being prohibitive to change.

Chapter 10: Methodologies and SOA

This chapter discusses the impact SOA has to different aspects of software development and provides methodologies to use.

In case you did not order the book while reading my review, here's a dense list for why you should:

- Clear story line

- Chapters that make sense and float

- No fluff just stuff

- Explaining complex concepts simple in real life examples

- Back / Forward references

- External document references

- Good SOA coverage from a project perspective looking at SOA as a whole and not just services

 The one thing I wanted to have immediately when reading this book was a second book that closely follows this book's chapters and that  - by example - shows how to implement various SOA components for people to have example code and instructions. This could be using the Oracle stack (preferred) but also would be valuable for any of the other introduced vendors. However, code and implementation samples was not in focus for this book and this is good the way it is.

 Frank


Wednesday Jan 23, 2013

How-to programmatically display a popup message

For an ADF mobile sample I needed to display a confirmation message upon successful upload of an image. Because I could not see how to do this from Java using the ADF Mobile popup dialog, I used JavaScript. The JavaScript function I called is part of PhoneGap, which is neat because this ensures I don't have to maintain custom JavaSCript code in my AMX page.  To call the PhoneGap notification dialog, I  added

20-October 2013: important. Since I've written this sample, the libraries have been changed from PhoneGap to Cordova. Make sure the script below is changed to the Cordova JS (!!!)

Script sample

to the AMX page. I added this script tag to the body section of  the amx:panelPage component tag. Note that the relative addressing /../.../.../ in the JS reference is for AMX pages that are in the public_html folder. If your page is in a sub folder, you will need to add an extra "/.." for each folder

In my Java bean, which I called from a method binding, I used the ADF Mobile AdfmfContainerUtilities.invokeContainerJavaScriptFunction(...) call to invoke the PhoneGap "navigator.notification.alert" function

navigator.notification.alert(message, alertCallback, [title], [buttonName])

See: http://docs.phonegap.com/en/1.0.0/phonegap_notification_notification.md.html

The Java call is shown below:

 AdfmfContainerUtilities.invokeContainerJavaScriptFunction(
           "adf.sample.mobile.PhotoUpload",
            "navigator.notification.alert",
            new Object[] {"Image uploaded: \n " +
            "File Name: "+fileName+"\n File Type: "+fileType,"",
            "Image Uploaded to Server", "Ok"});

Note the use of the object array to pass multiple arguments to the JavaScript function. The "adf.sample.mobile.PhotoUpload" string is the ADF Mobile feature Id of the feature that contains the AMX page with the JavaScript reference.

The result is shown in the image below:

PhoneGap dialog displayed in ADF Mobile

Using the same technique you can call any other PhoneGap JavaScript function from ADF Mobile (and your custom JavaScripts as well)
See also:

http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/phgapfeatures.htm#BABJGDIG
http://docs.phonegap.com/en/1.0.0/index.html


Friday Jan 04, 2013

JavaScript function to intercept or listen for tab remove event

The af:panelTabbed component allows you to remove tabs from display using the tabRemoval property

tabRemoval Valid Values: none, all, allExceptLast

determines if tab removal is enabled.

This attribute supports these tabRemoval types:

  • none - tab removal is not enabled.
  • all - tab removal is enabled on all tabs, regardless if they are disclosed. The last tab in the panelTabbed can be removed.
  • allExceptLast - tab removal is enabled on all tabs, regardless if they are disclosed. The last tab in the panelTabbed cannot be removed.

 src: http://docs.oracle.com/cd/E35521_01/apirefs.111230/e17491/tagdoc/af_panelTabbed.html

Because tab removal is not automatic in ADF Faces, developers configure an item listener on the af:showDetailItem component that make the tabs within a panel tab

 

itemListener javax.el.MethodExpression Only EL a method reference to an item listener

src: http://docs.oracle.com/cd/E35521_01/apirefs.111230/e17491/tagdoc/af_showDetailItem.html

"Choosing to remove a tab will cause an ItemEvent of type 'remove' to be launched. This event can be listened for on a showDetailItem using the itemListener attribute. It is up to the developer to handle this event and code the actual removal of the tab. This is because of the dynamic nature of the panelTabbed component, which may have dynamic children. This also allows a finer level of control by the developer, who can then choose a custom implementation that may (for example) include warning dialogs, and control of which tab gains focus after a tab is removed."

src: http://docs.oracle.com/cd/E35521_01/apirefs.111230/e17491/tagdoc/af_panelTabbed.html

This apparently works with logic written in Java saved on the server. A question on OTN was how to handle or intercept this remove event on the client side using JavaScript. This information - unfortunately - is a bit hidden in our documentation and you have to look into the JavaScript documentation for this.

src: http://docs.oracle.com/cd/E35521_01/apirefs.111230/e17489/oracle/adf/view/js/event/AdfItemEvent.html

If there is an AdfItemEvent that fires on the ADF Faces client side, then there also must be a configuration available on the af:clientListener to listen for such an event. And there is (just not obvious)

 <af:panelTabbed id="pt1" tabRemoval="all">  
    <af:showDetailItem text="TAB 1" id="sdi1" stretchChildren="first" clientComponent="false">
         ...
         <af:clientListener method="alertTabClose" type="item"/>
     </af:showDetailItem>
</af:panelTabbed
 

The JavaScript function to this looks similar to

function alertTabClose (closureEvent){
     var tab = closureEvent.getSource();  
     ...

This allows you to handle (and suppress) the tab remove event on the client using JavaScript in ADF Faces

About

The Oracle JDeveloper forum ranks in the Top 5 of the most active forums on the Oracle Technology Network (OTN).



The OTN Harvest blog is a summary of selected topics posted on the OTN Oracle JDeveloper forum.



It is an effort to turn knowledge exchange into an interesting read for developers who enjoy little nuggets of wisdom





Frank Nimphius

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today