Whether you are deciding on the framework to use for your next Java web or mobile project or whether you are contemplating your next career step as a Java EE developer, ADF should be on your short list for consideration. With a new free version, deployment on many application servers including Tomcat, JBoss and GlassFish, extended support in both Eclipse and JDeveloper, and a Java based mobile solution for both iOS and Android – ADF has a lot to offer.
ADF is the Java EE Application Development Framework from Oracle. ADF allows developers to develop rich, enterprise grade Java web and mobile applications in a very productive manner. Many of the generic (plumbing) concerns that need to be addressed for most Java/JEE applications are taken care of by the framework – allowing developers to focus on the business specific functional areas. The initial 80% of the application is created through largely declarative development – 4GL style. The remaining 80% is dealt with in a fairly ordinary coding style, similar to plain Java EE development or to development using other frameworks.
This article discusses the question why any Java/JEE developer should know and care about ADF. It will first explain in more detail what ADF is. Then it tries to state the reasons for Java developers to get interested and hopefully get involved with ADF and finally it provides pointers as to how Java/JEE developers can get started.
My motivation for writing this article is simple: I have worked with ADF since its initial incarnation back in 2004. I have developed Java Web applications with a range of other frameworks and libraries. I have been part of ferocious debates about which tools, IDEs, frameworks and technologies to use in projects. I have felt the disinterest and uninformed dislike of self proclaimed J2EE specialists in solutions like ADF because they were from Oracle. I have seen the struggle of many Java developers to find their way in rapidly evolving Java frameworks and to become productive. I have witnessed the rise of the Spring Framework and the drastic turnaround in Java EE 5. Though arguably less than it was 10 years ago, today’s Java Web development arena is still a colorful collection of libraries, frameworks, specifications, tools, personal preference and some emotional attachments (some would say engrained biases).
I strongly believe that organizations, projects and developers who make choices about the buildings blocks, frameworks and architecture of their Java EE web applications should be aware of ADF and what it can mean to them. Just like they should know about other solutions in the Java EE space to have a holistic understanding of the Java EE market including JBoss Hibernate, Seam and Rich Faces. And about the Spring Framework and Spring MVC. And PrimeFaces. And many other solutions. Of course I believe that in many situations ADF will be a valuable technology to apply. But more importantly I believe that a rational decision making process should include the strategic and proven development framework from one of the largest players in the JEE arena, if only to decide in an informed way to not use [any part of] it. Especially now ADF is free and can be deployed on GlassFish, Tomcat and JBoss application servers.
What is ADF?
ADF is first and foremost just another Java/JEE Web application development framework. A powerful one, a proven one (first released in 2004, currently in its 3rd major generation) but not an exotic one. A framework that provides Java EE and web standards based application development in a productive (declarative, visual) way. A framework that is at its best in rich, heavily used enterprise data- and rules-driven applications – and fairly heavy weight for relatively simple self service internet sites. A framework that is crucial to Oracle – for most of its key product lines. The investments in ADF within Oracle are very substantial – virtually guaranteeing at least its mid-term future if not a long life ahead of it.
ADF can be seen as a number of layers, each one adding more functionality and productivity. You can decide which layers to leverage – to what extent you want to make use of the framework.
It is perfectly possible for example to only use the rich set of JSF components in ADF Faces and forgo the remainder of the framework. Or you can decide to use ADF Faces, Controller, Data Binding (aka Model) and implement the business service using EclipseLink JPA. And if you go all the ADF way, you add ADF Business Components (ADF BC) to the list. You can always mix business service implementations (for example ADF BC as well as JAX-WS. JAX-RS and JPA). And add your own JSF components in addition to ADF Faces.
The various layers of the ADF onion, from the outside in:
* ADF Faces – a rich JSF (JavaServer Faces 1.2 and 2.0) library with data visualization (such as charts in broadest meaning of the word), AJAX, partial page refresh, multi-browser support, touch gesture support for tablets, and a rich Client Side API
* ADF Controller – an extension of JSF’s page flow controller supporting more navigation control, finer grained memory scopes and reuse of coarse grained (multi page, multi logic) components (called task flows)
* ADF Model (aka Data Binding) – an abstraction layer that decouples and binds the view layer to the business services (EJB/JPA, RESTful and SOAP Web Services and others); this layer is somewhat similar in role to JBoss SEAM.
* ADF Business Components (ADF BC) – a business service implementation that maps relational data and operations on that data to the ADF Binding layer; ADF BC is used as alternative to JPA – with more declarative development and more database and SQL centricity, offering many Groovy and Java hooks for fine tuning and overriding, derivation and validation.
It’s worth mentioning that all of these layers are part of ADF Essentials, the free ADF license.
Additionally, ADF has built in capabilities for end to end logging, error handling, context sensitive on line help, internationalization, end user message handling and so on.
Part of the licensed version of ADF but not of ADF Essentials are several very features particular for developers building applications to suit many users needs on top of rugged security requirements:
- Personalization – built in facilities to allow users to personalize the pages in the application at run time
- Customization – the ability to create multiple appearances of the same application in a single instance and present dynamically each user session with the appropriate appearance, great for providing different business domains their own flavor of the application
- Security – a declarative, non-invasive authentication and authorization solution providing security at the page, operation level and via EL, also suitable for fine grained item authorizationWorth mentioning, the ADF framework is primarily used for the development of rich browser web based applications (the new client/server) as separate to plain old web sites. However, more delivery channels are supported. In the past, ADF could also be used for creating Swing desktop applications. This support is discontinued. Relatively new options for alternative clients are available with ADF:
- ADF DI (Desktop Integration) which uses Excel as client technology (that can be used in off-line, disconnected mode, allowing data changes to be synced and validated through the ADF application back end)
- ADF Mobile Browser (based on Apache Trinidad) that can be used to create pages that render with a simpler HTML output and for smaller page size to support traditional feature phones
- ADF Mobile – launched in the Fall of 2012 and heavily used within Oracle; ADF Mobile is an extension of ADF for the creation of stand-alone native mobile apps for iOS and Android. The development of the mobile application is done in way that is quite similar to the development of the ADF rich web applications: pages are defined using a syntax and components that closely mimic the JSF components in ADF Faces; these components leverage Data Binding – just like regular ADF applications. The Data Binding in turn will typically be implemented through a RESTful service client. Note that ADF Mobile includes a JVM that allows regular Java code to be executed as part of the ADF Mobile application – this allows Java developers to leverage their existing knowledge and develop on device applications. A single ADF Mobile application can run on either Android or iOS. See this tutorial on ADF Mobile.
Reasons to care
Given what we’ve just learned one would almost think that any Java EE developer worth his or her salt would be interested in a framework with the breadth and width and traction of ADF. But clearly if there is a plethora of other frameworks actively used by the Java EE community then that conclusion is a bit too simple. So what other additional motivations can I describe for adoption ADF? Some are listed below:
* Framework Richness in Functionality
One reason to take a close look at ADF is what it can do – it is that simple. The rich UI and powerful functionality that can be realized more or less out of the box is extremely attractive to any developer or development team.
Figure: Some screenshots of user interfaces created using ADF 11g
ADF comes with a large number of (JSF) components for presenting and editing data, laying out page and interacting through drag & drop, popups, server push and partial refresh. The integrated visualization components make it extremely easy to render data in a large number of interactive (drill down, popup) graphs. Complex navigation, simple reuse of both simple components and composite units (multi page, business logic), deep link navigation and personalization and customization are some of the out of the box functions available in ADF.
* Focus on business value (i/o plumbing)
Developers in an ADF project can typically spend a far larger percentage of their time on business specific functionality rather than generic non-functionality hooking technologies together.
ADF shields developers from many low level details – the generic, non-functional wiring and plumbing that so often take up such a large percentage of the business budget. The ADF framework abstracts the browser, HTML and CSS, the rendering device, JDBC interaction details and the concept of server push. This means that as a developer you work in components, skins (for the styling) and largely declarative mechanisms and the framework deals with multi-browser support, rending in a browser, a mobile browser and a tablet (providing multi-touch and gesture support, tablet-optimized rendering and portrait/landscape switching support), database interaction (ADF BC) that leverages the most recent JDBC functionality and Active Data Services that provides server push – currently based on long poll and before too long through Web Sockets.
Much of these lower level details are taken care of by Oracle’s ADF development team on your behalf. For example ADF automatically switches from Flash to HTML 5 for interactive Chart rendering based on the browser’s capabilities and does not impact existing applications and developers at all. The introduction of Web Sockets will hugely improve the Server Push functionality – without impact on the ADF applications that already use the Active Data Service. The drawback, some might say, is that it takes a fairly long time before new technologies are available in the framework. However, the effort a team would have to put into adopting each new technology update is pretty substantial – usually too substantial – Oracle wears that cost for you.
ADF also provides an extensive infrastructure for security, logging and exception handling as well as advanced mechanisms such as out of the box run time personalization and design time customization and reuse mechanisms (for example the ADF Library that is used as the vehicle for sharing reusable components). Again to build this yourself is a huge undertaking, and the Java EE road is littered with developments efforts that failed to build anything extensive.
- * Quality and Dog Food
No technology is free of errors. No Java EE framework comes without bugs. And I would not want to claim that ADF is any different. However, ADF is different from many other frameworks because it is not only created by a large vendor, it is also extremely heavily used by that vendor. As an aside: one meaning of the acronym ADF is Advanced Dog Food, referring to the popular saying ‘eat your own dog food’.
Any framework developer, whether working at an open source company such as JBoss or SpringSource or working as a volunteer on an open source project, wants to avoid the anger, frustration and nasty comments from the community. However, the kind of beating the team behind ADF will receive internally at Oracle when there are quality issues bothering its 3000 or more Fusion Application developers or its multi billion Fusion Applications products makes community venting seem like a VIP treatment. In general, the quality and stability of ADF – especially the beaten track, the parts used by Oracle itself in the way that Oracle suggests – is very high.
The breadth and depth and quality of the supporting resources is pretty extreme. Very extensive documentation, covering the ADF framework in full and updated with each release (approximately twice per year) compares favorably with many other projects and products. Add to that a very active, wide spread and involved community – not necessarily different from the communities around other technologies – and as a starting or even advanced developer you are definitely not on your own.
* Productivity (even for a mixed team)
Unlike many other Java frameworks who rely on heavy manual coding and use of your favorite text editor, ADF is well integrated into two IDEs: both Oracle JDeveloper and recently Eclipse and offer a visual and declarative development approach that is quite unique in the world of Java. Visual UI editing, flow diagrams, property inspectors and advanced drag and drop UI to business services binding make the development much more productive and doable for many developers. And even though the visual, declarative development is almost always an option, it is not a straight jacket: the underlying Java and XML source code is always accessible and you can modify this source directly.
The JDeveloper Studio Edition – one of the IDEs used for ADF development – comes bundled with an integrated WebLogic Server. This means that – depending primarily on your internet bandwith – you can have your first ADF application up and running within 10 minutes after reading this article. The steps are: download , run the installer, start JDeveloper, create new application, create a JSF page and add some ADF Faces components, right click & Run the page. The application is built and packaged, the WLS server is started and the application is deployed and ran in your favorite browser.
* Many interesting projects and working environments
ADF is used for fairly complex business driven applications – this is where it shines. At the far end of the scale of ADF projects is the massive development of Oracle Fusion Applications (1000s of developers, > 10k pages). Even at the other end of the scale, ADF projects and applications will still be quite interesting: the business case challenging, the IT architecture well thought-through, frequently involving SOA (Service Oriented Architecture) and a business process approach (for example based on BPM). The organizations doing ADF development are typically professional, well organized and very serious about their software development and about the strategic, long term value of the applications they create.
Among the environments for ADF developers is a large number of ISVs – companies that develop their own software product and sell it to a large customer base, frequently with customers spread over the globe. A lot of interesting projects in the near future – sprouting from the increasing adoption of Oracle Fusion Applications, will focus on the creation of extensions to and customizations of Fusion Applications, typically using the Oracle Cloud Java Service for deployment.
* Stability and Future
When you decide to invest in any framework – your time, money and energy as a developer or as an organization – one thing to consider is whether your investment is safe for at least the mid-term future. Will the rug be pulled from under your feet, because the framework is discontinued or no longer evolved in anger? Given the investments Oracle has made in applications and products built internally using ADF and in the huge number of Oracle staff trained in and experienced with ADF (and those investments are really very very big), it is a fair assumption that ADF can be considered one of the most future proof Java EE frameworks to be found.
As a proving point: anyone who started doing ADF since 2004 would see their investment still largely intact today – the web world has changed considerably in that time, as such surviving some radical changes in the way web applications are developed.
* Opening Up
ADF is a Java EE framework. It implements and works with many of the JEE standards and runs on standard Java EE application servers. Just as any framework, ADF has its own extensions on top of the standards and its own way of leveraging the standards. However, compliance with standards, support for multiple application server and alignment with common practices in the Java community is very much part of ADF these days.
JDeveloper – the Java EE IDE from Oracle – has long been the (only) development environment for ADF. However, for the last several years the support for ADF development in Eclipse has been evolved – in the OEPE plugin (Oracle Enterprise Pack for Eclipse). While not entirely on par with ADF in JDeveloper, development for ADF Essentials is well supported in Eclipse (see this article).
The cloud-era has definitely arrived. Deployment on cloud based environments (PaaS providers) is increasingly popular. ADF applications have been known to be deployed on Amazon EC2. Oracle offers the (not yet fully operational) Oracle Cloud Java Service for ADF deployment. Other cloud deployments are likely to follow – or may already be available.
Money comes into this discussion in two ways.
The first is the recent release by Oracle of ADF Essentials. This is a license under which ADF can be used for free. With ADF Essentials, ADF application can be developed and deployed for free (or at least without paying for the software). Remember: ADF Essentials contains most – but not every last feature – of ADF. Most strikingly: ADF Mobile, ADF Security and the Customization mechanism are not part of ADF Essentials. Note: ADF Security is a declarative layer over Java EE Security that also integrates with OPSS (Oracle Platform Security Services on the WebLogic Server platform). Even though ADF Security is not part of ADF Essentials, the usage of regular Java EE security still is of course.
ADF Essentials can be deployed on a wide range of JEE Web application servers, including Tomcat, GlassFish, WebSphere and JBoss. To use fully fledged ADF, a run time license from Oracle is required. This license comes with any WebLogic Server license and can also be acquired separately (for something like US$6k per cpu core) for deployment on other Java EE application servers.
The second way in which money could be a consideration is for you as a developer: the hourly rates for ADF developers are quite a bit higher than for an “average” Java/JEE developer. Some factors that determine the rate are the productivity, the high demand for such resources and the types of projects and applications developed using ADF. By adding ADF to your Java tool bag, you may be able to achieve an attractive income increase.
* Cool and Fun
Developing with ADF can be a lot of fun – especially given the ability to focus on the important stuff and the really advanced functionality of the application instead of the boring, run of the mill stuff. The applications you create with ADF can be quite cool with state of the art features (e.g. data visualization, data push, rich UI, run time personalization) and a very attractive UI.
How to get started with ADF?
The easiest way to get introduced to ADF and how to get started on it is the ADF Collateral tour: ADF Tour (a web cast with an overview of first steps with ADF – introducing software, resources and a path to walk as a new comer). Just sit back, watch for 12 minutes or so and hear what useful options and the most logical route are.
An overview of many starting point is found at the Getting Started page on the JDeveloper and ADF Home Page on Oracle Technology Network
Two tutorials that will help you quickly get going with doing actual development:
- Tutorial on creating a Rich Web Application on top of a Relational Database using ADF and JPA (EclipseLink):- http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_51/jdtut_11r2_51_1.html
- Tutorial on creating a Rich Web Application on top of a Relational Database using ADF (including ADF BC): http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_1.html
We at AMIS have the intention of writing more article on ADF development for Java EE developers. We also plan on organizing events around ADF for this audience and we already offer a 3-day training to get experienced Java EE developers going in ADF. If you are interested in any of this, feel free to comment on this article or send an email to us at AMIS (info @ amis.nl).
The ADF Eco-system
ADF is used around the world. And with ADF, just like almost any Java framework out there, a world wide community has sprung up that shares experiences (and opinions) as well as samples, reusables and best practices. The community collaborates in a number of discussion forums, in conferences and by producing resources such as YouTube movies, blog-articles, books and code snippets. An non-exhaustive list of resources:
OTN Discussion Forum on features, stack traces and bugs, how to’s and interaction with product management – https://forums.oracle.com/forums/forum.jspa?forumID=83.
ADF EMG (Enterprise methodology Group) Forum on ADF Architecture, approach, positioning, best practices etc. – http://groups.google.com/group/adf-methodology
A repository with over 550 ADF samples, created through community collaboration – is found here: ADF Sample Repository
A second collection of tips and code samples is the ADF Code Corner
A live demo of all ADF Rich Client components is available at: http://jdevadf.oracle.com/adf-richclient-demo.
Dozens of blogs regularly pay attention to ADF, from new features and functionality to practical tips for deployment and run time administration. The ADF twitter feed tracks and update you about the recent blog entries in the world of ADF – http://twitter.com/jdev. Our own AMIS Technology Blog is an important source of ADF related information: https://technology.amis.nl/.
Several books (and more on their way) have been published to help get started or get advanced with ADF. Some titles: Quick Start Guide to Oracle Fusion Development (Grant Ronald), JDeveloper 11g Handbook (Peter Koletzke & Duncan Mills), Oracle Fusion Developer Guide (Frank Nimphius & Lynn Munsinger), Oracle ADF Enterprise Application Development-Made Simple (Sten Vesterli),Oracle ADF Real World Developer’s Guide (Jobinesh Purushothaman) – next to the over 3000 pages of the pretty good official ADF documentation: http://docs.oracle.com/cd/E23943_01/astools.htm.
The main index of ADF resources is available on OTN: OTN ADF Page – Learn More
The Design Patterns and standards that Oracle developed internally for making optimal use of ADF for developing its enterprise applications (Fusion Applications) have been published on the internet: oracle_fusion_applications_design_patterns
ADFInsider You Tube Channel: http://www.youtube.com/user/ADFInsiderEssentials
Overview of some public websites based on ADF: http://www.oracle.com/technetwork/developer-tools/jdev/community/publicadf-1613113.html.
Some of the hundreds of organizations using ADF are listed in the Oracle ADF Success Stories: http://www.oracle.com/technetwork/developer-tools/jdev/community/index-085291.html
Thanks to Luc, Chris and Shay for making valuable suggestions for improving this article.