cancel
Showing results for 
Search instead for 
Did you mean: 

MVC

Former Member
0 Kudos

hai all,

in MVC Will there exist only Model For all controllers and Subcontrollers or there can be model for each controllers?? any material or link on this would be helpfull.

cheers

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Your application is said to follow MVC only if all the three exists in your application.

<b>Model:</b>

This is a Class in ABAP. It can have it's own attributes and method depending on the application.

<b>View:</b>

This is a page that the user sees in his browser. Here you write the Presentation Logic. You cannot test a view.

<b>Controller:</b>

This is also a class. For Every Page there should be Controller Class. This is an Entry point of a BSP

Application. That's why you can test a controller. By Default it has a base class.

Normally what developers do is that they create model class objects in the do_init method of the controller

class.Then they access the attributes & methods through the model object.

Then they will assign this model object to the view's model object.(View has the model object as it's attribute)

Note that a model created in the do_init method of a controller class. Any no. of models may be created and may

be used in your application.

So there is no restriction that all the controllers and subcontrollers should use only one model.

They can use different models.

Hope it helps.

Regards,

Maheswaran.B

Message was edited by: Maheswaran B

former_member191062
Active Contributor
0 Kudos

Please check the following page:

http://help.sap.com/saphelp_nw04/helpdata/en/a6/38443ca607d75ce10000000a11402f/frameset.htm

here you should find evrything you need about MVC.

Regards,

Dezso

Former Member
0 Kudos

Hi Kumar,

in MVC there can be a model for all controller or a model for each controller or some models for some controller or even no model at all (thats not MVC it is VC).

Search for MVC in SDN Weblogs and you will find a lot of nice things.

Regards,

Sebastian