Generating Applications Based On Predefined TemplatesLocate this document in the navigation structure

Use

Business applications often implement well-known patterns that have to be reused many times by the developers, and in most cases, this requires writing a lot of code and applying many manual steps in the Developer Studio.

The SAP NetWeaver Developer Studio allows application developers to produce development artifacts automatically generated by predefined templates and to develop their applications faster and prone to fewer errors. These templates also assist non-experienced developers in becoming familiar with the related technology more quickly.

The generated artifacts can be easily customized according to the specific needs and purposes of the different business applications.

Each template provides some fragments of your application, or an entire application. By applying these templates you can generate essential parts of an application - from database operations to the user interface.

The following table lists the available templates that can be applied to the applications:

Template Name

Description

Session Bean CRUD Façade

This template is related to Java EE applications. It generates a stateless session bean facade which implements the CRUD facade for operating with databases.

More information: Using Session Bean CRUD Facade Template

CRUD Application

This template is related to Java EE applications. It enhances the Session Bean CRUD Facade template with JSF-based user interface components with an SAP look and feel.

More information: Using CRUD Application Template

UI Task Generation (in Business Process Management)

This template is related to process modeling. It allows you to model, build, and deploy executable processes whilst spending less time and effort.

For more information, see the “Business Process Management” documentation.

Query and Response

Create UI for ECM Integration

The Query and Response and the Create UI for ECM Integration templates are used to create Web Dynpro development artifacts such as User Interface elements, User interfaces and so on. They allow you to model a Web Dynpro application quickly and easily.

The Query and Response template is used to create UI elements such as, a form or a table on a view using the request and response model classes.

The Create UI for ECM Integration template is used to create User Interface that helps maintain documents in Enterprise Content Management Knowledge Management (ECM KM) system. ECM KM is a Content Management System and a central repository of all the documents.

More information: Using Templates in Web Dynpro

Procedure

This is the general procedure for using a template. The templates are applied in a context dependant way. Each template can be applied only to an applicable development object. The development object can be visualized in the Project Explorer of the related perspective, in a view or in an editor (for example, in the Composite Designer perspective, the Process Development perspective, the Java EE perspective, or in the JPA Editor). The template wizard can be triggered from the currently selected object's context menu. For example, to generate a CRUD façade you have to use the context menu of an entity visualized either in Java EE perspective Project Explorer , in Composite Designer Overview , or in the JPA Editor.

This is the general procedure for generating a template. You can access this wizard in the corresponding perspective for each template, or in the Composite Designer perspective in the Developer Studio. For example, to generate a CRUD facade, you have to be in the Java EE perspective.

  1. Locate the project and the component to which you want to apply the template. In the Java EE scenario, such a component is an entity.

  2. In the context menu of this component, choose Apply Template .

  3. Follow the steps and complete the wizard.