Chinaunix首页 | 论坛 | 博客
  • 博客访问: 691024
  • 博文数量: 145
  • 博客积分: 3446
  • 博客等级: 中校
  • 技术积分: 1567
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-30 13:58
文章分类

全部博文(145)

文章存档

2021年(1)

2020年(1)

2019年(1)

2018年(6)

2017年(1)

2016年(10)

2015年(12)

2014年(10)

2013年(15)

2012年(33)

2011年(21)

2010年(9)

2009年(18)

2008年(2)

2006年(5)

我的朋友

分类:

2009-10-15 23:17:54

 

http://www.sapdev.co.uk/webapps/bsp/mvchome.htm

Uses

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 .

  • 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

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

  • In an 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 element or the element to call a controller. You cannot use these elements to call pages.

Process

  • Use the top controller as a point of entry to your BSP application and its process flow. First create a controller (see ).
  • Then a call a view from this top controller. Next create a corresponding view (see ).
  • Now your controller.
  • Then call the controller or the sub-controller (see ), and then the view (see ).
  • If necessary, you can also create .
阅读(474) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~