Monday 30 June 2008

Events and publications

A list of events\presentations and publications:

Events:

SOA Lite - a taste of SOA with a smidgen of web services
  • ODTUG Kaleidoscope 2009 Conference
Attempting to gorge yourself on the 5 course SOA meal may result in a stomach ache and a bill you can least afford at the moment.Instead a quick and easy recipe with some simple ingredients of web services will give your systems that little taste of SOA you so crave. Chris will describe why web services may be a better fit for you than SOA, qualities of contemporary web services, what skills to focus on when starting out with web services, and a few hints and tips from the web service trenches.
Back to Basics: Simple Database Web Services without the Need for SOA
  • ODTUG Kaleidoscope 2009 Conference
  • Oracle Open World 2008 San Francisco
  • AUSOUG 2008 Perth & Gold Coast Conferences
Oracle is heavily heading down the SOA line which can be intimidating to database programmers with no experience in the web service arena or running application servers, let alone SOA. This presentation will identify as a first step that database programmers can make use of database packages like utl_http, utl_dbws and 11g's Native Web Services for consuming and publishing web services without adopting SOA straight off the ranks.
AUSOUG JDeveloper 1 Day Aussie Masterclass Series
  • AUSOUG 2008 Adelaide, Hobart, Sydney, PerthConference
  • AUSOUG 2008 Gold Coast Conference
Abstract: Scared of JDeveloper because you don't know Java, but worried you'll miss the boat in developing Oracle web applications with Oracle's tool of choice for Fusion development? In 2008 the Australian Oracle User Group in conjunction with the Oracle Applications User Group and leading Practitioners and Educators in Fusion Applications and Middleware area will be running a series of events to educate our members on Fusion. The first of this series sponsored by the Oracle Technology Network will introduce you to simplicity of web development with the latest 11g Technical Preview version of JDeveloper, without writing a single line of Java!"
The great Oracle development tools debate
  • AUSOUG 2007 Victorian Conference
  • AUSOUG 2007 Western Australian Conference
Abstract: Oracle Forms is dying? It's hard to tell because Oracle just extended it's support into the next decade. To others it may appear Oracle has chosen JDeveloper as the main development tool, including its support for ADF and BPEL/SOA. Yet Oracle has revamped HTML DB as Application Express (APEX) which is winning large amounts of publicity and has even been used to deliver applications like Metalink.

What's happened to the Oracle development environment? It used to be so much easier, there was only one choice!

Come and join "the great Oracle development tools" debate. Our panel session of Oracle development experts will argue over what tools you should be considering, which is the best for your organisation, and which one is just, well, cool!
Take a load off! Load testing your Oracle Apex or JDeveloper web applications
  • AUSOUG 2007 Victorian Conference
  • AUSOUG 2007 Western Australian Conference
Abstract: Geeeez, after demanding you unit test, system test, black box test, white box test, test-test-test everything, your manager is now demanding you load test your brand spanking new Oracle web application. How on earth can you do this? .... and stop your manager from nagging?

This technical presentation will explain the concepts behind preparing for load testing, the Http protocol's request/response model, and live demonstrations using Oracle's Http Analyzer and Apache's JMeter to stress test your Oracle web application.

The presentation is suitable for anybody, be it DBAs or developers, who are concerned about the performance of any web based application, possibly an Apex or JDeveloper or 3rd party web application. Knowledge of Apex or JDeveloper is not mandatory for this presentation and will not be covered in any depth.

Agenda:
  • The need for load testing
  • Preparing for load testing
  • Understanding Http protocol's request/response model
  • Demo of Oracle's Http Analyzer to capture web application request/responses
  • Demo of Apache's JMeter to run automated web application load testing
All you (ever) needed to know about Java
  • AUSOUG 2007 South Australian monthly meeting
  • NZOUG 2007 Auckland Conference
  • AUSOUG 2006 Western Australian Conference
Abstract: This is a mini-lesson on Java concepts and syntax. The presentation is aimed at PL/SQL developers and DBAs who need to know sufficient Java to build ADF Business Component and ADF Faces applications, or Java routines within the Oracle database, as well as managers looking for high level concepts around Object-Oriented and Java programming. The workshop provides an intensive introduction to Java and is normally part of SAGE Computing Service's JDeveloper 5-day workshop. Previous attendees have admitted they learnt more about Java in this workshop, than in all their previous struggles to come to terms with the language.
Forms programmers never die, they just switch to JDeveloper
  • NZOUG 2007 Auckland Conference
