Highway 1 - From Dynpros to Web Dynpros, Part III

SAP Developer Network

Summary

Web Dynpro fundamentals and how to build a simple application consuming a Web Service were described within Part I and Part II of the series. This article describes in detail what to consider if a developer designs a complex Web Dynpro application.

By Karin Schattka

24 May 2004

 

Design of a Complex Web Dynpro Application: Top-Down Approach

Special design models are provided for designing Web Dynpro applications for the different abstraction layers. Using these models you can design a Web Dynpro application in greater detail (see Figure 1).

Figure 1. Design Model example

Terminology

Development Components

A development component (DC) is a container for development objects and can contain further DCs. A development object specifies a versioned file (for example a Java class, a Web Dynpro view, a table definition or a JSP page). A DC corresponds exactly to a project. A project has one type or technology (Java, J2EE, Web Dynpro, Web Service, Dictionary). The visibility of the development objects contained is defined at DC level.

Web Dynpro Project

A Web Dynpro project includes all Web Dynpro development objects. It consists of Web Dynpro components, Web Dynpro component interfaces, and models. It is used to organize files and packages and to maintain dictionary entries, settings and properties for the applications.

Web Dynpro Component

A Web Dynpro component is a reusable unit comprising views and controllers. It can be reused in its entirety or can be used simply to structure the application. From the definitions for DCs and Web Dynpro components, it follows that a DC next to other DCs can also contain Web Dynpro project DCs which in turn may contain any number of Web Dynpro components. A Web Dynpro component, however, may not contain a DC.

Web Dynpro Window

A Web Dynpro window is a container in which you can embed any number of views and view sets. View sets are used to distribute the Web Dynpro window to individual sub-areas and can be nested as required. Both Web Dynpro windows and view sets may contain views. Views are only used for visualization.

Advantages of Web Dynpro for Developers

  • Minimize coding – Maximize design!

  • Development productivity is increased, through both graphic and declarative development tools.

  • Web Dynpro components based on the MVC development pattern improve the structure of the application and can be reused.

  • The application is decoupled from UI client technologies (such as browser, JSP, etc.).

  • A data dictionary is provided for the central definition of data types and database tables. It can be used for all layers of application development (presentation, business, and persistence layers).

  • Generic services reduce development costs, such as automatic data transport based on a defined data flow or automatic error handling of user input based on defined data binding.

  • Integration in a Java development infrastructure ensures automatic versioning, transport, and deployment to test and production systems. This advantage is of special interest for team developments.

All of these points mean less implementation work and thus an increase in productivity when programming Web applications. Only for very specific parts of the UI logic (for example event handler defined by the application developer) is it not possible to generate code automatically. The developer must implement these parts. In addition to the standard events, already provided by Web Dynpro (e.g. doInit, doExit), developers can define application-specific events themselves.

Integration of Web Dynpro Applications in the Portal

Web Dynpro is SAP’s strategy for developing Web applications, and is therefore the strategic approach for developing content for SAP® Enterprise Portal.

Web Dynpro applications can be integrated in the portal quickly and easily. A Web Dynpro application that runs in the portal can use portal services that are available, without a line of code being written. The applications running in the portal are called iViews. iViews can communicate with one another by portal eventing, that is they can send and receive events from other iViews on the same portal page, whether or not they are based on Web Dynpro.

Web Dynpro UI elements are based on Unified Rendering. This means that the appearance of an application can be changed by pressing a button. This is of interest to companies wanting to use their own logos and colors (called themes). Web Dynpro applications can thus be adjusted using the style sheet editor of the portal. For example, the colors in tables are adjusted and automatically used in all applications. Other integration features include the use of unified user management, session management, and WorkProtect mode. The integration of Web Dynpro applications in the portal will be intensified in future releases of the SAP NetWeaver™ application and integration platform.

An example for the use of a Web Dynpro application is Employee Self-Services (within ERP 1.0), which was integrated in SAP Enterprise Portal.

Figure 2. A Web Dynpro example

Eat Your Own Dog Food

SAP application developers use Java and Web Dynpro to develop new applications. The SAP Developer Network is another excellent example for the use of homemade technologies. The application and integration platform of the SDN is SAP NetWeaver – based on SAP Enterprise Portal, Knowledge Management and J2EE Engine.

Summary

SAP applied its experience from ABAP development to the world of Java development. This road began with a carefully planned development project and was implemented by experienced developers. As a result, after initial pilot phases, today we are able to give our own application developers and our customers a programming model that drastically simplifies the development processes both internally at SAP and at our customers’ and partners’ sites. And that brings us back to Highway 101, passing the gorgeous scenery of the Pacific on a road linking two of the most beautiful cities of the world. Try it yourself – Download the Sneak Preview II with exercises and coding examples from the SAP Developer Network!

Table of Contents



Content Options

Copyright © 2005 SAP AG, Inc. All Rights Reserved. SAP, mySAP, mySAP.com, xApps, xApp, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product, service names, trademarks and registered trademarks mentioned are the trademarks of their respective owners.

SAP Developer Network