|
JAVABEANS DEVELOPER'S RESOURCE |
| Table of Contents | |||
|---|---|---|---|
| Acknowledgments | xvii | ||
| Introduction | xix | ||
| What You'll Need | xix | ||
| How to Read This Book | xx | ||
| Parts Is Parts | xx | ||
| Appendixes | xxi | ||
| CD-ROM | xxi | ||
| Conventions | xxi | ||
| Code | xxii | ||
| Sidebars | xxiii | ||
| Closing Thoughts | xxiii | ||
| Part One: Introduction to Java and Components | 1 | ||
| Chapter 1 | Advanced Java | 3 | |
| Basic Java | 3 | ||
| Object-Oriented Design Using Java | 4 | ||
| Applying Good Object-Oriented Design Skills | 10 | ||
| OOP Strong, Efficient, and Effective | 13 | ||
| Introduction to Threading in Java | 13 | ||
| What are Threads: Threading in Java | 15 | ||
| Thread Summary | 23 | ||
| Object Serialization | 23 | ||
| What is Serialization? | 23 | ||
| Handling Object Relationships | 24 | ||
| The Output Streams | 25 | ||
| Handling Object Webs | 25 | ||
| Reading Objects | 26 | ||
| Security and Fingerprinting | 27 | ||
| Serialization Overview | 27 | ||
| The Java Event Model | 28 | ||
| The Old Model | 28 | ||
| Delegation | 29 | ||
| Reflection | 31 | ||
| Reflection Objects | 33 | ||
| Using Reflection | 51 | ||
| Chapter 2 | Component Models | 53 | |
| Component Models | 54 | ||
| What are Components? | 54 | ||
| Component Customization | 55 | ||
| Components Versus Object-Oriented Programming | 58 | ||
| Modularity in Components | 59 | ||
| Hiding Information in Components | 59 | ||
| Smart Methods in Components | 60 | ||
| Design Patterns | 61 | ||
| Design Patterns in Beans | 61 | ||
| Circumventing Design Patterns | 61 | ||
| Beans as Components | 62 | ||
| Components Using Beans | 62 | ||
| Special Beans Objects | 62 | ||
| Java and Components | 63 | ||
| Why Beans? | 63 | ||
| Introduction to the Rainbow Button | 66 | ||
| A Button for All Seasons | 67 | ||
| Individual Components | 67 | ||
| Properties | 68 | ||
| Events | 69 | ||
| Graphical Representation | 70 | ||
| Beans Containers | 71 | ||
| Listeners | 71 | ||
| Bean Hierarchy | 72 | ||
| User Interfaces | 72 | ||
| Part Two: Core Beans Technology | 74 | ||
| Chapter 3 | Bean Events | 77 | |
| The JavaBeans Event Model | 78 | ||
| Publish and Subscribe System | 78 | ||
| Event Characteristics | 78 | ||
| Bean Hierarchy | 80 | ||
| Custom Events | 82 | ||
| Event Listeners | 82 | ||
| Creating an Event Listener | 83 | ||
| Design Patterns for Events | 83 | ||
| Implementing the Listener | 84 | ||
| Adding Listeners to Beans | 85 | ||
| Creating the Bean | 85 | ||
| Registering a Unicast Listener | 88 | ||
| Listener and Event Deadlocks | 89 | ||
| Attaching Listeners to a Bean | 91 | ||
| Firing Events | 91 | ||
| Listener Registration in a Nutshell | 93 | ||
| Event Adapters | 94 | ||
| Firing Events | 94 | ||
| Creating an Adapter | 96 | ||
| Complicated Adapters | 99 | ||
| Rainbow Button Events | 101 | ||
| Creating Events | 101 | ||
| Implementing the Picture Area | 106 | ||
| Sounds From Afar | 107 | ||
| Chapter 4 | Bean Properties | 111 | |
| When to Use Properties | 112 | ||
| What is a Property? | 112 | ||
| Why are Properties Important? | 112 | ||
| Design Patterns | 113 | ||
| Accessors | 114 | ||
| Mutator | 115 | ||
| Arrays and Indexed Properties | 117 | ||
| Boolean Properties | 120 | ||
| Producers of Information | 121 | ||
| Consumers of Information | 129 | ||
| Constrained Properties | 131 | ||
| Customization | 137 | ||
| Property Sheets | 137 | ||
| Property Editors | 138 | ||
| Customizers | 142 | ||
| Properties in the Rainbow Button | 146 | ||
| Button Properties | 146 | ||
| Picture Properties | 150 | ||
| Sound Properties | 151 | ||
| Creating a Wizard for the Rainbow Button | 151 | ||
| Chapter 5 | Bean Introspection | 155 | |
| What is Introspection? | 156 | ||
| Introspection and Java | 156 | ||
| Handling Your Own Introspection | 156 | ||
| Design Patterns for Properties | 156 | ||
| Design Patterns for Events | 157 | ||
| Beans and Introspection APIs | 158 | ||
| Bean Descriptors | 158 | ||
| Bean Information | 159 | ||
| Simple Bean Information | 163 | ||
| Feature Descriptors | 164 | ||
| Event Set Descriptors | 167 | ||
| Property Descriptors | 170 | ||
| Method Descriptors | 176 | ||
| Parameter Descriptors | 177 | ||
| Introspectors | 177 | ||
| Introspecting Another Bean | 180 | ||
| Creating a Bean | 180 | ||
| Creating the Bean Information | 180 | ||
| Rainbow Button Introspection | 185 | ||
| Using the Bean Information Object | 186 | ||
| Using Reflection Instead | 187 | ||
| Chapter 6 | Persistence and Packaging | 189 | |
| Serialization and Beans | 190 | ||
| Setting Up a Bean for Persistence | 190 | ||
| Invoking a Serialization Algorithm | 192 | ||
| Saving Serialization Files | 194 | ||
| How the Java Sandbox Affects Serialization | 194 | ||
| Deserialization and Beans | 195 | ||
| Opening the Serialization File | 195 | ||
| Setting Up a Bean for Restoration | 195 | ||
| Recovering a State | 196 | ||
| Using Another Form of Persistence | 197 | ||
| Introduction to JDBC | 197 | ||
| Database Drivers | 198 | ||
| Setting up a Bean for JDBC | 200 | ||
| Setting up JDBC | 200 | ||
| Invoking persistence with JDBC | 201 | ||
| Restoring a Saved State from JDBC | 204 | ||
| Packaging the Button | 205 | ||
| Packaging as a Standard | 205 | ||
| JAR File Format | 206 | ||
| Manifest Files | 208 | ||
| Adding Security to the JAR | 209 | ||
| Packaging a Serialized State | 216 | ||
| Part Three: Advanced Beans | 218 | ||
| Chapter 7 | GUI Builders | 221 | |
| Loading a Bean | 222 | ||
| Locating and Loading a JAR File | 223 | ||
| Examining the Property Sheet | 223 | ||
| Editing a Property | 224 | ||
| Following a Customizer | 226 | ||
| Packaging the Bean | 226 | ||
| Creating a Bean Application | 227 | ||
| Selecting the Source | 227 | ||
| Following the Interaction Wizard | 227 | ||
| Testing the Interaction | 229 | ||
| Interactions and Events | 230 | ||
| Saving a Bean | 232 | ||
| Other GUI Builders | 232 | ||
| Chapter 8 | Bean GUI Issues | 235 | |
| GUI Merging | 236 | ||
| What is GUI Merging? | 236 | ||
| Setting up GUI Merging Within a Bean | 237 | ||
| Using GUI Merging | 238 | ||
| Visibility | 248 | ||
| The Visibility Interface | 248 | ||
| Using the Visibility Interface | 248 | ||
| Using the Visibility Interface | 249 | ||
| Chapter 9 | Bean Integration | 253 | |
| ActiveX Primer | 254 | ||
| History of ActiveX | 254 | ||
| Building a Control | 255 | ||
| Using a Control | 256 | ||
| ActiveX and Security | 257 | ||
| Building an ActiveX Bean | 259 | ||
| How the Bridge Works | 259 | ||
| Converting a Bean to a Control | 259 | ||
| Issues with Converting | 263 | ||
| Using the Bean Control in an ActiveX Container | 266 | ||
| JavaScripting a Bean | 269 | ||
| What is Javascript? | 269 | ||
| Hooking Beans Together with JavaScript | 276 | ||
| Chapter 10 | Bean Networking | 279 | |
| Firing CORBA Events | 280 | ||
| What is CORBA? | 280 | ||
| Creating a CORBA Client | 289 | ||
| Creating a CORBA Server | 292 | ||
| Talking to RMI Servers | 296 | ||
| What is RMI? | 296 | ||
| Creating an RMI Client | 303 | ||
| Creating an RMI Server | 305 | ||
| Issues for Networked Beans | 307 | ||
| Networked Beans Architecture | 308 | ||
| Firing Networked Events | 309 | ||
| Part Four: Cool Beans | 312 | ||
| Chapter 11 | Beans in the Real World | 315 | |
| Using Beans | 316 | ||
| A Bean Warehouse | 316 | ||
| Enterprise Beans | 316 | ||
| Bean Applications | 317 | ||
| Making Money | 317 | ||
| Licensing and Ownership | 318 | ||
| A Business Model for Components | 322 | ||
| Appendix A | Quick Start Guide | 327 | |
| Expert Developers | 327 | ||
| Beginning Developers | 328 | ||
| Additional Resources | 330 | ||
| Publications | 331 | ||
| Web Sites | 331 | ||
| Newsgroups 3 | 332 | ||
| Appendix B | The BeanBox | 333 | |
| Starting the BeanBox | 334 | ||
| Using the BeanBox | 334 | ||
| BeanBox Contents | 335 | ||
| Loading a Bean | |||
| Connecting Beans | 337 | ||
| Adding Your Own JAR Files | 339 | ||
| Appendix C | CD-ROM | 341 | |
| Web Page | 341 | ||
| Samples | 342 | ||
| Developers Kits | 343 | ||
| Software | 343 | ||
| Index | 347 | ||

| © Prentice-Hall, Inc. A Simon & Schuster Company Upper Saddle River, New Jersey 07458 |