Abstract: With the release of ADF Faces in JDeveloper 10.1.3, Oracle developers finally have a productive, component based, framework for developing Java applications. This presentation covers a "mind map" between traditional Oracle Forms and PL/SQL techniques and development with ADF faces. This is designed to assist Forms developers and those who are new to JDeveloper in making the transition. The presentation is then followed by a peek inside JDeveloper ADF Faces with a more detailed look at the ADF technologies available in JDeveloper, as well as a few tips on some of the best approaches for a Forms or Designer developer to get started and use the product.
Where do we go from here? Why many IT staff are living in the past
  • New Horizons 2007 Victoria
Abstract: Unfortunately many IT professionals learn the capabilities of various technologies at the beginning of their careers and then continue to operate under the same set of constraints for the remainder of their working lives. This presentation discusses some of the exciting new directions in the Oracle technology suite and how best to take advantage of them. It provides guidance on which tools are best suited to your organisation’s application requirements and skill set.
SQL Developer hands-on class
  • AUSOUG 2006 Victorian Conference
Abstract: Oracle recently announced the future obsolescence of SQL*Plus GUI version. We are being encouraged to switch to using the new free SQL Developer GUI tool. This tool not only provides SQL access to the database for seasoned developers, but also allows easier access for less technical users. This presentation gave attendees hands on experience of using the SQL Developer product. The session included basic SQL syntax training so that End Users can utilise the product to access their data. The workshop included:
  • Overview of the product: basic interface, where to find help, creating a connection
  • Browsing the database
  • Entering and running SQL , basic SELECT, WHERE clauses, JOINS, aggregates
  • Creating and changing database objects
The DBA's realm: deploying JDeveloper applications to OC4J
  • AUSOUG 2006 Western Australian monthly meeting
Abstract: JDeveloper ADF applications are becoming all the rage in Oracle development circles, just look at EBS v12 (Forms is dead! Long live Forms! Forms is dead!). But developing an ADF application is different from deploying it for production purposes on OC4J under OAS, and the task moves from the realms of the developer to that of the DBA (the buck has to stop somewhere). DBAs need to have an understanding of how and what JDeveloper does when deploying to the OC4J container with OAS, and what the issues are, rather than leaving it in the hands of those pesky developers.
Virtual Private Database features in 10g
  • AUSOUG 2005 Victorian Conference
  • AUSOUG 2005 Victorian Conference
Abstract: Business requirements, Australian legislation and web based applications have changed the security requirements on databases holding private data. Oracle introduced the Virtual Private Database (VPD) to address these needs, implementing database policies to restrict rows and columns retrieved via SQL, and in turn removing the need for public synonyms, roles and user accounts. Chris Muir discusses how to implement VPD features in Oracle 10g to satisfy contemporary database security needs.

Publications:

Taking an Oracle ADF Application from Design to Reality
  • Java Developer Journal Website 2009
  • Java Developer Journal 2009 Print Magazine Volume 14 Issue 2
This multi-part article takes a narrative approach to assist other developers in understanding the mindset and skills required to build an Oracle ADF solution. The article introduces techniques such as storyboarding to capture user requirements, prioritization of requirements to break your problem set into discrete solvable units using a technique known as "MoSCoW," and step-by-step problem decomposition to implement the discrete solutions in ADF Business Components and ADF Faces RC under Oracle JDeveloper 11g.

JDeveloper: An IDE that moves with the Times & REA Is Where RIA Becomes the Norm
  • Java Developer Journal Website 2009
  • Java Developer Journal 2009 Print Magazine Volume 14 Issue 2
Do you believe that the day when programmers could focus on one language in their jobs is gone? Thanks to the ever-changing IT landscape and the uncertain financial times, contemporary developers are expected to work with a wide range of platforms, frameworks, languages as essentially “masters of all and specialists in none.” You need your IDE to move with the times too, moving beyond the simple compiler and debugger to solve the challenges that contemporary developers face. Oracle JDeveloper is such an IDE. Today JDeveloper 11g is a complete end-to-end development platform, including a strong declarative programming model that removes the need to write everything by hand in Java, a mature framework used by Oracle itself in its own products, delivered on one of the strongest application server platforms in the industry, and ultimately assisting you, the modern programmer, in meeting your day-to-day IT challenges.

Q&A with Grant Ronald
  • UKOUG Oracle Scene Magazine 2008
