BEA WebLogic Workshop 8.1: An Overviewby Carl Sjogreen
Content provided by BEA Systems
The initial focus of WebLogic Workshop was on Web services applications, but the core mission of the Workshop team has always been to deliver unprecedented productivity building enterprise-class applications. Many of the innovations introduced in the first version, such as visual designers, controls to simplify access to resources, and declarative annotations in Java code, apply to many applications, not just Web services.
In this new release of Workshop, BEA has dramatically expanded the kinds of applications you can build within the Workshop environment, and significantly enhanced the basic capabilities of the Workshop IDE.
Workshop 8.1 will be available in two editions: WebLogic Workshop Application Developer Edition and WebLogic Workshop Platform Edition. WLW Application Developer Edition includes the basic features targeted at application developers and supports building Web services, Web applications, and custom controls. WLW Platform Edition includes additional extensions to the IDE and runtime framework that let you build portal applications and workflows in conjunction with our Integration and Portal Server products. This article introduces the new features in WebLogic Workshop Application Developer Edition, and the core features of Workshop that are shared across the other BEA WebLogic Platform products.
Based on customer feedback, we focused our efforts around five major initiatives:
Unified Development Experience for the BEA Platform
One of the major themes over the past year at BEA has been the convergence of our product lines. Our customers have told us time and time again that they no longer want to buy separate products to build portals or to integrate their systems or run their Web applications. With the introduction of WebLogic Platform 7, we took the first steps toward bringing the entire BEA product set closer together. With this release, Workshop now provides a completely unified developer experience for the entire platform. This includes a common tool and runtime framework for the platform, as well as a shared programming model across application types.
Although the Workshop IDE is perhaps the most prominent portion of the product, it's important to realize that Workshop is both a tool and runtime framework, both of which are now utilized by BEA Portal and Integration server.
The Workshop IDE is a Swing-based Java development tool that provides many of the capabilities developers have come to expect from a development environment — great debugging, source editing, project management features, etc. Moreover, the Workshop IDE provides visual editors and designers to enable a drag-and-drop development experience for most applications. The IDE's principal mission in life is to create files containing application logic that can then be executed by the runtime framework.
The Workshop runtime framework is a standard J2EE application that runs on top of WebLogic server. The Workshop runtime is responsible for handling the details of compilation, deployment, test harness generation, etc. The framework automates all the plumbing details and complex programming of building a J2EE application. Developers work with simple Java classes, and the framework automatically generates standard EJB components, message queues, databases, etc. This notion of using annotations in Java code to specify additional capabilities is being standardized via the Java Community Process in JSR 175.
The platform development experience is converging around both the design time and runtime components of the architecture. In the IDE, the tools to build portals and business processes are now fully integrated within the Workshop development environment. Common windows in the IDE that manage your project's files and folders, palettes that list available controls, and common gestures are shared across designers for each of the products. All designers share the familiar "design" and "source" views of the application, and feature full two-way editing so that changes made in one view are immediately reflected in the other. The Workshop runtime supports the business logic developed for these applications, and generates a common set of J2EE components for applications and controls that are automatically deployed to WebLogic server. Most important, however, it provides a unified programming model across the application types.
What does it really mean to have a unified programming model across the BEA platform?
A programming model is the "programmer's UI" — the way a developer builds an application and how he or she interacts with the development environment. What APIs are available? What is the architecture and the process for constructing an application? What are the basic components, and how do I interact with them?
In Workshop, the programming model is based on the notion of controls — simple components that have methods, events, and properties with a visual representation in the design view — and annotated Java code that lets you declaratively specify behavior and focus on handling events and calling methods, instead of writing complex object-oriented infrastructure code. This lets developers focus on writing the application logic that is important to them — the code that really builds the application — and lets the framework handle the details of the plumbing.
The Workshop programming model was introduced in Workshop 7 with Java Web Service (JWS) files and controls. Controls enabled you to easily connect to databases, message queues, and EJB components without having to learn the details of the J2EE APIs, and configure settings by setting properties (instead of making API calls). Similarly, when building an asynchronous Web service, instead of writing the code to handle message correlation and state management manually each time, you could simply set a property on a service and the Workshop framework would automatically take care of these details.
With Workshop 8.1, applications — whether they are Web services, Web applications, portals, or workflows — share a common process of assembling controls that encapsulate business logic or resources with additional code, workflow logic, personalization information, etc. All platform products share the notion of simple Java classes with declarative properties as the primary way application logic is built.
This level of integration delivers tremendous value — much more than just having all the products use the same tool. With a common application model shared across all products, controls can be leveraged across application types; common paradigms are used for accessing databases, Web services, etc. Moreover, skills learned in building one type of application can be leveraged to learn new products. This shared programming model, supported by the runtime framework and exposed via the IDE, is a major enabling factor for the 10x productivity gain that Workshop delivers.
Do for Web Applications What Workshop 7 Did for Web Services
Probably the most exciting new area of functionality in WebLogic Workshop Application Developer Edition is the addition of new features for building Web applications. Workshop 8.1 extends the programming model into the realm of Web applications. Leveraging the Model, View, Controller (MVC) paradigm for building Web applications, constructing a Web application involves constructing a set of standard JavaServer Pages (JSPs) for each of the pages (the views) in an application, writing the business logic, data, and navigation flow in a Pageflow file (the controller), and modeling the data that flows between pages and forms in an application in the form of JavaBeans (the model).
For those of you familiar with the Struts framework, you'll find this approach very familiar — in fact, Pageflow files are actually compiled into a set of Struts classes and the Struts runtime is responsible for the execution of the completed application. This enables developers to take advantage of a simplified programming model and rich IDE support, but still build cross-platform applications that run on the open-source Struts framework.
The Pageflow file is the central dashboard for a Workshop Web application. In design mode, a Pageflow provides a visual overview of an application, showing the pages and the "actions" or business logic that they invoke. The Pageflow editor also helps create and manage the data that flows between pages and actions. The design surface gives a quick visual overview of the application and navigation flow (see Figure 1). The source of a Pageflow file is a standard Java class that contains methods that correspond to actions that can be performed in the Web application. An example of a simple Helloworld Pageflow application is included in the source code for this article (HelloForm.jsp, HelloFlow.pfl, HelloResult.jsp; the source code for this article is available on the Web at http://www.sys-con.com/weblogic/sourcec.cfm). You'll see from this example that it's very easy to construct data-bound forms that are tied to simple Java code. What you can't see just by looking at the code is how easy an application like this is to construct within the IDE. Workshop now provides a set of wizards that makes it incredibly easy to construct forms and result pages via simple drag and drop operations.
Pageflows can also leverage controls to access prepackaged business logic, read data from a database, invoke a Web service, or call any other available control. In fact, IDE wizards can automatically construct a Pageflow and set of JSP pages on top of any control to immediately create an application that performs simple CRUD (Create, Read, Update, Delete)-style operations on a database or invokes a Web service. These pages and the navigation flow can then be further customized and extended into a complete application.