Preface
This book contains a wealth of resources covering Oracle's JDeveloper 11g release and the Application Development Framework (ADF) and how these technologies can be used for the design, construction, testing, and optimizing of Fusion web applications. Being vast and complex technologies, an attempt has been made to cover a wide range of topics related specifically to Fusion web applications development with ADF, utilizing the complete ADF stack. These topics are presented in the form of recipes, many of them derived from the author's working experience covering real world use cases. The topics include, but are not limited to, foundational recipes related to laying out the project groundwork, recipes related to the ADF business components, recipes related to ViewController, recipes related to security, optimization and so on.
In the maze of information related to Fusion web applications development with ADF, it is the author's hope that aspiring ADF developers will find in this book some of the information they are looking for. So lift up your sleeves, put on your ADF chef's hat, pick up a recipe or two, and let's start cooking!
What this book covers
Chapter 1, Pre-requisites to Success: ADF Project Setup and Foundations, covers a number of recipes related to foundational concepts of Fusion web application development with ADF. By applying and expanding these recipes during the early architectural and design phases as needed, subsequent application development takes on a form, a structure, and the necessary uniformity. Many if not most of the recipes in the following chapters rely on these recipes.
Chapter 2, Dealing with Basics: Entity Objects, starts our journey into the world of ADF business components. First stop: entity objects. The recipes in this chapter deal with some of the most common framework functionality that is overridden in real world applications to provide customized business functionality.
Chapter 3, A Different Point of View: View Objects Techniques, covers a number of recipes related to view objects. This chapter explains how to control attribute updatability, how to set attribute default values, how to iterate view object row sets, and many more.
Chapter 4, Important Contributors: List of Values, Bind Variables, View Criteria, covers additional topics related to view objects. These topics include recipes related to list of values (LOVs), bind variables and view criteria. The reader will learn, among other things, how to setup multiple LOVs using a switcher attribute, cascading and static LOVs, and how to create view criteria programmatically.
Chapter 5, Putting them all together: Application Modules, includes a number of recipes related to application modules. You will learn, among others, how to create and use generic extension interfaces, expose a custom application module method as a web service and access a service interface from another application module. Additional recipes cover topics such as a passivation/activation framework, using shared application modules for static lookup data and custom database transactions.
Chapter 6, Go with the flow: Task Flows, delves into the world of ADF task flows. Among others, you will learn how to use an application module function as a method call to initialize a page, how to use a task flow initializer, how to retrieve the task flow definition programmatically and how to create a train.
Chapter 7, Face Value: ADF Faces, JSPX Pages and Components, includes recipes detailing the use of a variety of ADF Faces components, such as the query component, the popup window component, the tree component, the select many shuttle component, the carousel component, and others.
Chapter 8, Backing not Baking: Bean Recipes, introduces topics related to backing beans. A number of topics are covered including the use of custom table selection listeners, custom query and query operation listeners, session beans to preserve session-wide information, popup windows to handle long running tasks.
Chapter 9, Handling Security, Session Timeouts, Exceptions and Errors, covers topics related to handling security, session timeouts, exceptions and errors for an ADF Fusion web application. The recipes in this chapter will show the reader how to enable ADF security, how to use a custom login page, how to access the application's security information, how to detect and handle session timeouts, and how to use a custom error handler.
Chapter 10, Deploying ADF Applications, includes recipes related to the deployment of ADF Fusion web applications. These recipes include the configuration and use of the standalone WebLogic server, the deployment of applications on the standalone WebLogic server, the use of the ojdeploy tool and the use of Hudson as a continuous integration framework.
Chapter 11, Refactoring, Debugging, Profiling, Testing, deals with topics related to refactoring, debugging, profiling, and testing ADF Fusion web applications. The recipes in this chapter cover topics such as the synchronization of business components to changes in the database, refactoring of ADF components, configuring and using remote debugging, configuring logging in the WebLogic server, CPU profiling and the configuration, and usage of JUnit for unit testing.
Chapter 12, Optimizing, Fine-tuning and Monitoring, covers topics related to optimizing, fine-tuning, and monitoring ADF Fusion web applications. The recipes in this chapter demonstrate how to limit the rows fetched by view objects, how to limit large view object queries, how to use work managers for processing long-running tasks and how to monitor your application using the JRockit Mission Control.
Chapter 13, Miscellaneous Recipes, the additional content recipes cover topics related among others to using JasperReports, uploading images to the server, and handling and customizing database-related errors. This chapter is not present in the book but is available as a free download from the following link: http://www.packtpub.com/sites/default/files/downloads/4767EN_Chapter 13_Miscellaneous Recipes.pdf.
What you need for this book
The recipes in this book utilize the latest release of JDeveloper at the time of writing, namely JDeveloper 11g R2 11.1.2.1.0. This release of JDeveloper comes bundled with the necessary ADF libraries and a standalone installation of the WebLogic server. Ensure that the WebLogic server is installed as part of the JDeveloper installation.
In addition, you will need a database connection to Oracle's HR schema. This schema is provided along with the Oracle XE database.
A number of recipes cover topics that will require you to download and install the following additional software: Hudson continuous integration, JRockit Mission Control, Jasper Reports, and iReport.
Who this book is for
This book is targeted to intermediate or advanced developers, designers and architects already utilizing JDeveloper, the ADF framework, and Oracle's Fusion technologies. Developers utilizing the complete ADF stack for building ADF Fusion web applications will benefit most from the book. The book uses ADF business components as its model layer technology, ADF binding, ADF task flows and the ADF model for its controller layer technologies, and ADF Faces as its view layer technology.
The introductory concepts in the first chapter, along with the chapters related to handling exceptions, session timeouts, optimizing, and fine tuning may appeal more to application designers and architects.
Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "In addition to the session-timeout
configuration setting in web.xml
, you can configure a session timeout warning interval by defining the context parameter"
A block of code is set as follows:
public class SessionTimeoutFilter implements Filter { private FilterConfig filterConfig = null; public SessionTimeoutFilter() { super(); }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
new ExportEmployeesWork(getEmployees().createRowSetIterator(null))
Any command-line input or output is written as follows:
$ chmod u+x ./jdevstudio11121install.bin
$ ./jdevstudio11121install.bin
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Using the Property Inspector change the URL Invoke property to url-invoke-allowed."
Note
Warnings or important notes appear in a box like this.
Note
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <feedback@packtpub.com>
, and mention the book title through the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Downloading the example code
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.
Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <copyright@packtpub.com>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions
You can contact us at <questions@packtpub.com>
if you are having a problem with any aspect of the book, and we will do our best to address it.