When talking about Oracle Forms and JDeveloper, one Oracle personality stands out among others - long time blogger Grant Ronald from Oracle Corporation UK. Grant has for a long time "pimped" Oracle Forms and its big brother JDeveloper at Oracle events and user group events around the world. His popularity is shown by his blog receiving on average 2000 hits per day. Lately, to reassure Oracle customers that Oracle intends to keep on supporting Oracle Forms and show that Forms has a future inline with JDeveloper, Grant has been responsible for the Oracle's Forms Modernization message.

Return to Formsville
  • OTN Website 2008
New programmers moving into Oracle sites running legacy Oracle Forms and Oracle Designer applications face many challenges. New programmers rely heavily on their senior counterparts to teach them how to structure their applications, as well as the benefits of such structures from hard-earned experience. There are certainly plenty of best practices around for Oracle Forms, and Oracle Designer gave its own particular stamp to Oracle Forms architecture. Yet at many sites, senior programmers have moved on, leaving their successors guessing why applications are structured as they are. With the pressure to fix mounting maintenance issues, the elegance of the original solutions can be jeopardized.

For those starting their Oracle Forms journey, this article attempts to explain the key architectural concepts that are common to many Oracle Forms– and Oracle Designer–based applications, including their benefits and how you can use them to your advantage. In particular, the article will focus on:
  • A simple Oracle Forms trigger architecture
  • A flexible Corporate-Application-Form Oracle Forms library architecture
  • Extending the approach to forms generated from Oracle Designer
  • Oracle Designer artifacts, including the table API, cg_ref_codes, and journal tables.
Oracle development review
  • IOUG Select Magazine 2008
  • UKOUG Scene Magazine 2008
Probably the most keenly debated, and often, heatedly discussed topic amongst Oracle's development community is: "Which development tool is best?" While newbies look for guidance, zealots vehemently defend their tool of choice. However, the reality is maybe slightly mundane. Like debating the "best car" in world, there are numerous choices, each have their plus and minus points, and let's face it, they all in the end do a very similar job.

So, regardless if you are a hot headed lamborghini lover or family of five with a people carrier, this article gives you the low down on some of Oracle's latest and best loved development tools (with not a cup-holder in sight) from Oracle experts in the Oracle development community.

"Like choosing a car or selecting a tool for some DIY at home, the choice is driven not so much by the tool, and more by the job you need to do" says Grant Ronald, Product Manager in Oracle's Application Development Tools division. "The What, Who and Where are the questions you need to be asking. This way, you tend to find your choice drawn to a specific tool, or you may decide to use a combination of tools for building your application. The key point is, you do have a choice with each tool having its own sweet spot." Grant continues “This article picks just a few of the criteria you should be considering, and with input from recognised experts commenting on their area of expertise, it gives a balanced and measured insight into the tools".
Integrating the Oracle Designer Legacy Table API withOracle JDeveloper 11g ADF Business Components
  • OTN Website 2007
Oracle Designer is now firmly in maintenance mode, but it is still common to encounter legacy database schemas that have Designer's fingerprints all over them, with generated Table APIs and good old cg_ref_codes. Such constructs may be unfamiliar to the newer Oracle developers in the crowd, but this approach was the cutting edge at one time.

Fortunately, with Oracle JDeveloper 11g's various enhancements to Application Development Framework Business Components (ADF BC), such legacy code needn't be ignored or replaced. By embracing ADF BC's inherent support for calling database PL/SQL, you can give new life to your legacy Oracle Designer database systems.

This article specifically investigates integrating the Oracle Designer Table API with Oracle JDeveloper 11g (in Technical Preview 2 at the time of this writing).
A tool with many faces: splitting a JDeveloper ADF Faces faces-config.xml file
  • IOUG Select Magazine 2007
A JDeveloper ADF Faces application utilising the JavaServer Faces (JSF) specification will be heavily dependent on it's faces-config.xml file. This file defines all entries for the JSF managed beans, navigation and other elements used in your JSF application. The file can quickly become large and cumbersome in a medium to large application and a particular bottleneck as multiple developers attempt to modify it. Is it possible to split this file into logical parts to avoid these limitations?
Oracle RDBMS Q&A with Doug Burns
  • AUSOUG Foresight Magazine 2007
In an ongoing series of articles, Chris Muir chats to Oracle blogger and well known UK presenter Doug Burns who maintains his slightly off-center Oracle DBA blog (check out the stuffed toys!?). Doug, who holds 9i DBA certification, has 16 years experience as an Oracle DBA and is a member of the expert Oaktable group. His opinions, insights and experience in the Oracle arena are held in considerable regard by the Oracle community.
Oracle Application Server 10.1.3 for J2EE Beginners
  • AUSOUG Foresight Magazine 2006
