Product Tour - DerbyTax DemoThe DerbyTax application demonstrates how Java DB can be used to persist data locally from a tax return, using a browser-based client that can be accessed either online or offline. The persistence is done by Java DB running embedded in a web browser. ContactContact Francois Orsini for more information and check his blog for updates and discussion. Get StartedDownload EmbeddedDerbyDemo.zip now! IntroductionIn this demo, as the user enters or modifies data in a field, it is automatically saved locally in the Java DB database, making the application's Save button a useless widget. The cost of accessing the database is very low, so we can afford to save the data as it is being updated. If the system or application crashes, there is no data loss or corruption because Java DB meets the ACID (Atomic, Consistent, Isolation, Durable) properties of a relational database system. Data will be retrieved automatically the next time the application is run. Several technologies are used in the demo. The client interface is pure dynamic HTML to render the forms. JavaScript is used to navigate and validate forms' content but more importantly to interact with Java DB running embedded locally. LiveConnect, a technology developed by Netscape and found in most browsers, is used to invoke the ClientStoreService from JavaScript. This Java class, instantiated in a tiny (10k) hidden Java applet, is used to communicate with Java DB. The demo installs automatically as a Java Extension using Sun's Java Plug-in. Alternatively, you may download a zip archive, which includes the source files, and install it locally. Other deployment options include Java Web Start, an installer, or a browser extension (with a dependency on the Java runtime environment browser plug-in). With either Sun's Java Plug-in or Java Web Start deployment the Java DB downloadable footprint can be reduced considerably using Pack200 Java 5 compression. For more information, see Compressing Apache Derby w/ Pack200. As written, the demo runs only on Mozilla Firefox. Multiple browser support is possible with some simple modifications to the HTML and JavaScript code. If an application requires greater data security, Java DB's data encryption can be used. Ajax (Asynchronous JavaScript and XML) can be used in place of JavaScript with LiveConnect to persist the data asynchronously, but this increases both the start-up time and footprint of the application, as it requires a local embedded web server. RequirementsThese are the software requirements to run the demo:
NOTE: This demo has been tested on Solaris, Linux (Fedora) and Microsoft Windows operating systems. Manually Install the DemoWhen you manually install the demo, you get the source files. See What is included? for a listing of included files.
Auto-install the DemoThis is the way a user would typically deploy an application offered as a web service. The first time you access the DerbyTax demo from the web server, the start page opens in your browser and the signed derby.jar is downloaded and archived locally by the browser with a particular version number. With subsequent invocations, the required jar file is not downloaded again unless the version has changed, providing a much faster response time. Running online is the same as running in disconnected mode, except the web application files are downloaded from the server and JAR versioning verification is done against the local archived JARs. If you see a Warning - Security pop-up window upon loading the demo, please grant trust to the demo application by clicking on the Yes button. Because derby.jar was signed with a test certificate for this demo, it cannot be fully trusted by the web browser. For more information, see the Security and How to Deploy RSA-Signed Applets in Java Plug-in sections in the Java Deployment Guide. Using the Demo ApplicationLaunch the demo by loading the index page in your browser, online at http://developers.sun.com/javadb/demo/index.html or, if you manually installed the demo, at the path where you installed it. It is useful to view the database interactions in the Java console as you run the application. To open it, use the Java entry in the Windows Control Panel or the Tools->Java Console menu item in Firefox. On the login screen, you can enter any username and password, then click Continue Return to use the pre-populated data for the demo. Alternatively, you can create a new return by clicking the Create Return button, which overwrites the current pre-populated tax return. You can then enter new data or update the fields on the application pages. Click Next to move to the next page or Back to revisit a previous page. As you update fields on Filing Status, Personal Info and W2 Info pages, check the Java console. You can see how fast the Java DB store interaction is and view the XML returned from the client store service. You can verify that the demo is working by closing Firefox after updating some fields in Personal Info or W2 forms. The newly entered data will be there when you restart the demo. If you installed the demo manually and encounter a Security Permission error, it is likely that the derby.jar archive has not been copied correctly under the /lib/ext directory of the JRE used by Firefox. What is Included?After manually installing the demo, the following files and directories will be in the derby/demo/ directory:
After running the demo, there will be some new files and directories under the Firefox home directory:
|
RelatedApache Derby ProjectTools That Support Java DBProducts That Use Java DBTechnology Inside Java DB |
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||