Tuesday, February 7, 2012

Preparing to Work With ADF

So, you have started something in Oracle ADF without the safety of a tutorial. How do you even begin thinking about planning how to start developing? Welcome to this short five step program that will have you flying off the cliff in no time ;-)

Before You Even Start!
Move the properties window in JDeveloper! Did you see the nice categorized look of the object properties in the Quick Start Guide by Grant Ronald? If you want that look (and trust me, you do), move the properties window inside the bottom middle window.

I am a dinosaur. I enjoy reading books on real paper, so I buy those. I also like CTRL+F, so I get the electronic versions too. Anyway you do it, you have to have at least some essential books. They are important for more reasons than their actual technical content, they will help you realize just how much code you are going write. That is correct, you thought it was all declarations and xml files? Prepare to be amazed at the amount of "cheating" you have to resort to.

Recommended books:
There are other books too, but these are the important ones for a real ADF project. If you are a complete ADF noob, start off with Grant Ronalds "Quick Start Guide to Oracle Fusion Development: Oracle JDeveloper and Oracle ADF", and follow up with (the slightly dated) "Oracle JDeveloper 11g Handbook: A Guide to Fusion Web Development".

I really, really wish I could have had the book by Nick Haralabidis earlier, would have saved me a ton of head scratching! Ah, well...

The official docs. Keep them close. The most important are Fusion Developer's Guide, and Web User Interface Developer's Guide. A whopping 2960 pages pure enlightenment. I would also recommend installing the whole document library locally: http://docs.oracle.com/docs/cds/E24382_01.zip. If possible, insist on working connected to the Internet. JDeveloper is not as helpful as it could have been (it tries to reach oracle.com from the Help Center) when offline.

Get your online resources ready. In my experience when you start developing, you will spend about half your time fiddling with JDeveloper, and the rest on various online sources. Prepare early by picking some winners:
  • Google.com
    Hmm, yes, not really a big surprise. The thing is, Google has indexed a lot of pages, even some with ADF related content. To locate the good stuff, you have to be specific. Learn the lingo: vo, eo, am, etc. If you can, use method names or names of the standard classes (EntityImpl, ViewObjectImpl, ApplicationModuleImpl, etc). Also use faces component names ("af:outputText"), or names from the javascript api.
  • forums.oracle.com
    This is where most of the technical stuff gets sorted out. It is a very active forum (and apparently Oracle product managers are spending some time there). I do not use Oracle's own search, but use a targeted Google search instead ("<your search term> site:forums.oracle.com").
  • Sample code
    There are some resources besides the official tutorials; Oracle ADF Code Corner and corresponding blog by Frank Nimphius, Steven Muench's Not Yet Documented Examples (Look at the top of the page for more sample code resources),  Andrejus Baranovskis' sample list and some bits by Nick Haralabidis. AMIS also has some nice examples sprinkled in between their blog posts.
  • youtube.com
    Yes, this is the way we are used to be entertained, so why not educated too? Pay special attention to ADF Insider Channel and Shay Shmeltzer's feed.
As I said, you will spend a fair amount of time searching the net, and you have to beware what you find. Often old and outdated resources are ranked high in Google, and if you are on 11.1.2, clunky solutions from 10g is not really what you want.

Get the source code! Supported Oracle ADF customers can request the source code from Oracle Support. It might not be the first natural thing to occur to you (it would, if you were a "proper" java developer), and at this stage in your "project" it is not first and foremost because of the debugging possibilities.

With the source code you are able to see parameter names (and not just types) in the code editor, Quick JavaDoc actually works, and "Go to Declaration" actually goes to a place with code in it.

+1 to ADF. When developing in Forms or APEX you are calling black boxes, in ADF you are actually able to see what happens.

Depending on how advanced you intend your first sample application to be, you might want to have a look at two utility classes used extensively in the ADF community. They go by the names ADFUtils and JSFUtils. In a real project, you definitely want them! Nick Haralabidis also mentions them in his book.

You will frequently see them in sample code, but where do they actually live? If you download the official Oracle Fusion Order Demo Application, and look into the StoreFrontModule workspace, under the Application Sources of the StoreFrontUI project, you will be rewarded.

...And off you go!

To be continued...

1 comment:

  1. Somebody necessarily help to make severely posts I might state. This is the first time I frequented your website page and to this point? I surprised with the research you made to create this particular post extraordinary. Well done admin..

    Oracle Training in Chennai