So you've built your first JDeveloper web application using the 1001 Oracle examples. You're boss is impressed. "Wow, that's one of the best web-pages I've ever seen Jones" (you're name is Jones isn't it?). And with a wave of the hand as your boss walks away, you hear the words "deploy it".

Welcome to the world of J2EE application servers and Oracle's latest flagship Oracle Application Server 10.1.3.
JDeveloper Q&A with Steve Muench
  • AUSOUG Foresight Magazine 2006
In an ongoing series of articles, three Australian JDeveloper developers quiz Steve Muench of Oracle about his past, how he made the transition from Oracle Forms to Java, and on the latest and greatest JDeveloper 10.1.3 release. As an Oracle Ace with a visible web presence and his own blog, Steve is a leading force behind JDeveloper. His articles are a first port of call in making effective use of Oracle's ADF technology stack. Having worked for Oracle on just over 15 years, his fingerprints can be found in many Oracle's solutions.

Post Index

A complete list of all previous blog posts published on this blog.

JDeveloper - General
JDeveloper - ADF Business Components
JDeveloper - ADF Faces/Faces RC
Oracle Apex
Oracle Application Server
Oracle Database
Oracle Forms
Oracle OID
Oracle Portal
Oracle PL/SQL
Oracle SQL*Plus
Oracle SQL Developer
Oracle Reports
Oracle General
Oracle Open World
Australian Oracle User Group
Oracle Interviews
Oracle Community
Web Services and SOA
Sage Computing Services
The Environment
Links
Random Humour

Blog roll

Links links links, take your pick.

Oracle Corporation's very own JDeveloper ninja team:
Other freelancing JDeveloper mercenaries I highly recommend checking out:
And from the complete (employee and non-employee) Oracle rank and file blogosphere, I also recommend:
Oracle blog aggregators I frequent:
If there are any link errors please let me know.

Saturday 28 June 2008

About me

This blog page has been replaced by the same named page.

The top 10 most active Oracle Wiki pages

While we're having a look at the top Oracle community activity around the internet, let's check out the top 10 active pages on the Oracle Wiki as of 28/7/2008:
  1. Oracle Tweeters (84)
  2. List of Oracle-related blogs (62)
  3. Oracle ADF FAQ (56)
  4. The Official Oracle Wiki (34)
  5. ADF Faces Features Examples (34)
  6. ADF Faces Tag Examples (32)
  7. Oracle OpenWorld (24)
  8. Architect / Architecture Resources (19)
  9. E-Business Suite (17)
  10. Enterprise 2.0 Conference 2008 (17)
