on 04-05-2006 8:27 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.