• No results found

2 Overview of the SAP NetWeaver Developer Studio

2.5 Tools and Perspectives

2.5.2 Dictionary Perspective

The most important functions in the development infrastructure per-spective can be summarized as follows:

왘 Import or create new development configurations

왘 Create new software components

왘 Browse component contents in the central repository and in the local file system if necessary

왘 Check out entire DC projects or individual project resources

왘 Create new DC-based projects for various types of projects (Web Dyn-pro DC Dyn-project, Dictionary DC Dyn-project, etc.)

왘 Declare component metadata

왘 Integrate all basic DTR operations, such as creating new activities, assigning changes to activities, displaying changes, checking into the repository, or undoing changes

왘 Integrate the build and deploy functions

왘 Activate development components

왘 Display the properties of any entities (development configuration, software component, development component, development object, activity)

2.5.2 Dictionary Perspective

Java Dictionary design time tools

Developing portable and high-performance database applications requires not only a powerful persistence framework but also tool sup-port that allows platform-independent definition of database objects at design time. For this purpose, all tables in a central Java Dictionary6 are defined for multiple platforms. The Developer Studio provides the nec-essary design time tools in the dictionary perspective. The dictionary perspective contains various tools for defining database objects such as tables, indexes, and database views independently of the platform, as well as defining global data types including simple types and structures.

6 With the Java Dictionary, the AS Java provides a framework for the platform-indepen-dent definition and the central storage and management of database objects and global data types. The objects in the Java Dictionary are used for multiple applications in the field of Java-based projects. The dictionary perspective provides the Java Dictionary’s most important design time tools.

Tools and Perspectives 2.5

Dictionary Explorer

With the Dictionary Explorer, the perspective shows the logical struc-ture of the dictionary projects. This view is used as the starting point for the relevant development activities, such as creating or processing dic-tionary data types, tables, and views. The procedure here is the same as it is for many other types of projects: To create a new development object starting with an initial project frame, developers select the required category from the context menu at the required node and start the corresponding creation wizard. In this way, global data type defini-tions (simple types and structures), as well as tables and indexes, can be create a database of objects based on XML metadata descriptions.

Editor for global data types

User-defined, global data types are specified in a designated editor. This helps developers define simple types and structured types, which in turn consist of several elements. When defining data types, you can record semantic information about a type. You can also link UI text information to a data type, and centrally store texts to be used as input help, field labels, column headers, or quick info. You can display these texts when you use the data type in the layout of Web Dynpro applications, for example. The value ranges of the new data types are derived from the predefined (built-in) types7 that are automatically mapped to the stan-dard JDBC data types.

Editor for tables and índexes

The table editor from the dictionary perspective allows database-inde-pendent definition of tables. A table definition is mainly specified by table fields (table columns) and key fields. Furthermore, table indexes can be defined for selected fields and the technical settings can be used to buffer the table and determine the type of buffering. A table defini-tion that is saved in the Java Dicdefini-tionary in this way is created as a phys-ical table definition in the database when the table is deployed, and is translated into a representation of the respective database.

Editor for database views

Developers can use previously defined tables to create database views in the dictionary perspective. A view represents a virtual table, the data records of which are taken from one or more database tables. The view

7 The Java Dictionary provides a set of predefined data types (built-in types), which are either used directly or when creating user-defined data types. Examples of predefined types are: string, short, time, timestamp. Both the predefined and the derived simple types are portable data types that are converted to standard JDBC types without any additional effort and can therefore run on all DBMS platforms that are supported.

Overview of the SAP NetWeaver Developer Studio

2

editor allows developers to specify how data records from the original tables flow into a new composition of the view. When doing this, the re-quired view columns from the underlying tables can be assembled using graphical tools and join conditions and where clauses can be added. A direct edition of the SQL statements is also available as an option.

Figure 2.16 shows an example of a dictionary project with the project structure displayed in the DictionaryExplorer (top left). To the right of this, you can see the graphical View Editor, in which developers can specify a database view. A compressed XML description of the table that is currently selected is shown in the OutlineView.

The dictionary perspective’s scope includes the following tasks:

왘 Generate a project framework for dictionary projects, both for local projects and projects based on the SAP component model

왘 Create platform-independent database tables and table indexes as part of the Java Dictionary

Figure 2.16 Definition of a Database View in the Dictionary Perspective

Tools and Perspectives 2.5

왘 Create database views as part of the Java Dictionary

왘 Create user-defined, global data types (simple types and structures) as part of the Java Dictionary

왘 Automatically map predefined dictionary types and simple types to appropriate JDBC data types

왘 Generate transportable archives

왘 Deploy archives

왘 Rename tables and table fields

왘 Delete tables and views

2.5.3 J2EE Perspective

Java EE and J2EE development based on

WTP tools

The J2EE perspective provides a range of tools and other utilities for standard-based development of components within the scope of the two programming standards Java EE 5 and J2EE 1.4. Moreover, developers have the necessary tools and APIs for deploying and testing applications in an integrated server environment.