(The number in brackets represents the # of updates to the corresponding page)

The activity on the Oracle Tweeter and Blogger pages once again shows how strong the Oracle Community is. I'm staggered by the number of bloggers and tweeters! It only seems like yesterday there were only 10 or so Oracle bloggers.

Also nice to see the JDeveloper ADF pages right up there.

Thursday 26 June 2008

What's the most active OTN forum?: Apex vs JDev vs Forms wars continued

(Disclaimers up front for those who don't regularly read my blog: I'm a JDeveloper advocate)

Recently in attending the ODTUG conference, during the ADF vs Apex session run by Dimitri and Lucas, a comment was made that the Apex OTN forums are the most active OTN forums of all.

This comment surprised me, because I would have thought before Apex, or even JDeveloper (where my heart lies), the database and SQL/PL-SQL forums would be more popular.

The OTN Forums running within Jive provide an easy way to verify the statistics of each of the forums, so I thought I'd publish the top forums to verify the comment from above. I gathered the following statistics on the 26/6/2008 via the following top level OTN page. I've only included forums that have had over 1 million views:

(Note the Thread Response Ratio calculation is my own based on the formula (messages – threads) / threads, on the assumption that messages includes both original thread message and answers. This may be a bogus calculation based on my assumptions so don't read too much into it; I just thought it would be an interesting number)

Database – General
Views: 3,997,367
Threads/Messages: 78,690/384,365
Thread Response Ratio: 3.88

SQL and PL/SQL
Views: 4,163,007
Threads/Messages: 69,220/374,638
Thread Response Ratio: 4.41

Application Express
Views: 3,069,147
Threads/Messages: 33,886/158,752
Thread Response Ratio: 3.68

JDeveloper
Views: 2,322,767
Threads/Messages: 55,191/182,215
Thread Response Ratio: 2.3

Forms
Views: 2,286,956
Threads/Messages: 50,765/182,155
Thread Response Ratio: 2.58

Now there is the famous quote "lies, damned lies, and statistics" that we must keep in mind when analysing the above numbers; we shouldn't read too much into the figures. For instance we don't know when the forums started nor the statistics were started. However I think it can be clearly said that that Database and SQL/PL-SQL forums win hands down for views, threads and messages over all other forums for the current statistics.

In revisiting the ODTUG comment about Apex having the most active community derived from the OTN forum statistics, the comment was made in context of the Apex vs JDev ODTUG session. As such let's address the comment context with the OTN statistics at hand.

Looking at the numbers for the 2 relating forums for Apex and JDev, there is no clear winner. Apex has higher views than JDev, but has less threads and messages. Neither is top or bottom if you take all 3 statistics on board. So I disagree with the original comment that Apex is the leader. I think the point to make is that they are *both* very active forums, in the top 5 forums for OTN. This shows not only is the database an active area within Oracle's arena, but so are *both* Apex and JDeveloper. That's great news for the Oracle community at large.

And I think the second point to make, drawing the conclusion only from the OTN forums statistics and not looking elsewhere on the internet and user groups, the point to make is Apex is not the only tool with great community support, JDev has great support too, and so does Forms. The fact that the Apex advocates say Apex has great community support doesn't mean by inference JDev and Forms have poor community support. The OTN statistics show all are very active areas with many readers (views), many posters asking questions (threads) and many people posting answers (messages).

Caveat: Obviously community support goes beyond just the OTN forums, and I can rave on about what's happening in the JDev community as much as other technical arenas can, but for this blog post I'm focusing on the OTN forums for the bounds of the discussion.

As a third point, moving off the Oracle technology wars, the amount of activity on the OTN forums should show to non-proprietary software advocates (ie. open-source fans), that the proprietary software market has just an active community as the internet based open-source corners. Anybody that argues the big problem with software from big vendors is the locked-in black-box approach is underestimating the IT community at large in collaborating to solve common issues. Such large amount of readers and posters is a huge movement that shouldn't be discounted. And the fact that Oracle hosts these forums and Oracle employees actively participate shows a company that pays attention to its customer base.

As a final side note, these are the stats for SQL Developer:

SQL Developer
View: 685,297
Threads/Messages: 5,144/24,156
Thread Response Ratio: 3.69

Though the Threads/Messages aren't that high, the view count certainly is getting up there. Not bad for a relatively new tool.

Monday 23 June 2008

Using multiple DataBindings.cpx files in JDev 11g

Last year I blogged an entry on Using multiple faces-config.xml files in JSF. Without a doubt this is one of my more successful posts, as since it was published the blog entry has received over 5200 reads. Part of the success of the post is it applies to not specifically to JDeveloper or ADF Faces but rather JSF as a whole.

The original reason for segmenting the faces-config.xml file was to divide it into manageable chunks. Another advantage of multiple files which I didn't document was it allows developers to work on their own faces-config.xml in a team environment, or more specifically avoid the pain of version control on a shared single faces-config.xml file which is frequently changed. As developers rapidly make changes to the faces-config.xml file a file-version tug-of-war can break out, and a merge nightmare ensue.

In the 10.1.3 release there is another file which has the same issue which is specific to ADF Faces (ie. not JSF), namely the DataBindings.cpx file (accessible by default under the ViewController project - Application Sources - view package). The DataBindings.cpx keeps track of the individual page definitions files used within the project, as well as the DataControls mapping to such things as ADF Business Components Application Modules.

Within the JDev 10.1.3 release the web.xml file has a <context-param> entry that defines where the ADF Faces project finds the DataBindings.cpx file. Multiple entries (or files) are not supported.

As developers create new data bound web pages with new page definitions, the DataBindings.cpx file will frequently change. Integrating JDeveloper with Subversion means that developers will also have a frequent tug-of-war with this file under the 10.1.3 release, requiring frequent resynchronisation and merges. This is less than ideal; less mergers means less work, aggravation and chances of mistakes.

Within JDeveloper 11g this problem has been removed by the ability to create multiple DataBindings.cpx files. Instead of configuring the DataBindings.cpx file in the web.xml file, JDev 11g has a new configuration file adfm.xml that resides under the ViewController project - Application Sources - META-INF.

Within this file you can define each DataBindings file under a <DataBindingRegistry> tag. For example:

<?xml version="1.0" encoding="UTF-8" ?>
<MetaDataDirectory xmlns="http://xmlns.oracle.com/adfm/metainf"
  version="11.1.1.0.0">
  <DataBindingRegistry path="view/DataBindings1.cpx"/>
  <DataBindingRegistry path="view/DataBindings1.cpx"/>
</MetaDataDirectory>


Note within JDev 11g the DataBindings files reside under the ViewController/adfmsrc/view directory. Ensure to create your additional DataBindings files here too.

In doing this there are some other things you must consider:

1. In each DataBindings file, you must also change the id attribute of the <Application> tag to match the DataBindings file name. For example for DataBindings1.cpx:

<Application xmlns="http://xmlns.oracle.com/adfm/application"
  version="11.1.1.47.96" id="DataBindings1" SeparateXMLFiles="false"
  Package="view" ClientType="Generic">
...and so on...


2. Also in the DataBindings file you must uniquely identify each Application Module Data Control usage by changing the id attribute of the <BC4JDataControl> tag.

I'm not yet sure, but I assume if you create 2 separate Application Module Data Control usages within the separate <BC4JDataControl> tags, you're creating 2 separate ADF BC transactions.

3. For existing and new page definition files that refer to the Data Controls from the previous step, you need to rename the Application Module Data Control reference. If you're using ADF BC for your model layer, this will typically appear in the <executables><iterator> DataControl attribute, as well as any <bindings><action> tags that refer to the DataControl (such as Commit and Rollback).

At this time when adding new web pages with new page definitions, I'm unsure how JDeveloper decides which DataBindings file to put the page definitions declarations. It appears to be by default DataBindings.cpx, otherwise it's the first DataBindings file listed in the adfm.xml file which is read in when the Workspace is opened. I can envisage that this will need to be a configurable setting in the ViewController project file sometime in the future.

Note if you get the above settings wrong, the behaviour of the running application will either be:

1) You'll receive the spinning blue Oracle logo - but a page will never load

2) Or on a browser refresh a JBO-25058 error exception stack similar to the following:

oracle.security.jazn.JAZNRuntimeException: JBO-25058: Definition BookingNo of type Attribute not found in BookingNo
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:480)
at com.evermind[Oracle Containers for J2EE 11g (11.1.1.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:583)
...and so on...


There also appears to be a small issue at design time when viewing a page, switching to the binding view, no details will be shown if the bindings reside in the 2nd DataBindings file. This is easily subverted by opening directly the page definitions file.

Finally please note the above was written under JDev 11g TP3 and may change under your future 11g+ release. I haven't tested this under TP4 (I've been sitting on this post for sometime). Basically test-test-test.

Thanks to Frank Nimphius with his assistance in resolving some issues with this in the following OTN post. As Frank notes in the post this wasn't the original intention of this facility, but a useful side effect. As always test everything as your mileage may vary.

Thursday 19 June 2008

JDev: why is Subversion preferred over CVS?

Thanks to Oracle's Susan Duncan at the ODTUG conference, I was reminded today why Subversion is the file version control of choice over CVS for JDeveloper. One of the main advantages is atomic commits.

As many JDeveloper developers will be aware, on making changes to something like an ADF Entity Object (EO) property via a wizard within an ADF project, a change may in fact result in modification of several files behind the scenes. When the developer decides to commit their changes to the file version control repository, the tool must submit all the files that changed for the ADF Entity Object to the repository for other developers to use.

However imagine the scenario where during the commit/submit of say 4 files representing the one ADF EO, the operation is successful for the first 2 files, but fails for the 3rd and 4th. We now have code within our repository that is inconsistent, some representing the earlier version of the EO, and other files representing our new version. This is going to cause major headaches for other developers who download the latest code changes from the repository, and get a mix of new and old files representing the one EO. In particular JDeveloper will probably not be able to handle this situation as there will be inconsistencies between the files. I must note this scenario is not particular to just JDeveloper, it can be an issue for all sorts of environments and is a common file version control system issue.

Unfortunately this issue is a real problem for CVS, but CVS's successor Subversion solves this through the use of atomic commits.

An atomic commit ensures that on a commit/submit, all the files are committed on success, or on any failure, all the changes are rolled back. With this feature we can guarantee the success of the overall action, or the complete failure, not some combination there of.

Thus this is why Subversion is a common recommendation for JDeveloper sites over CVS, and JDeveloper adopters should heavily consider picking Subversion for this reason.

To be clear, readers should not discount *other* file version control systems besides CVS and Subversion. You should in fact check if your tool of choice supports atomic commits among other features. From a quick Google I discovered there is a great site Better SCM that describes and compares the features of many file version control systems available, including atomic commits.

Monday 16 June 2008

Time for a name change? JDeveloper -> Fusion Developer

