Book Image

Oracle ADF Enterprise Application Development Made Simple: Second Edition

By : Sten E Vesterli
Book Image

Oracle ADF Enterprise Application Development Made Simple: Second Edition

By: Sten E Vesterli

Overview of this book

Table of Contents (20 chapters)
Oracle ADF Enterprise Application Development – Made Simple Second Edition
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Welcome to your first real-life enterprise ADF application!

The book you're holding in your hands is about building serious applications with the Oracle Application Development Framework (ADF). You know that actual development work is only one part of a successful project and that you also need structure, processes, and tools.

That's why Oracle ADF Enterprise Application Development – Made Simple, Second Edition, will take an enterprise focus, following a complete project from inception to final delivery. Along the way, you will be building a Proof of Concept application, but you will also be setting up and using all of the professional support tools you need for a real-life project.

This book will take you through the entire process of building an enterprise ADF application, from the initial idea through the Proof of Concept, tool choice, preparation, coding the support classes, building the application, testing it, customizing it, securing it, and finally, deploying it.

What is an enterprise application?

Enterprise applications are the strategic applications in the enterprise. They will handle critical business functions and tend to be big and complex. In the past, it was acceptable that users had to take training classes before they were able to use the application, but today, enterprise applications are also required to be user friendly and intuitive. As they are deployed throughout the organization, they will need sophisticated security features. Enterprise applications will remain in use for a long time because of the cost of developing and implementing them.

Application size

An enterprise application is big—containing lots and lots of code modules, interacting in complex ways among themselves and with external systems.

Typically, this means that an enterprise application also has a lot of different screens where the user will interact with the system. However, it is also possible that the complexity of the enterprise application is hidden from the user; a good enterprise application might seem deceptively simple to the average user.

Development team

The complexity of an enterprise application means that it will have to be built by a larger team. It will use several technologies, so you need people skilled in all of the relevant areas. You will need to have people working in parallel on different parts of the application in order to develop it within a useful timeframe because of its sheer size.

An enterprise application cannot simply be partitioned out among developers because of the interdependencies among the different parts of the application. Instead, development work must be carefully planned so that the foundation is laid down before the rest of the house is built while, at the same time, allowing for the inevitable changes as the project progresses.

Development tools

Naturally, you need an Integrated Development Environment (IDE) to build the actual application. This book assumes that the entire team will be using Oracle's free JDeveloper tool for all work. The choice of IDE can be the subject of almost religious fervor, and some projects allow each developer to choose his or her favorite IDE. However, in an enterprise project, the benefits of having everyone use the same tool clearly outweighs any minor benefit achieved by using other IDEs with marginally better support for one or the other task.

In addition to the IDE, you will also need source control—a server holding all of the different versions of the development artifacts and a client on each development workstation. This book uses both Subversion and Git as examples of how to use source control in an enterprise project with JDeveloper.

Another important tool is an issue-tracking tool. This can be used to track defects in code as well as ideas, development tasks, and many other things. In this book, the well-known Jira tool is used, and it is explained how this tool fits the Oracle Team Productivity Center (TPC).

Finally, you need a scripting tool. In a small project, it might be sufficient to build applications directly off of the IDE, but in an enterprise application, you need a tool to ensure that you can build your project in a consistent manner. This book uses Ant as an example of a scripting tool for the ADF projects.

Lifetime of an enterprise application

Enterprise applications are not casually thrown away and rebuilt because of the effort and cost involved in building them. Indeed, many organizations are still running enterprise applications built more than a decade ago.

The longevity of enterprise applications makes it extremely important that they are well built and well documented. Most developers will be familiar with the pain of having to maintain a poorly documented application and understand the need for a good documentation.

However, while documentation is important, it is just as important that the application is built in a recognizable, standard way. That is why this book advocates using the ADF framework in its intended way so that the future generations of developers can look at the code and immediately understand how the application is built.

What this book covers

Before your organization embarks on building an enterprise application using the Oracle Application Development Framework, you need to prove that ADF will indeed be able to meet the application requirements.

Chapter 1, The ADF Proof of Concept, will take you through building a Proof of Concept application using the normal ADF components: ADF Business Components for the middle tier, ADF Faces, and ADF Task Flows for the user interface. The application will access data stored in relational tables and use both the standard ADF components and an ADF Data Visualization component (a Gantt chart). This chapter contains step-by-step instructions and can be used as a hands-on exercise in basic ADF development.

Once you have proved that ADF is capable of delivering the necessary functionality, you need to figure out which components will be part of your application and estimate the total effort necessary to build it.

Chapter 2, Estimating the Effort, will provide checklists of tasks that you must remember in your estimate as well as some guidelines and estimation techniques that you can use to calculate how much time it will take to build the application.

The next step after having decided to proceed with an ADF enterprise project is to organize the development team.

Chapter 3, Getting Organized, explains the skills you need to build an enterprise application and how to organize your team. It also explains which tools you need in your enterprise project and how you should structure your code using separate workspaces connected through the powerful ADF Library functionality for maximum efficiency.

For the team to work efficiently toward the project goal, each developer needs a development workstation with complete integration of all the necessary tools.

Chapter 4, Productive Teamwork, describes how to set up and use the Oracle Team Productivity Center, which serves as an integration hub, connecting your issue tracking system (for example, Jira) and other tools to JDeveloper. It also explains how to work effectively with Subversion and JDeveloper together for version control.

With your workstation all set up and ready to go, you need one more thing before starting development in earnest: templates and framework extension classes. For a small application it might be OK to just start coding and work out the details as you go along. However, in an enterprise application, the rework cost of such an informal approach can be prohibitive.