Various types of projects are available in the Developer Studio for dis-tributing application resources:

왘 EJB projects define a project scope for developing Enterprise Java-Beans. All EJB components (entity beans, session beans, message-driven beans, and Web services) can be created and implemented using wizards — as required by the underlying specification. If it is necessary to configure the EJBs, developers can pull in the associated deployment descriptors. All these project resources, including all of the configuration files, are combined into a Java archive (JAR).

Depending on which program model the component development is based on, we distinguish between two types of projects. While the EJB project is intended for developing components based on J2EE 1.4 (and < 1.4), the EJB project 3.0 supports the new Java EE 5 program-ming model and therefore the specification for EJB 3.0.

왘 Web components for a standard application based on the program-ming models previously named are managed in a separate Web project. Two different flavors of Web projects are available: dynamic projects and static projects. Within a dynamic Web project,

develop-Overview of the SAP NetWeaver Developer Studio

2

ers can create dynamic resources, such as servlets, JSP, JSF, and fil-ters, and also static resources, such as graphics and HTML pages, and use embedded tools to edit these, whereas the static Web project can contain only static resources. All the resources in a project of this type are combined together with the associated deployment descriptors into a Web archive (WAR).

왘 An enterprise application project combines all J2EE or Java EE resources that are relevant for deployment into a kind of overall application. Basically, such a project contains a set of references to other J2EE and Java EE modules and also to other Java projects that are combined into an enterprise application archive (EAR), if neces-sary. The referenceable projects include Web modules, EJB modules, application client modules, connector modules, and Java projects that can contain any number of helper and utility classes.

Consequently, enterprise application projects are used to group together various components to create a deployable overall applica-tion, which contains references to the associated modules as well as the deployment descriptors for configuring the application. The resulting archive, the EAR, therefore represents a unit of a J2EE or Java EE applications that can be transported. Depending on the pro-gramming model that the referenced modules refer to, we distinguish between the Enterprise Application Project (based on J2EE) and the Enterprise Application Project 5 (based on Java EE 5).

왘 The connector projects are required when developing connector com-ponents based on the J2EE resource adapter architecture. In this con-text, a connector provides a standard mechanism for enhancing J2EE containers, which allow developers to implement the connection to and communication with a non-J2EE system and vice versa. Conse-quently, connector projects help to manage the connector module resources as well as the appropriate deployment descriptors.

왘 Application client projects contain application client resources. Appli-cation clients are standard J2EE or Java EE components and, like the other components (EJBs), they can make use of all the services of the application server. However, in contrast to the other standard compo-nents, an application client runs on a separate Java Virtual Machine (JVM).

Tools and Perspectives 2.5

Project explorer

The ProjectExplorer view displays all types of projects in the J2EE per-spective in the form of a tree structure. It conveys a logical view for nav-igation in the respective project structure and also acts as a starting point for developer activities, such as creating or editing development objects as well as configuring the respective project components.

Wizards, genera-tors, and validation functions

Starting with a given project structure, developers always create new development objects according to the same pattern: They choose the corresponding node within the project hierarchy and use the Create operation to launch the first page of a wizard. This processes the individ-ual dialog steps that are required to specify the new object. The sequence of the individual steps is fixed in the wizard; in the final step, developers trigger the generation of corresponding resources. After completing the wizard, the resulting object is added to the project view.

Wizards significantly accelerate the development process and ensure the integrity of the generated source code. These declarative steps result in a type of default version of the generated objects.

Servers view

The Servers View allows developers to perform basic operations for managing servers from various manufacturers. For example, this easy-to-use tool lets developers select the projects they want to deploy and then lets them deploy the archive in question on the server. In addition to the Deploy operation, the servers view allows access to the operations for starting and stopping server instances, without having to leave the Developer Studio.

To open the J2EE perspective in the Developer Studio, choose Window폷 OpenPerspective and then select J2EE. Figure 2.17 shows a section of the J2EE perspective with the Project Explorer (left), the Java Editor containing the source code of an entity (right), and the ServersView (bot-tom).

In accordance with the fact that the J2EE perspective supports the devel-opment process on the basis of the J2EE 1.4 and Java EE 5 specifica-tions, the scope of the tool can be summarized as follows:

왘 Create J2EE and Java EE projects based on the tools of the WTP open source project

왘 Optional use of projects based on the SAP component model

Overview of the SAP NetWeaver Developer Studio

2

왘 Automatic validation of the generated source code in accordance with the rules of the respective specification

왘 Wizard support for creating and defining Enterprise JavaBeans (ses-sion beans, entity beans, and message-driven beans)

왘 Wizard support for creating and defining Web resources (HTML pages, JSPs, servlets, filters, and listeners)

왘 Wizard support for creating connector components

왘 Wizard support for creating and editing application client compo-nents

왘 Create and configure overall enterprise applications

왘 Export and import function for enterprise archives (JAR, WAR, and EAR)

왘 Deploy archives

왘 Access basic operations for server administration

Figure 2.17 A Section of the J2EE Perspective

Tools and Perspectives 2.5