|
|
BEA WebLogic Workshop 8.1: An Overview JSP Editing and DatabindingEasily building dynamic Web applications involves more than just stringing pages together with business logic, however. It's important to be able to easily construct the JSP pages themselves, and bind those pages to dynamic data. Workshop 8.1 features a complete, two-way, WYSIWYG JSP and HTML editor that is fully integrated within the IDE. Using this editor you can construct JSP pages by dragging HTML and JSP tags from the shared palette of resources into the design surface and visually setting properties. The data palette provides full access to all of the data in the Pageflow, so you can create new forms to take data as input or pages to display processing results with one drag and drop. This is accomplished via a rich set of custom JSP tags that can display tabular information, lists, and trees, with built-in support for filtering and querying database information (see Figure 2).
Enable the Development of Custom ControlsWhen Workshop introduced the concept of Java controls as a simplified way to access enterprise resources, we were immediately asked to make this model extensible so that customers and ISVs could build their own controls to plug into the Workshop framework. With Workshop 8.1, using familiar visual designers you can easily build tightly coupled business logic components that support methods and events as well as asynchronous invocation. Simply by setting a property, Workshop will automatically generate and deploy a JMS queue to support reliable processing of asynchronous messaging. You build controls by defining their interface (what methods and events they support) on the left side of the designer, setting properties to indicate asynchronous messaging, security restrictions, and the like, and then write business logic to implement these methods. Controls can use other built-in or custom controls (shown on the right) in infinite levels of nesting so it becomes very easy to repackage and reuse these components. Control authors can also specify custom properties for their control via a simple XML syntax that are immediately supported within the IDE property editor. For example, a control that accesses an enterprise application might have a username and password property, or properties to configure the interaction with that system. Once controls have been built, they can be packaged as redistributable .jar files and easily added to other projects within your organization, or distributed externally. Controls will automatically appear on the palette of available controls as soon as the .jar file is installed. Advanced control authors can even build custom property editors and wizards that appear within the IDE to automate control setup. More information on these advanced control features can be found in the Control Developer Kit distributed with WebLogic Workshop. Continue and Expand Leadership in Web ServicesDon't worry, we haven't forgotten about Web services! Workshop 8.1 builds upon a solid foundation for enterprise-class Web services that provides native support for loosely coupled interaction, asynchronous "conversational" messaging between parties, and rich business documents. It adds a variety of new enhancements around these three design principles, and extends the Web services stack to support key additional enterprise requirements. Addressing the security and reliability concerns about Web services is crucial to enterprise adoption. To meet this need, Workshop now has full support for the WS-Security specification for message-level security (digital signatures and encryption) and has added a set of properties to the JWS file format to easily support declarative role-based security that leverages the underlying WebLogic Server. In addition, Workshop now supports "exactly once" messaging, which ensures that even over protocols like HTTP messages are reliably delivered once and only once to the recipient. Reliable messaging is exposed as a property that can be set on a message. One of the major design goals of Workshop 7 was to enable the development of loosely coupled Web services. To BEA, just having XML on the wire isn't loosely coupled enough — you need a mechanism that enables easy mapping between specific XML Schemas and Java objects so that both the XML and Java code can change independently without breaking users of your Web service or requiring major coding changes. We solved this problem with a simple, declarative mapping language. In Workshop 8.1, we've moved to XQuery as the standard language for binding XML to Java code and now provide a complete visual editor for performing these mappings. This makes it drop-dead simple to build a Web service from a set of messages (defined either as XML Schemas or example documents) and then map fields into individual Java parameters (see Figure 3).
In other cases, however, fully decoupling XML from Java code using a transformation might be overkill. Sometimes it's easier just to access information from the XML directly, or save it away and potentially perform a transformation later. To enable this scenario, Workshop has introduced XML Beans — a unique new technology that dramatically increases the productivity of accessing XML from Java. Traditionally, developers have had to choose between low-level APIs such as SAX or DOM that enable direct access to XML but are tedious to work with, and Java binding solutions such as JAXB that provide a convenient set of Java interfaces but lose structural information from the original XML. XML Beans provide the best of both worlds. Using an efficient representation of the original XML document, XML Beans provide a simple cursor-based API for direct navigation through an XML document, an XQuery interface for retrieving information, and a set of Java class "views" on the underlying XML data. Given an XML Schema description, the XML Beans engine automatically generates a set of Java types that enable read-and-write access to the XML. What's different here is that XML Beans are based on XML Schema from the ground up, so there is no schema that cannot be bound to Java types (other solutions support about 50% of schema) and the fact that these Java classes are simply views on the underlying XML. No data is ever lost (even things like comments!) because the original XML is always retained. To use XML Beans, simply add a schema file to your Workshop project, and all the Java types will automatically be generated. Dramatically Improve Basic IDE FunctionalityAlthough the Workshop IDE continues to be focused on developers interested in leveraging the Workshop framework, and not for J2EE development in general (where we recommend Borland JBuilder, WebLogic Edition), many of the basic editing, debugging, and management features of leading IDEs are important to all developers, and we've made great strides in increasing the sophistication of the Workshop IDE itself. The new features here are too many to list, but I've included a few of the highlights. Basic IDE WindowingThe IDE look and feel has been updated significantly and now fully supports customizable window layouts. It is organized as a set of supporting windows that can be docked and undocked, and a central document editor with design and source views. DebuggingWe've significantly enhanced the debugging engine in Workshop to support JSP debugging and cross-component debugging. This means you can step from JSP code into Pageflow code into code inside custom controls that you have written. Moreover, the debugging framework is leveraged by the other platform products, so you can even debug from a business process workflow into custom control code or JSPs. The JSP debugger lets you step through the execution of an individual JSP page and view the output stream as it is being constructed. Debugging performance has also increased significantly, and immediate mode and multithreaded debugging support have been added. New Project ModelWorkshop applications now correspond directly to J2EE applications and are packaged into EAR files for deployment. A single project model that can contain Web applications, libraries, custom controls, portals, and workflows enables you to build applications that cross product boundaries and easily manage and deploy them as one unit. The project model is also fully integrated with leading source code control systems such as CVS and Perforce so that you can check in and check out files directly from within the IDE. Source Editing FeaturesWe've also added support within the source editor for many popular productivity features. For example, when you use a class that has not yet been imported into your code, Workshop will automatically prompt to import that library. Holding down the CTRL key and hovering over functions and variables provides additional information and a link to jump to the definition or declaration. Basic source editing features like auto completion have also been enhanced and expanded beyond Java functions and variables. For example, any "href" tag in a JSP or HTML page will autocomplete to any file or image in the project. StandardsBEA has always been committed to developing standards-based technologies and these innovations in the Workshop environment are no exception. The Web services capabilities introduced with Workshop 7 are well on their way toward standardization via the Java Community Process in the form of JSR 181. New features for building Web applications fully leverage Struts, an open-source and cross-platform runtime, and we will be announcing new JSR and community initiatives around technologies like XML Beans, Controls, and Pageflow annotations. ConclusionAs you'll see, this release sets the standard for an integrated, easy-to-use development framework for a J2EE platform. You'll find it easy to get started if you haven't worked with J2EE in the past, and your productivity will improve dramatically even if you already know J2EE. Workshop doesn't just make it easy, though — it has been architected from the ground up to fully leverage the power of WebLogic Server and support application architectures that are secure, fast, and scaleable. The combination of ease of use, tight integration, and a powerful platform is unbeatable. Get it Today!To best experience what WebLogic Workshop 8 is, try it yourself. A beta release of Workshop is available as part of the new developer subscription program. This gives you free access to all BEA developer products for one year and provides a low-cost, "pay for support" program with quarterly updates. You can get more information on downloading Workshop and the subscription program at BEA Downloads. Also be sure to check out http://dev2dev.bea.com for additional developer resources, technical articles, code examples, and how-to tips. I'd also love to hear your feedback and suggestions for the product. Carl Sjogreen is senior product manager for BEA WebLogic Workshop. Return to ONJava.com. |