Advanced Programming for the Java(TM) 2 Platform
Total Page:16
File Type:pdf, Size:1020Kb
Advanced Programming for the Java(TM) 2 Platform Training Index Advanced Programming for the JavaTM 2 Platform By Calvin Austin and Monica Pawlan November 1999 [CONTENTS] [NEXT>>] [DOWNLOAD] Requires login As an experienced developer on the JavaTM platform, you undoubtedly know how fast moving and comprehensive the Early Access platform is. Its many application programming interfaces (APIs) Downloads provide a wealth of functionality for all aspects of application and system-level programming. Real-world developers never use one Bug Database or two APIs to solve a problem, but bring together key Submit a Bug functionality spanning a number of APIs. Knowing which APIs you View Database need, which parts of which APIs you need, and how the APIs work together to create the best solution can be a daunting task. Newsletters Back Issues To help you navigate the Java APIs and fast-track your project Subscribe development time, this book includes the design, development, test, and deployment phases for an enterprise-worthy auction Learning Centers application. While the example application does not cover every Articles possible programming scenario, it explores many common Bookshelf situations and the discussions leave you with a solid methodology Code Samples for designing and building your own solutions. New to Java Question of the Week This book is for developers with more than a beginning level of Quizzes understanding of writing programs in the Java programming Tech Tips language. The example application is written with the Java® 2 Tutorials platform APIs and explained in terms of functional hows and whys, so if you need help installing the Java platform, setting up your Forums environment, or getting your first application to work, you should first read a more introductory book such as Essentials of the Java Programming Language: A Hands-On Guide or The Java Tutorial. http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/ (1 of 4) [2001-6-13 8:07:37] Advanced Programming for the Java(TM) 2 Platform Technology Centers Note: This tutorial is available as a book from online book sellers Also, send your comments and thoughts to [email protected] Contents Chapter 1: Matching Project Requirements with Technology ● Project Requirements ● Choosing the Software Chapter 2: Auction House Application ● A Multi-Tiered Application with Enterprise Beans ● Entity and Session Beans ● Examining a Container-Managed Bean ● Container-Managed finder Methods Chapter 3: Data and Transaction Management ● Bean-Managed Persistence and the JDBCTM Platform ● Managing Transactions ● Bean-Managed finder Methods Chapter 4: Distributed Computing ● Lookup Services ● Remote Method Invocation (RMI) ● Common Object Request Broker Architecture (CORBA) ● JDBCTM Technology ● Servlets Chapter 5: Java Native Interface (JNI) Technology ● JNI Example ● Strings and Arrays http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/ (2 of 4) [2001-6-13 8:07:37] Advanced Programming for the Java(TM) 2 Platform ● Other Programming Issues Chapter 6. Project Swing: Building a User Interface ● Components and Data Models ● Printing API ● Advanced Printing Chapter 7: Debugging Applets, Applications, and Servlets ● Collecting Evidence ● Running Tests and Analyzing ● Servlet Debugging ● AWT Event Debugging ● Analyzing Stack Traces ● Version Issues Chapter 8: Performance Techniques ● Improving Performance by Design ● Connection Pooling ● Performance Features and Tools ● Performance Analysis ● Caching Client/Server Applications Chapter 9: Deploying the Auction Application ● Java Archive File Format ● SolarisTM Platform ● Win32 Platform Chapter 10: More Security Topics ● Signed Applets ● Writing a Security Manager Appendix A: Security and Permissions Appendix B: Classes, Methods, and Permissions Appendix C: SecurityManager Methods Epilogue Acknowledgements http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/ (3 of 4) [2001-6-13 8:07:37] Advanced Programming for the Java(TM) 2 Platform Special thanks to experts Isaac Elias, Daniel Liu, and Mark Horwath for their contributions to the advanced examples in the book. Reader Feedback Tell us what you think of this book. [TOP] [ This page was updated: 4-Jun-2001 ] Products & APIs | Developer Connection | Docs & Training | Online Support Community Discussion | Industry News | Solutions Marketplace | Case Studies Glossary | Feedback | A-Z Index For more information on Java technology and other software from Sun Microsystems, call: (800) 786-7638 Copyright © 1995-2001 Sun Microsystems, Inc. Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first. All Rights Reserved. Terms of Use. Privacy Policy. http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/ (4 of 4) [2001-6-13 8:07:37] Writing Advanced Applications, Chapter 1: Matching Project Requirements with Technology Training Index Writing Advanced Applications Chapter 1: Matching Project Requirements with Technology [<<BACK] [CONTENTS] [NEXT>>] One challenge in writing a book on advanced application development for the JavaTM platform is to find a project small enough to write about, while at the same time, complex enough to warrant advanced programming techniques. Requires login The project presented in this book is a web-based auction house. The application is initially written for the Enterprise JavaBeansTM Early Access platform. Later chapters expand the core example described here Downloads by adding advanced functionality, improvements, and alternative solutions to do some of the things you get for free when you use Bug Database the Enterprise JavaBeans platform. Submit a Bug View Database To keep the discussion simple, the example application has only a basic set of transactions for posting and bidding on auction items. Newsletters However, the application scales to handle multiple users, provides Back Issues a three-tiered transaction-based environment, controls security, Subscribe and integrates legacy-based systems. This chapter covers how to determine project requirements and model the Learning Centers application—important steps that should always come before Articles coding begins. Bookshelf Code Samples ● Project Requirements and Modeling New to Java ● Choosing the Software Question of the Week Quizzes Tech Tips In a Rush? Tutorials This table links you directly to specific topics. Forums Topic Section Auction Demonstration Duke's Auction http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/proj.html (1 of 2) [2001-6-13 8:07:50] Writing Advanced Applications, Chapter 1: Matching Project Requirements with Technology Technology Centers Project Requirements Interview User Base Model the Project Modeling House Identifies Buyers and Sellers House Determines Highest Bidder House Notifies Buyers and Sellers Anyone Searches for an Item Anyone Views Items for Sale Anyone Views Item Details Seller Posts Items for Sale Buyer Bids on Items Activity Diagram Choosing Software JavaTM APIs [TOP] [ This page was updated: 4-Jun-2001 ] Products & APIs | Developer Connection | Docs & Training | Online Support Community Discussion | Industry News | Solutions Marketplace | Case Studies Glossary | Feedback | A-Z Index For more information on Java technology and other software from Sun Microsystems, call: (800) 786-7638 Copyright © 1995-2001 Sun Microsystems, Inc. Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first. All Rights Reserved. Terms of Use. Privacy Policy. http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/proj.html (2 of 2) [2001-6-13 8:07:50] Writing Advanced Applications, Chapter 1: Project Requirements and Modeling Training Index Writing Advanced Applications Chapter 1 Continued: Project Requirements and Modeling [<<BACK] [CONTENTS] [NEXT>>] The first step in determining project requirements is to interview the user base to find out what they want in an online auction. This is an important step, and one that cannot be overrated because a solid base of user-oriented information helps you define your key application capabilities. Requires login Chapter 2 walks through the application code, explains how the Early Access Enterprise JavaBeans platform works, and tells you how to run a Downloads live demonstration. If you have never seen or used an online auction, here are mockups of the example auction application HTML Bug Database pages. Submit a Bug View Database ● Interview User Base ● Model the Project Newsletters Back Issues Subscribe Interview User Base Learning Centers For the sake of discussion and to keep things simple, this Articles discussion assumes interviews with the user base found auction Bookshelf house and user requirements, as follows: Code Samples New to Java Auction House Requirements Question of the Week Quizzes ● Require buyer and seller information Tech Tips ● Bill sellers for posting items Tutorials ● Record and report the day's transactions User Requirements Forums ● Bid on or sell an item ● Search or view items for sale ● Notify buyer and seller of sale Model the Project http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/proj2.html (1 of 6) [2001-6-13 8:08:07] Writing Advanced Applications, Chapter 1: Project Requirements and Modeling Technology Centers After analyzing the requirements, you can build a use case diagram for the application to gain a better understanding of the elements needed in the application and how they interact. A use case diagram shows the relationships