Show TOC

Using MVC for BSPLocate this document in the navigation structure

Use

All BSP applications that you created with SAP Web AS 6.10 can also be executed without MVC. In general, you do not need to change anything.

The previous BSP implementation model gives you the option of controlling event handling and navigation using redirects.

The MVC design pattern provides you with various advantages, so that you can consider converting to MVC in the following cases:

  • If your pages are dynamically composed of several parts (components)

    A controller can assemble a page from several views. As a result, the layout is Componentized.

  • If input processing is so complex that it should be subdivided into different methods

    A controller offers great flexibility, especially during input processing, since you can create and call new methods.

    If the system cannot decide which page comes next until input processing, we recommend that you let the controller branch to different views.

  • If redirects using navigation can lead to performance problems (such as slow diversion)

  • If visualization logic is fairly important, since you can use MVC to separate the logic from the layout

  • If the layout from a different person is being processed as the visualization logic

  • If parts of the layout should be created by the program, such as by a generating program or an XSLT processor

Combination of MVC with BSP

Combination of MVC with BSP

You can combine the technology of the previous implementation model for BSPs with the new MVC design pattern.

  • In a BSP application, there may be pages with flow logic as well as controllers and views.

  • The views can only be called by the controllers.

  • Redirects from pages to controllers and back can take place with the help of redirect using the navigation methods.

  • In the page layouts you can use the <bsp:call> element or the <bsp:goto> element to call a controller. You cannot use these elements to call pages.

Process