************************************* * * * DB/C Newsletter * * September 1998 * * * ************************************* News and Comments DB/C JX Release 2 will begin beta testing in the month of October. There are many new features in DB/C JX 2. Two important new features are the source debugger and GUI programming support. Support for JavaBeans is included in the GUI programming support of DB/C JX 2. It is important to understand some fundamental concepts about JavaBeans to be able to use them successfully. Unfortunately, all of the books about JavaBeans are heavy with details of the Java programming language. So this month's article provides an introduction to JavaBeans for DB/C programmers - knowledge about programming in Java is not required. This introduction to JavaBeans provides a foundation for the October DB/C newsletter in which we will provide a complete description of how to use JavaBeans in DB/C JX programs. We are also hard at work on the third member of the new DB/C family - DB/C DX Release 10. DB/C DX is the new name for traditional DB/C. Release 10 of DB/C DX is an upgrade of DB/C 9.1. DB/C DX 10 will be available only for Windows 95/98/NT and for the various UNIXes. Support for all other operating systems will be provided by DB/C JX. The primary new feature of DB/C DX 10 will be support for accessing files through DB/C FS. If you plan on using this feature of DB/C DX and would like to help in beta testing of DB/C DX, please contact me. We expect to begin beta testing DB/C DX 10 about December 1st. don.wills@swc.com ***************************************************************************** JavaBeans Essentials JavaBeans are one of the most important features of the Java programming environment. They provide the means for adding sophisticated capabilities to Java-based programs. One reason that JavaBeans are important is because they are reusable. Reusability has been a primary selling point of object oriented programming. The reality is that not much code reuse has actually happened. Code reuse is real when you use JavaBeans. JavaBeans are Java classes just like all other Java classes. What makes JavaBeans different is that they follow the well-defined JavaBeans patterns in their interfaces with other programs. Another special feature of JavaBeans is that they provide a means for finding out details about themselves - at both design time and run time. This feature is called introspection. Typically, JavaBeans are purchased from third party software vendors. Java source code for JavaBeans may or may not be available. Because of the JavaBeans design patterns and introspection, the lack of source code is not a hindrance to using JavaBeans. JavaBeans are typically thought of as complicated visual elements in GUI programs. This is a primary use for JavaBeans. But JavaBeans do not need to have any GUI connection. Some JavaBeans use only the console text interface. Other JavaBeans have no user interface at all. These JavaBeans are typically middleware that provide processing functions that interface with databases. Some JavaBeans can even adapt to their environment - if they are running in a GUI environment, they have a show a GUI face; if they are running in a console environment, they show text; and if they aren't connected with a user interface, they run in the background. JavaBeans have these three primary attributes: 1. JavaBeans classes are instantiated like other Java classes. 1. JavaBeans instances contain named properties that have values. 2. JavaBeans instances provide messages to listeners when events occur. JavaBeans allow other programs to query and change the values of their properties. Some properties are read-only (query only) and other properties are write-only (change only). Most properties are read-write. The values of JavaBeans properties are Java primitives or Java objects. Numeric primitives include byte, integer, float and double values. The boolean type is another Java primitive type (values are true and false). Non-primitive JavaBeans property values include Strings (text strings) and all other types of Java objects. Arrays are also Java objects, but are not typically used as JavaBeans properties. Instead, JavaBeans properties themselves come in two flavors: single valued and indexed. Indexed properties are essentially arrays of single values that are referenced by a zero based index. Instances of JavaBeans provide messages to any program that registers as a "Listener" for a specific type of message. Typical messages provided by GUI JavaBeans have names like "MouseEvent", "KeyEvent" and "FocusEvent". Relevant values are contained within the messages sent to a Listener. For example, a MouseEvent will contain information about the X and Y coordinate of the mouse, the button that is pressed, the status of the Ctrl and Shift keys, and more. That's it! Although there are many details, the JavaBeans are essentially objects that have properties and provide messages to listeners. ***************************************************************************** DB/C Class Schedule Class: DB/C DX and JX Language Fundamentals Date: October 5, 6 and 7 1998 Location: Oak Brook, Illinois For information, contact Judi Tamkevic at: voice 630.572.0240 email dbc@swc.com ***************************************************************************** Subscribing to the DB/C Newsletter If you don't already have the DB/C Newsletter delivered to your email address and would like to have it emailed to you when it is produced, just send an email message to 'request@swc.com' and put the line 'subscribe dbcnews' in the body of the email message (omit the ' characters). The newsletter will be delivered to the email address from which the message was sent. To stop delivery, put the line 'unsubscribe dbcnews' in the body of the message.