Entering content frame

Background documentation Concept Locate the document in its SAP Library structure

Web Dynpro is a client-independent programming model of the SAP NetWeaver technology platform for developing user interfaces for Web applications. The concepts of the Web Dynpro programming model help to ensure the following program attributes:

·        High-performance processing of the entire Web application

·        Clear separation of presentation and processing logic as well as data retrieval

·        Extensive platform independence of interfaces

·        High level of reusability of programs or parts thereof

Metamodel Concept and Declarative Programming

Web Dynpro provides support for the development of Web applications in the form of a declarative programming approach. You use special tools to describe the properties of a Web Dynpro application in the form of Web Dynpro metadata. The necessary source code is then generated automatically and executed at runtime. You can access the source code of your application from the development environment and thus define events for your Web Dynpro application. The generated source code contains separate, specially marked areas for this purpose.

In a Web Dynpro application, every user interface is always made up of the same basic elements, with the exception of the individual interface elements for each application. You declare these elements of the metamodel statically using the Web Dynpro tools. It is also possible to implement elements of the metamodel in programs and integrate them dynamically at runtime. Using these implementations, you can make changes or enhancements to a user interface that has been created by declarative methods by generating new interface structures at runtime. This means that you can combine the declarative procedure with the implementation of source code.

The metadata of a Web Dynpro application is independent of the platform on which the application is executed. It is therefore possible to transport an application to a platform after implementing it on another. The metadata is transported to the platform-specific development environment; the source code required for this platform is generated. Only the source code that you have programmed for the event handling, for example, would have to be adapted to suit the new platform.

Model View Controller Programming Model

Using Web Dynpro technology enables a clear separation of processing logic and presentation logic. A Web Dynpro application runs on the front end and has local or remote access to the back end system using a service. This means that the display logic is contained in the Web Dynpro application, while the business logic and the persistence of the business objects run in the back end system.

Every Web Dynpro application is structured according to the Model View Controller programming model:

·        The Web Dynpro Model forms the interface to the back end system and thus enables the Web Dynpro application to access the data.

·        The View is the central logical element of the Web Dynpro application for the layout and processing of the presentation logic.

·        The Controller is responsible for the data and control flow in the Web Dynpro application. There are different controller types. Since the controller contexts have the same structure, you can process every controller type in the same way using the same tool.

The following back end systems are supported:

·        The SAP Enterprise Connector enables quick and simple generation of Java proxies, which you then use in your Web Dynpro application. The BAPIs (Business APIs) are called using an interface created by the SAP Java Connector (SAP JCo).

·        Encapsulation of the processing logic in Enterprise JavaBeans (EJBs) with subsequent use in the Web Dynpro application by using a Web service model.

·        Use local and external Web services

·        A UML definition can be imported into the Web Dynpro application as an XMI file.

Using Components

To use the Java development infrastructure, a Web Dynpro application is divided into one or more Web Dynpro components.

Splitting a Web Dynpro application into components also offers other advantages. For example, you have the possibility of nesting large application sections, plus this concept allows simpler structuring of Web applications. Interfaces are available for connections between the Web Dynpro Components of a Web Dynpro application. These interfaces can be edited at logical level. Using Web Dynpro components also increases the reusability level of Web Dynpro applications.

This graphic is explained in the accompanying text

Developing with Logical Program Objects

When you define the elements of a Web Dynpro application, the Web Dynpro Generator creates the files of the type .java and .xml as well as logical objects. When you edit the elements that you created using the Web Dynpro perspective, you generally work at this logical level. Of course, you can also directly display the individual generated files at any time.

 

Leaving content frame