Developing Java Beans

Robert Englander

  • 出版商: O'Reilly
  • 出版日期: 1997-07-08
  • 售價: $1,250
  • 貴賓價: 9.5$1,188
  • 語言: 英文
  • 頁數: 320
  • 裝訂: Paperback
  • ISBN: 1565922891
  • ISBN-13: 9781565922891
  • 相關分類: Java 程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Java Beans is the most important new development in Java this year. Beans is the next generation of Java technology that not only adds features the language lacked, but also lets Java programs interoperate with a number of development environments. The initial release includes a bridge for Microsoft's ActiveX/COM; future releases will include bridges for Netscape's LiveConnect and IBM's OpenDoc.

Since it's a "component architecture" for Java, Beans can be used in graphical programming environments, like Borland's JBuilder, or IBM's VisualAge for Java. This means that someone can use a graphical tool to connect a lot of Beans together and make an application, without actually writing any Java code -- in fact, without doing any programming at all. Graphical development environments let you configure components by specifying aspects of their visual appearance (like the color or label of a button) in addition to the interactions between components (what happens when you click on a button or select a menu item).

One important aspect of Java Beans is that components don't have to be visible. This sounds like a minor distinction, but it's very important: the invisible parts of an application are the parts that do the work. So, for example, in addition to manipulating graphical widgets, like checkboxes and menus, Beans allows you to develop and manipulate components that do database access, perform computations, and so on. You can build entire applications by connecting pre-built components, without writing any code.

Developing Java Beans is for people who need to stay up-to-date with the latest developments in programming technology. Minimally, developing Beans means adopting several simple design patterns in your code. However, that's only the beginning. To take full advantage of the Java Beans architecture, you should understand how to write classes that are serializable, use events for communication between classes, know when and how to provide BeanInfo classes that give graphical environments more information about your components, and provide property editors and customizers that let graphical tools work with more complex Beans.

The book covers:
  • Events, event listeners, and adapters

  • Properties, indexed properties, bound properties, constrained properties, and vetoable property changes

  • Persistence, serialization, versioning, and object validation

  • Packaging Beans using JAR files

  • The BeanBox, a prototypical development tool

  • Reflection and introspection

  • Property editors and customizers

  • The ActiveX bridge; using Java Beans in Visual Basic programs

商品描述(中文翻譯)

Java Beans 是今年 Java 最重要的新發展。Beans 是 Java 技術的下一代,不僅增加了語言所缺乏的功能,還使 Java 程式能夠與多個開發環境互操作。初始版本包括一個用於微軟 ActiveX/COM 的橋接;未來的版本將包括用於 Netscape 的 LiveConnect 和 IBM 的 OpenDoc 的橋接。

由於它是 Java 的「元件架構」,Beans 可以在圖形編程環境中使用,例如 Borland 的 JBuilder 或 IBM 的 VisualAge for Java。這意味著使用者可以利用圖形工具將許多 Beans 連接在一起,並製作應用程式,而無需實際編寫任何 Java 代碼——事實上,甚至不需要進行任何編程。圖形開發環境允許您通過指定元件的視覺外觀(例如按鈕的顏色或標籤)以及元件之間的互動(例如點擊按鈕或選擇菜單項目時發生的事情)來配置元件。

Java Beans 的一個重要方面是元件不必是可見的。這聽起來像是一個小的區別,但這非常重要:應用程式的不可見部分才是執行工作的部分。因此,例如,除了操作圖形小部件(如複選框和菜單)之外,Beans 允許您開發和操作執行資料庫訪問、進行計算等的元件。您可以通過連接預先構建的元件來構建整個應用程式,而無需編寫任何代碼。

《開發 Java Beans》是為那些需要跟上最新編程技術發展的人準備的。最基本的,開發 Beans 意味著在您的代碼中採用幾個簡單的設計模式。然而,這僅僅是開始。要充分利用 Java Beans 架構,您應該了解如何編寫可序列化的類,使用事件進行類之間的通信,知道何時以及如何提供 BeanInfo 類,以便為圖形環境提供有關您的元件的更多信息,並提供屬性編輯器和自定義工具,以便圖形工具能夠處理更複雜的 Beans。

本書涵蓋的內容包括:
- 事件、事件監聽器和適配器
- 屬性、索引屬性、綁定屬性、約束屬性和可否決的屬性變更
- 持久性、序列化、版本控制和物件驗證
- 使用 JAR 檔案打包 Beans
- BeanBox,一個原型開發工具
- 反射和自省
- 屬性編輯器和自定義工具
- ActiveX 橋接;在 Visual Basic 程式中使用 Java Beans