< Day Day Up > |
To help you get acclimated to the Workshop user interface, the following sections explain how to create or open an existing application and select files for editing activities. Creating an ApplicationAll development in WebLogic Workshop is performed in the context of an application. To create a new application, select File, New, Application from the main menu. The New Application dialog box that opens, as shown in Figure 2.2, presents a number of application types for starting development. The default application is a good starting point when building a Web application, and the Portal and Process applications are good for beginning WebLogic Portal and WebLogic Integration work, respectively. Whatever your initial application type selection, you can always add new components at any point during development. Figure 2.2. The New Application dialog box provides the means for selecting the type of application to develop.
The New Application dialog box also enables you to set the directory in which the application is stored. There is no need to specify the application name separately, as it always matches the last folder in your directory path . Finally, you can use this dialog box to specify the WebLogic Server environment in which to run the application during development. For examples in this book, the directory corresponding to the WebLogic domain is provided. For the sake of touring the Workshop Integrated Development Environment (IDE) in this chapter, make the selections specified in Table 2.2. If necessary, adjust the directory in which BEA WebLogic Platform 8.1 is installed, and click the Create button. Table 2.2. New Application Dialog Box Settings
Viewing an ApplicationWorkshop provides several tools to examine application components. This section describes how to use the Application, Files, and Document Structure panes for this purpose. The Application PaneAfter creating a new application, you can view its contents in the Application pane that, by default, is visible in the upper-left corner of the WebLogic Workshop environment. This pane, shown in Figure 2.3, displays a hierarchical tree view of the files in the application. Figure 2.3. The Application pane provides a hierarchical view of the files in the application.
For this application, the first two folders, Chap2Web and Schemas , represent projects. Each project is made up of a collection of files needed to build a component of the application. Chap2Web is a Web project, used to build Web applications by creating JavaServer Pages (JSP) and defining how to navigate between them. Schemas is a Schema project, used to provide simple yet sophisticated access to XML documents in Java through the BEA Systems XML Beans technology. Table 2.3 summarizes all predefined WebLogic Workshop project types. The list of available project types is determined by the version of Workshop that's installed. The Application Developer Edition, provided with WebLogic Server 8.1, includes all the fundamental project types needed to build Web applications and Web services as well as the back-end business logic through controls and Enterprise JavaBeans (EJBs). The Platform Edition, bundled with WebLogic Platform 8.1 and provided on the CD-ROM accompanying this book, adds project types to support development with WebLogic Portal and Integration. Table 2.3. Built-in WebLogic Workshop Project Types
You can browse the contents of any folder by double-clicking the folder name or clicking the + or - symbol to the left of the folder icon. Take a moment to examine the contents of Chap2Web , the Web project in this application. You will find that the project comprises
The Modules and Libraries folders are repositories for compiled Java code that application components need. The difference is that the contents of the Modules folder are automatically deployed to WebLogic Server. The Security Roles folder is used to create application-specific groups of users, usually based on their function in the organization. Then the roles are used to determine who can and cannot access the application's components. By keeping the roles abstract, the application does not need to concern itself with actual user identities. The WebLogic Server system administrator makes mappings between the roles and actual users after the application is deployed. A number of context-specific application management options are available by right-clicking any entry in the Application pane. Right-clicking on most folders displays options for adding and importing objects as well as compiling resources. For example, as shown in Figure 2.4, when you right-click on the application folder at the root of the tree, a pop-up menu is displayed, with options for adding and importing existing projects, compiling the application, and deploying it to WebLogic Server. Right-clicking files in the Application pane displays options for saving, copying, deleting, and renaming resources. Figure 2.4. The root folder pop-up menu displays common actions to take at the application level.
The online product documentation provides more information on all available pop-up menu options. The Files and Document Structure PanesClick the Files tab to see another view of the application. As shown in Figure 2.5, the Files pane lists all files associated with the application arranged in alphabetical order. The input text field can be used to filter the list and locate a specific file or set of files. Figure 2.5. The Files pane provides an alternative to the Application pane to view the files included in a Workshop application.
The Document Structure pane shown in Figure 2.6 provides another view of the application. Visible by default in the upper-right corner of the Workshop window when a file is being edited, this pane displays a hierarchical view of the parts in a file. For example, for JSP files, the pane displays the list of HTML and JSP tags. For a Java class, the pane displays the list of method and class variable declarations. Figure 2.6. The Document Structure pane displays the context-specific key elements in a selected file.
|
< Day Day Up > |