HTML-Business Extension - UI-Elements for BSP
n
Business Server Pages
MODEL VIEW CONTROLLER (MVC)
Objectives
§Upon completion of this topic the participants will be able to:
§State the advantage of using Model View Controller (MVC)
§Perform BSP development using MVC approach
What is MVC?
The Model View Controller (MVC) design pattern contains a clear distinction between processing control, data model and displaying the data in the interface. These three areas are formally distinguished from each other by three objects: model, view and controller. As a result, you can easily split Web applications into logical units.
§There can be different views for a model, which can be implemented using different view pages.
§To visualize the status, the view queries the model, or the model informs the view about possible status changes.
Advantage of using MVC?
§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 congregated as one component.
§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
Architecture - Previous BSP Application
§With SAP Web AS 6.10, normal BSP applications usually consisted of an application class and several BSPs. Navigation between the pages was controlled using redirects.
Architecture - BSP Application with Controllers and Views
§From SAP Web AS 6.20, you can combine controllers and views in a BSP application. You navigate between the controllers and any pages that exist using redirect. Each controller can have one (or several) model(s).
§You can use redirect to navigate between the controllers using a call.
No comments:
Post a Comment