Preface
Oracle ADF is a powerful Java application framework for building next generation enterprise applications. Oracle ADF in combination with JDeveloper IDE offers visual and declarative approaches to enterprise application development. This book will teach you to build scalable, rich enterprise applications by using the ADF Framework, with the help of many real world examples.
This book discusses the ADF Framework in depth. This book is designed to take programmers beyond visual and declarative programming model and enable them to customize the framework features to meet the real world application development challenges. Many of the framework features are discussed along with real-life use cases and code samples which will definitely help developers to design and develop successful enterprise applications.
This book starts off by introducing the development environment and JDeveloper design-time features. As you read forward, you will learn to build a full stack enterprise application, using ADF. You will learn how to build business services by using ADF, enable validation for the data model, declaratively build user interfaces for a business service, and enable security across the application layers.
What this book covers
Chapter 1, Getting Started with Oracle ADF, introduces Oracle Application Development Framework (Oracle ADF) and its layered architecture. In this chapter, we will develop a simple ADF web application.
Chapter 2, Introduction to ADF Business Components, gives an overview of ADF Business Components, which includes discussion on some topics such as business service layer, building a simple business service, Oracle ADF Model Tester, and so on.
Chapter 3, Introducing Entity Object, explores the Oracle ADF technology stack in depth. This chapter introduces the entity objects, which make up the persistence layer of business components.
Chapter 4, Introducing View Object, discusses about the ADF view object, which is in charge of reading and shaping the data for presenting it to the client. This chapter explains architecture of a view object, its usage, and runtime behavior.
Chapter 5, Advanced Concepts on Entity Objects and View Objects, takes a deeper look into the internals of view objects and entity objects. This chapter focuses on the advanced concepts of these components along with code samples.
Chapter 6, Introducing Application Module,.discusses about the application module component and the service layer for the business components stack. This chapter covers the topics such as core features of an application module, defining an application module, sharing of application module data, and so on.
Chapter 7, Binding Business Services with User Interface, shows how to bind user interface for the data model built from ADF Business Components. This chapter covers the topics such as binding model data with user interfaces, building a simple data bound web page, browsing through page definition file, invoking application module from a Java servlet.
Chapter 8, Building Data Bound Web User Interfaces, covers data bound UI development in detail. This chapter discusses the power of model-driven UI development support offered by Oracle ADF Framework along with JDeveloper IDE.
Chapter 9, Controlling the Page Navigation, discusses about the offerings from the ADF Controller layer to navigate back and forth between views in a Fusion web application. This chapter discusses the basic navigation models provided by the ADF Controller layer.
Chapter 10, Taking a Closer Look at the Bounded Task Flow, covers the topics such as properties of a bounded task flow, building a bounded task flow, working with bounded task flow activities, and so on.
Chapter 11, More on Validations and Error Handling, explains ADF validation cycle for a page and the infrastructure for handling validation exceptions. This chapter covers the topics such as adding validation rules in a Fusion web application, displaying validation exceptions on a page at runtime, and so on.
Chapter 12, Oracle ADF Best Practices, discusses the best practices and coding tips that developers will find useful when building ADF applications. Learning the best practices will help you to avoid common pitfalls that others might have faced.
Chapter 13, Building Business Services with EJB, explains how Oracle ADF helps you to declaratively build user interfaces for Enterprise Java Beans (EJB) based services. You can download this chapter from http://www.packtpub.com/sites/default/files/downloads/4828EN_Chapter13_Building_Business Services_with_EJB.pdf .
Chapter 14, Securing Fusion Web Applications, describes how you can visually enable security in different layers of your Fusion web application. You can download this chapter from http://www.packtpub.com/sites/default/files/downloads/4828EN_Chapter14_Securing_Fusion_Web_Applications.pdf.
Appendix, More on ADF Business Components and Fusion Page Runtime, discusses various useful features and techniques for ADF Business Components. This chapter covers the topics such as page life cycle for a Fusion page with region, transaction management in Fusion web applications, Building a dynamic model-driven UI with ADF, and so on. You can download this appendix from http://www.packtpub.com/sites/default/files/downloads/4828EN_Appendix_More_on_ADF_Business_Components_and_Fusion_Page_Runtime.pdf.
What you need for this book
The examples given in this book utilize the latest release of JDeveloper at the time of writing, namely JDeveloper 11g Release 2 (11.1.2.2.0) Studio Edition. The Studio Edition of JDeveloper comes bundled with the necessary ADF libraries and an integrated WebLogic Server installation. Though all the samples are tested primarily against WebLogic Server, they should also work on any ADF-certified application server. In addition, to run examples you may also need an Oracle database with the HR schema (which is a sample database schema). You can use Oracle Database Express Edition (Oracle Database XE) for this which comes with the HR schema.
Who this book is for
If you are an ADF developer looking forward to building healthy and better performing applications by using Oracle ADF, this is the best guide for you. You need to be proficient with Java and need to know a bit of ADF before getting started with this book.
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: "The adf-settings.xml
file keeps the UI project configurations."
A block of code is set as follows:
import oracle.jbo.ApplicationModule; import oracle.jbo.Row; import oracle.jbo.ViewObject; import oracle.jbo.client.Configuration; public class TestClient { public static void main(String[] args) { String amDef = "com.packtpub.adfguide.ch2.model.service.HRServiceAppModule"; String config = "HRServiceAppModuleLocal"; ApplicationModule am = Configuration.createRootApplicationModule(amDef, config); // Work with your appmodule and view object here //Find Department View Object Instance ViewObject vo = am.findViewObject("Departments"); //Execute Department query vo.executeQuery(); //Fetch the first record Row deptRow = vo.first(); printRow(vo, deptRow); // Clean up resources Configuration.releaseRootApplicationModule(am, true); } }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
RowIterator rowIter= DeptEOImpl.getEmpEO();
rowIter.reset();
while(rowIter.hasNext()){
Row row=rowIter.next();
//Row represent Emp entity instance
}
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: "The Rebuild option allows you to fire an unconditional compilation on the source".
Note
Warnings or important notes appear in a box like this.
Tip
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 via the subject of your message.
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail <suggest@packtpub.com>
.
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.
To locate easily, the example code files for each chapter are grouped under the folders with the respective chapter numbers as names (for example, chapter1). Note that each JDeveloper workspace folder contains a readme.txt
file which explains the ADF framework features exercised in that sample.
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 on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
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.