Chapter 5, Preparing to Build, explains the task flow and page templates you need to build a uniform user interface in an efficient way. It explains why you need your own ADF framework extension classes and how to build them.

Now that all of the infrastructure and templates are in place and the development workstation has been configured with all necessary connections, it is time to prove the entire development flow.

Chapter 6, Building the Enterprise Application, walks you through creating the same Proof of Concept application as in Chapter 1, The ADF Proof of Concept, but this time, using all of the enterprise support tools configured and prepared in Chapter 4, Productive Teamwork and Chapter 5, Preparing to Build. The application is built in a module manner in separate subsystems and integrated together in a master application to illustrate how a large enterprise application should be structured.

By the end of this chapter, you would have proved that the entire enterprise toolset is functional, and you would have rebuilt the Proof of Concept application using the correct enterprise methodology.

All applications need to be tested, but enterprise applications need testing much more than smaller applications, for the following two reasons:

  • The size and complexity of an enterprise application means that there are more interfaces where things can go wrong

  • The long life expectancy of an enterprise application makes it almost certain that other developers will be maintaining it in years to come

For both of these reasons, it is important that the application comes with test cases that prove correct functionality. It will not be sufficient to have a collection of test scripts that must be manually executed—these will not be consistently executed and will surely become out of date over the lifetime of the application. Your tests must, therefore, be automated so that they can be executed as part of the build process.

Chapter 7, Testing Your Application, explains how to write code tests in the form of JUnit test cases and how to use Selenium to record and playback user interface tests. It also explains how JMeter can be used to load test your ADF application.

Your organization will, of course, have graphical standards that the application must adhere to. In an ADF application, the look of the application can easily be modified in a process known as skinning. By developing several skins, you can even deploy the same application multiple times with very different visual identities—an invaluable feature for independent software vendors.

Chapter 8, Changing the Appearance, explains how to use the powerful skin editor available in JDeveloper 11g Release 2 and later versions to create Cascading Style Sheets (CSS) to create a new skin, which corresponds to your enterprise visual identity, for your application.

Looking at the requirements for your application, you might identify a number of pages or screens that are almost, but not quite, identical. In many cases, you don't have to develop each of these individually—you might be able to develop one master page and use functional customization to provide different groups of users with different versions of the page.

The ability to easily customize an application's functionality is one of the truly outstanding features of the Oracle ADF framework. Here, you benefit from the fact that Oracle has developed ADF for real life, large enterprise applications like Oracle Fusion Applications. If you are an independent software vendor, producing software for sale, you can use this feature to easily customize a base application for individual customers.

Chapter 9, Customizing Functionality, explains how to set up an application for customization using ADF Meta Data Services, and how to use the special JDeveloper customization role to perform the actual customization.

Your enterprise application needs a robust, role-based security model.

Chapter 10, Securing Your ADF Application, explains how to secure both user interface (task flows and pages) and data access (Entity Objects) using ADF security features, and how ADF security ties in with WebLogic security features.

Once the individual parts of the application have been built and tested, it is time to build a complete deployment package.

Chapter 11, Packaging and Delivery, describes how an enterprise application deployment package is built and how the development team can set up their own standalone WebLogic server to ensure that the deployment package will work when handed over to the operations team.

An enterprise application might have to be made available in several languages.

Appendix, Internationalization, explains how internationalization works in ADF and how to produce a localized application.

How to read this book

This book follows an enterprise application from inception to final delivery, and you can read the chapters in sequence to learn a proven method for successfully building an enterprise application that meets the business requirements on time and on budget.

However, many chapters can also be read on their own if you just need information on a specific topic. For example:

  • Chapter 1, The ADF Proof of Concept, can serve as a quick introduction to ADF, thus allowing an experienced developer to get started with ADF

  • Chapter 8, Changing the Appearance, can be used as a tutorial in ADF skinning

  • Chapter 9, Customizing Functionality, explains how to harness the power of ADF customization

Are you ready to build a real-life enterprise application? Let's get started!

What you need for this book

To build enterprise ADF applications, you need Oracle JDeveloper and a database, which are as follows:

  • Oracle JDeveloper is free and can be downloaded from the Oracle Technology Network (http://otn.oracle.com). The examples in this book use Version 12.1.2, but you should use Version 12.1.3 or a later version if such a version is available by the time you read this book. The examples will also work in JDeveloper 11g.

  • You can use the free Oracle Database Express Edition 11g Release 2, which is also available from the Oracle Technology Network.

Additionally, you need the following:

  • Version control software: This book uses Subversion and Git as examples, but there are many other fine version control systems available

  • Issue tracking software: This book discusses Jira from Atlassian, but many other options are available

  • A scripting tool: This book uses and recommends Apache Ant

Who this book is for

Whether you are a J2EE developer looking for a more productive way to build a modern web application or you are an experienced Oracle developer who wants to start using Oracle's next-generation tools, this book will guide you to a successful enterprise application. With basic knowledge of Java, JDeveloper, and databases, you can easily follow 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, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows:

For example, the AllTasksVO view object becomes the view object instance, AllTasksVO1.

A block of code is set as follows:

(:pResponsible is null or PERS_ID = :pResponsible)
and (:pProgramme is null or PROG_ID = :pProgramme)
and (:pText is null or upper(TEXT) like '%'|| upper(:pText) || '%')

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:

When you are done entering the WHERE clause, click on the Test and Explain button to verify that your SQL is valid.

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 , and mention the book title via 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 at 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.

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/submit-errata, 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 copyrighted 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 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 if you are having a problem with any aspect of the book, and we will do our best to address it.