|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Feature Weblogic Workshop Java Controls and Extensibility Architecture
Weblogic Workshop Java Controls and Extensibility Architecture
By: Dave Cotter
Sep. 10, 2003 12:00 AM
One of the most exciting aspects of BEA WebLogic Workshop 8.1 is the ability for developers and ISVs to extend the Workshop development environment by developing custom Java Controls, IDE Extensions, application templates, or TagLibrary extensions. In this article we start with a brief overview of WebLogic Workshop 8.1 and then take a high-level tour of these extensibility points. This article has been assembled from several sources on the Workshop product team. Workshop extensions development kits are available at http://dev2dev.bea.com/products/wlworkshop81/ WebLogic Workshop 8.1 Overview WebLogic Workshop is both an IDE and a runtime framework. Its visual development environment and programming model is based on intuitive concepts such as drag-and-drop controls, methods, and properties to enable event-based development, eliminating the need for developers to master complex J2EE APIs and object-oriented programming disciplines. The IDE produces standard Java files with additional annotations to specify the appropriate runtime application behavior. These annotations enable the Workshop runtime framework to automatically generate the J2EE infrastructure components, thereby abstracting the user from the low-level infrastructure plumbing that would otherwise be required. The visual development environment produces standard Java files with additional annotations inserted by Workshop (for example, when the developer sets properties or adds controls) to specify the appropriate runtime application behavior. These annotations enable the Workshop runtime framework to automatically generate the J2EE infrastructure components, thereby abstracting the user from the low-level infrastructure plumbing that would otherwise be required. Applications - whether they are Web services, Web applications, portals, or workflows - share a common process of assembling and wiring together components that encapsulate business logic or resources with additional code, workflow logic, personalization information, and so on. Application assembly and component reuse are key constructs within WebLogic Workshop. WebLogic Workshop Extensibility Points With this as the backdrop, let's look at these extensibility points in more detail. WebLogic Workshop 8.1 Java Controls Creating Java Controls Workshop also helps guide the Control user through the tasks of configuring the Control's behavior and appearance within an application. Control authors can provide either a simple Swing-based JPanel wizard or a multistep wizard presenting a set of configuration choices in terms the user understands. Java Controls expose a set of simple properties by which a user can implement advanced runtime functionality such as asynchronous communication, security roles, life-cycle events, transaction support, and so on. Authors of custom controls have the freedom to populate the Properties sheet for the benefit of the controls' users. Packaging and Distributing Java Controls Application and Project Templates Templates are stored in the weblogic81\workshop\templates directory and are packaged as zip files. A template can be made up of Java Controls, EJBs, JSPs, images, and/or any other file. They are loaded into an IDE based on an XML template definition file. Template zip files are read the first time the New Application, New Project, Add Project, or Install menu is opened. Project Templates Application Templates Listing 1 is an example of the template definition file associated with creating Web applications. WebLogic Workshop 8.1 IDE Extensions A Workshop extension is composed of the following artifacts, packaged together as a JAR or directory. WebLogic Workshop itself is the culmination of several extensions pulled together into one common interface. wlw-ide.JAR is the main Workshop executable, containing the core class files, utility classes, and the mechanism to load extensions, but the interesting code to run the IDE is contained in the required Workshop extensions. WebLogic Workshop defines two types of extensions: required and optional. Required Workshop extensions are: Optional extensions include To cause Workshop to load a specific extension at startup, the extension's JAR file is placed in the extensions' subdirectory below the directory containing the wlw-ide.JAR file that contains the IDE core. An extension may also be fully exploded to directories and class files in the "extensions" subdirectory. Creating Workshop Extensions The % signs in "%sqlEditor.extension.actionSQLAttributeEditor%" are a means of referring to a localizable string resource and that it's optional. This extension places a new button on the toolbar with database.gif as its icon. When the new toolbar button is pressed, the SQLAttributeEditor is displayed. For more complex extensions, the JAR file would contain the Java code that is the extension's implementation, a manifest file that defines the class path, and attributes that reference dependent JARs that need to be available at runtime by the extension. At startup, the core IDE runtime reads all the extension.xml files, batches them together and ensures that the requested services by each extension are available. Extensions may define handlers for the <extension-xml> tag found in the extension.xml file. Handlers are associated with a particular id attribute. All extension.xml files are scanned for fragments contained within the <extension-xml> tag and those fragments are passed to handlers defined for the particular id attribute. This mechanism allows extensions to create extendable infrastructure in which other extensions can participate. The handler class is instantiated by the core IDE and is completely responsible for parsing the xml contained in the fragment. Services Custom Tag Library Extensions To build custom tag libraries for WebLogic Workshop, developers supply a tld/tldx pair, a tag handler JAR, and a tldx handler JAR (currently the tldx JAR must live in the workshop/extensions directory). Associated Help documents may be placed in WebLogic Workshop's Help directory. Conclusion Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||