- 2&5… & Coo4U… - http://2he5.com -

达人开课之ABAP tips2:MVC

Posted By 宝妈 On April 2, 2008 @ 9:36 pm In IT顾问 | 1 Comment

MVC means ‘Model Control View’. It is a very traditional way to structure the program. Usually it is used in OO (object-oriented) programming. Well, we can also apply this good thinking of programming in the ABAP4 which is process-oriented as well.

The normal structure of ABAP4 program is like this:

1 Definition

2 Input screen definition

3 Input screen event

4 Start-of-selection

5 End-of-selection

Then how can we apply MVC thinking? It is going to be like this:

Aarrange all the input procedure in the 2 & 3 part. For example, authorization check.

Arrange all the business logic control in the 4 part. Arrange all the data access in the subroutines which will be used in the business logic control.

At last, move all the output procedure in the 5 part.

It will be much easier for the descendant to understand the program in the future using this MVC thinking.


Article printed from 2&5… & Coo4U…: http://2he5.com

URL to article: http://2he5.com/2008/04/02/%e8%be%be%e4%ba%ba%e5%bc%80%e8%af%be%e4%b9%8babap-tips2%ef%bc%9amvc/

Click here to print.