Developer

Oracle JDeveloper 10g: Application Development Framework

The Application Development Framework (ADF) found in JDeveloper 10g is Oracle's effort to make Java server development easier and faster. Builder.com's Harshad Oak examines what exactly ADF is and is not.


Developing Java 2 Enterprise Edition (J2EE) applications using Java Server Pages (JSPs)/Servlets and Enterprise JavaBeans (EJBs) is quite popular. However there is no denying that J2EE can get quite complex at times. You need to understand many things to be able to deploy a quality J2EE application. Developing an application and developing a quality application are two very different things in J2EE.

Adapted from:
Oracle JDeveloper 10g: Empowering J2EE Development, by Harshad Oak
Publisher: Apress
ISBN: 1-59059-142-9


Many attempts at reducing the complexity of J2EE and building frameworks and abstractions that will make the developer's task easier have already been made. The Application Development Framework (ADF) is Oracle's attempt at this. Apart from reducing complexity, raising the overall quality of the application being developed is also something that ADF aims at.

With version 10g, everything that isn't Java (as you know Java independent of JDeveloper) seems to fall into the ADF zone. Many of the features such as the Business Components for Java (BC4J) and JClient were already around in earlier versions; however, with ADF, Oracle has consolidated the existing bits and built on them to provide even more productivity and ease of use.

ADF overview
Whenever you think of any framework, a few questions need to be answered even before you consider ADF as an option:
  • Do you have to pay for ADF usage?
    No. ADF is licensed as part of JDeveloper; no separate license is required to deploy applications based on ADF.
  • Once you develop with ADF, can you deploy only on an Oracle application server?
    ADF applications will run on any J2EE-compliant application server.
  • Does ADF only work with Oracle databases?
    No. ADF will work with other databases such as DB2, SQL Server, and so on.
  • Can you develop and maintain applications using non-Oracle tools?
    As yet, no non-Oracle tool provides support for ADF development. However as ADF depends on XML files for its working, you do have the option of editing the XML directly using any other tool.
  • Is the learning curve steep?
    JDeveloper provides many wizards and tools to simplify development with ADF. However, it does take some time to get used to the tool. The basic tasks are not very difficult, but advanced functions are a little complex.
  • Can applications developed with earlier JDeveloper versions work with ADF?
    Yes. Oracle claims to be strongly committed to compatibility between the previous version and 10g.
  • Do you have to choose between pure J2EE and ADF, or can both work together?
    ADF components can work well in tandem with normal J2EE components such as EJBs, JSPs, and so on.
  • Should you opt for ADF-based development on your project?
    This is a tough question. ADF is certainly a useful offering. However, you need to consider whether you are committed to using JDeveloper and Oracle technologies over the long run. Also, it is unlikely that a job advertisement saying "expertise in ADF expected" would get much response. So individuals skilled in ADF become a vital resource. To build expertise, you will have to incur some training expenses.
  • What Is ADF?
    The ADF frequently asked question (FAQ) Web page says the following:

    Oracle ADF is a comprehensive productivity layer for J2EE developers. It simplifies building applications as a set of business services with Web, wireless, and rich client interfaces. ADF accelerates development with ready-to-use J2EE Design pattern implementations and metadata-driven components that you'd otherwise have to code, test, and debug by hand.


I could not find much information about how exactly ADF has evolved and why it was conceptualized in the first place. I would think that the framework was created because developers were trying to simplify working with Java and J2EE and interacting with databases. If you want to achieve this while maintaining high quality and abstracting the complexity of the framework itself from end users, you need a good tool to use. So while ADF implements various design patterns and tries to develop high-quality applications, JDeveloper makes it easier to use ADF itself.

Although the ADF emphasizes the Model-View-Controller (MVC) architecture and view options such as JClient and UIX, the best offering is the ease with which interaction with the database is possible using ADF tools. Even the power of the view offerings lies in how easily the view can be bound to data. Lets now look at the three main components of ADF, the business components, UIX, and JClient.

ADF business components
ADF business components are a great option for not having to write data access code for your application and also have top-quality code doing the job for you. Considering that improper data access code can severely affect the performance of the application, it is important to have a well-designed and optimized bit of code being used for database interactions. Business components give you the option of not writing any code in your application for database interaction, but instead just interacting with some business components that will in turn handle the tasks that need to be performed with the database.

ADF business components are not the first or only attempt at having some software between the application code and the database. However, the ease with which you can work with ADF business components in JDeveloper and the capability of taking them beyond just mapping to the database and being actual business services with some logic in them is what makes ADF business components special.

Introducing UIX
UIX is a J2EE-based framework for building Web applications. UIX pages can serve as an alternative to using JSPs. UIX in tandem with business components can get a dynamic and data-centric application up quickly.

UIX fits into the View layer of ADF's MVC scheme of things. UIX pages are XML pages that use a set of tags that convey the "how" and "what" of the page. UIX pages have a hierarchy of XML elements based on the display expected. If you are already worrying about having to study a new set of tags, fret not. Ideally, using all the tools that JDeveloper provides, you do not have to manually edit the XML at all.

My first impression of UIX was that it felt a lot like developing a Swing or Abstract Window Toolkit (AWT) client. There were various layouts, components, events, and so on already defined, and all I had to do was to drag and drop components.

Introducing JClient
JClient provides a view alternative in the ADF scheme of things. Although UIX was meant for Web applications, JClient is meant for Swing-based client applications. JClient provides a set of classes that can use business components to quickly create data-bound Java UI applications. Apart from JClient's data-binding capabilities, developing a JClient application is not very different from a standard Swing application.

There's no denying that, with ADF, Oracle has come up with a neat way to quickly create data-bound applications. The thing to consider before an ADF adoption is the long-term commitment that is required to make an ADF adoption really successful. Also ADF could only get better with time, with more tools coming in and the user community driving more innovation and content on the subject.

Editor's Picks

Free Newsletters, In your Inbox