I'm sitting in on the first day at the ODTUG Kaleidoscope conference, the Fusion Middleware Symposium, and it struck me I think JDeveloper is a poorly branded product.

From a technical point of view, Oracle has massively expanding the product beyond its humble Java roots, from the inclusion of SOA/BPEL, through to growing WebCenter support, and the return of SQL Developer as a plug-in (or spin off, take your pick). In turn the traditional code-centric Java ADF applications are being left behind, replaced with exceedingly declarative solutions in both ADF BC and ADF Faces RC (in fact I've recently completed day long demonstrations of JDev 11g without writing a single line of Java code!).

This is not to say JDeveloper doesn't still support the "J" as such (J being Java), but it's just one part in a larger tool that has broaden its horizons.

From a marketing point of view, the "J" branding is an interesting problem for JDeveloper and Oracle because Java has been taking a bad rap for at least the last 5 years if not more giving JDeveloper a bad name by association. When you've a tool that has so many technologies in it besides Java, yet it is avoided and possibly despised because of its association with Java, this makes it a hard sell. With the "J" in the name it's also difficult to differentiate the tool from any other Java IDE out there. JDeveloper has so much more in it besides Java support, it's not just a simple IDE anymore but a fully-fledged "Service" Development Environment. Yet the Java developers are still comparing JDeveloper to Netbeans and Eclipse for is text-editor features, which is comparing apples to oranges.

Maybe it's time JDeveloper changed its name. Maybe, and I'm going to go out on a limb here, JDeveloper should consider a name change like, drum roll please........

"Fusion Developer"

Then again, if the Oracle Fusion marketing label becomes as despised as Java, maybe a better name would be:

"Oracle Developer" .... or .... "Oracle Developer Suite"

Or my favourite:

"!Apex"

I'm sure Oracle would welcome other more "appropriate" suggestions. Would anybody like to put a few ideas forward?

Saturday 14 June 2008

New OTN Article: Return to Formsville - a look at classic Oracle Forms architecture

I'm sitting at LA airport on my way to the ODTUG conference, having been up for just on 24 hours with 20 hours flying time behind me. Unfortunately my UA flight to Denver has been canceled, and now I'm waiting 7 hours for the next available flight direct to New Orleans. Being one of those people who doesn't really sleep on planes, and certainly not in airports, I'm calculating I'll be up for just around 38 hours before I finally hit a bed.

(+1 day edit note: oh well, it was only 34 hours in the end, not too bad really, can't complain ;)

Sheesh, one day a flight through the US will go without a hiccup.

Anyway, this leaves me more than a couple of minutes to let you know Penny Cookson and I are happy to announce our next Oracle Tech Network article, Return to Formsville has been published. I've listed a blurb of the article below which hopefully will catch your interest.

Some readers might be surprised that we've published an article on Oracle Forms given my blog interests in JDeveloper. In fact my boss Penny Cookson and I come from a strong Oracle "core-tech" background of Designer 100% generation, meaning a substantial background in Oracle Forms programming, and even a smattering of Oracle Headstart in my case. Thus why my last 2 OTN articles have been based around legacy artefacts from Oracle Designer and Forms; I'm interested in boot-strapping that old code base into something we can still use in the future.

For those interested, the other previous OTN article was Integrating the Oracle Designer Legacy Table API with Oracle JDeveloper 11g ADF Business Components.

I can't say I have any interest on moving back to Oracle Forms, but this attitude doesn't pay the bills, and from time to time myself and Penny and other Sage employees still maintain and extend the odd Oracle Forms system here-and-there. Sage Computing still in fact offers Oracle Forms training in Australia.

A final note of thanks to Justin Kestelyn and the OTN team for assisting us in the publication of this new article.

Returns to Formsville

New programmers moving into Oracle sites running legacy Oracle Forms and Oracle Designer applications face many challenges. New programmers rely heavily on their senior counterparts to teach them how to structure their applications, as well as the benefits of such structures from hard-earned experience. There are certainly plenty of best practices around for Oracle Forms, and Oracle Designer gave its own particular stamp to Oracle Forms architecture. Yet at many sites, senior programmers have moved on, leaving their successors guessing why applications are structured as they are. With the pressure to fix mounting maintenance issues, the elegance of the original solutions can be jeopardized.

For those starting their Oracle Forms journey, this article attempts to explain the key architectural concepts that are common to many Oracle Forms– and Oracle Designer–based applications, including their benefits and how you can use them to your advantage. In particular, the article will focus on:

* A simple Oracle Forms trigger architecture
* A flexible Corporate-Application-Form Oracle Forms library architecture
* Extending the approach to forms generated from Oracle Designer
* Oracle Designer artifacts, including the table API, cg_ref_codes, and journal tables.

Thursday 5 June 2008

JDev ADF: How to log all errors to the database

Sometimes users have the requirement that all application errors are logged to a table. In traditional Oracle development tools like Oracle Forms this was easy, simply override the ON-ERROR trigger and write PL/SQL code to call your favourite database logging code, or simply issue the insert statement to the associated logging table yourself.

In JDeveloper's ADF framework it is just as easy and is achieved in the following steps. Please note this post is written against JDev 11gTP4 so your mileage may vary in whatever version you're using:

In the JDev ADF 11g Guide section 27.8 "Customizing Error Handler", it describes you can override the ADF binding layer DCErrorHandlerImpl by creating your own custom handler. Simple create a class that is a subtype of DCErrorHandlerImpl, and override the chokepoint method reportException to capture all exceptions raised by the ADF stack. It may look something like this:

public class ErrorHandlerImpl extends DCErrorHandlerImpl {

  public ErrorHandlerImpl() { super(true); }

  @Override
  public void reportException(DCBindingContainer dCBindingContainer, Exception exception) {
    super.reportException(dCBindingContainer, exception);
  }
}


Then in the associated DataBindings.cpx file set the ErrorHandlerClass property to specify your new class and package name: eg. view.controller.frameworkExtension.ErrorHandlerImpl.

If you receive an error in this step, the following post may resolve your issues.

Unlike Oracle Forms where the programmer needs to override the ON-ERROR trigger in every form, essentially here we're doing it for the entire ADF application, saving us a fair amount of work.

Next we create a custom client interface method in our application module that (for example – we can do anything we want here) calls a database error logging package/procedure called error_pkg.log_error via JDBC:

public void logError(String message) {
  CallableStatement statement = null;
  try {
    String plsql = "BEGIN error_pkg.log_error(?); END;";
    DBTransaction transaction = getDBTransaction();
    statement = transaction.createCallableStatement(plsql, 1);
    statement.setString(1, message);
    int rows = statement.executeUpdate();
  } catch (SQLException e) {
    throw new JboException(e);
  } finally {
    try {
    } catch (SQLException e) {
      /* ignore */
    }
  }
}


In Oracle Forms the above code would simple be a PL/SQL call within an ON-ERROR PL/SQL trigger. In JDev obviously we work with Java code, and JDBC is used to make the associated database PL/SQL calls.

Once we create the client interface method and expose it in the ApplicationModule, we then need to create a binding to allow the method to be called via our custom error handler reportException() method from previous. We could create a binding in each page's pageDef bindings file to call the custom logging method, but this would be painful in a large application with many pages and the developer could easily forget to add the binding. Instead in 11g we can create an ADF Faces RC page template with an associated page definitions file, ensure to create (all!) our pages based on the page template (which any good application will do of course! ;), and create the methodBinding to call our AM log method from above:

<bindings>
  <methodaction id="logError" instancename="AppModuleDataControl.dataProvider" datacontrol="AppModuleDataControl.dataProvider" requiresupdatemodel="true" action="invokeAction" methodname="logExceptionToDatabase" isviewobjectmethod="false">
    <nameddata ndname="message" ndtype="java.lang.String"/>
  ... and so on ...
  </methodaction>
</bindings>


Of course we don't need to type the above in by hand, it can be easily created via the structure window Add bindings facilities in the JDev IDE.

Finally we return to our custom error handler class ErrorHandlerImpl, and change the reportException() method to use the binding to indirectly call the AM client interface method as follows:

public void reportException(DCBindingContainer dCBindingContainer, Exception exception) {
  BindingContext bindingContext = dCBindingContainer.getBindingContext();
  DCBindingContainer templateBindingContainer = bindingContext.findBindingContainer("view_templatePageDef");

  String error = getDisplayMessage(dCBindingContainer.getBindingContext(), exception);

  OperationBinding operationBinding = templateBindingContainer.getOperationBinding("logError");
  Map params = ob.getParamsMap();
  params.put("message", error);
  ob.execute();

  super.reportException(dCBindingContainer, exception);
}


The caveat to this approach is if the developer chooses to bypass the ADF frameworks error handling mechanisms by raising their own exceptions that don't raise a JboException, or error handling is written into JavaScript, this will bypass the ADF custom error handler.

If you're interested in other posts above JDeveloper, check out the JDev pages on wiki.oracle.com.