ABOUT THE DEMO: This is a demonstration of the Framework for Package API-Based ADF Business Components, by Avrom Roy-Faderman and Quovera, Inc. You cannot run this application without downloading the framework JAR file. The JAR file, as well as other collateral material, is available for download at http://www.avromroyfaderman.com/framework-for-package-api-based-adf-business-components/. SETTING UP THE DEMO TO RUN ON YOUR COMPUTER: 1. Open the demo application in JDeveloper. 2. In the Application Resources section of the Navigator, expand the Connections\Database node. 3. Right-click the HR connection, select Properties, and edit the connection to match information for your database and HR common schema. 4. In the Projects section of the Navigator, expand the Database\Application Sources node. 5. Right-click the empsPkg.sql file and select "Run in SQL*Plus > HR" to run the sql file in your database. NOTE: This creates a package, EMPLOYEES_PKG, that provides a package API for the EMPLOYEES table. If you want to remove the package later, you can do so by running removeEmpsPkg.sql. 6. Double-click the Model project to open the Project Properties dialog. 7. Select the Libraries and Classpath node. 8. Select the Package-api-framework library and click Edit. 9. Select the entries under Class Path, Source Path, and Doc Path, and delete them. 10. Select the Class Path node and click Add Entry. 11. Browse to the framework JAR file you dowloaded, select it, and click Select. 12. You can optionally set the Source and/or Doc Paths, if you downloaded the framework source code and/or Javadoc. 13. Click OK, and then OK again to close the Project Properties dialog. 14. Right-click the Model project and select Rebuild Model.jpr (this is important, as the download does not include compiled classes). 15. Right-click the ViewController project and select Rebuild ViewController.jpr. RUNNING THE DEMO: 1. Ensure you have followed all steps in SETTING UP THE DEMO TO RUN ON YOUR COMPUTER. The application will not run if not set up properly. 2. In the Projects section of the Navigator, expand the ViewController\Web Content node. 3. Right-click the view.jspx file and select Run. 4. When the application opens, browse through the Jobs provided to see the employees with those jobs. 5. Try the following: - Changing an employee's name; note that first and last names are not separated (the package handles conversion back and forth between separate first/last names and full name). - Changing an employee's department to a department that actually exists. - Changing an employee's department to a department that doesn't exist. - Creating new employees - Deleting old employees - Saving changes to the database to see how the update operations are completed. - If you're set up to do so, try running multiple sessions of the application to test locking. The demo uses the default locking mode, pessimistic, which is not good for a production application, but you can change the locking mode to optimistic and check it that way too. WHAT'S SPECIAL ABOUT ALL THIS? - This application (check the business components to be sure) never interacts with the Employees table except using the package API - The application contains no Java code (you can search under the application directory for *.java to verify this). - The application lets you read and write using the package API just as you would read from query results and write to tables. - The application lets you use a master view object instance to limit the rowsets of the instance of the package API-based view object. - The application can even lock rows and check consistency (although the package API needs to provide functionality that supports this).