on 02-27-2008 11:40 AM
Hello experts
I strictly separated model, controller and view in our Web Dynpro for ABAP application. One WD component represents the controller and another represents the model. Each view is represented by an own WD component, the context data is propagated to the views using reverse-mapping.
Now we have the following questions:
1.) Is it recommended to share the model with several controllers? Image one controller only requires a part of the model nodes whereas another controller requires all nodes within the model.
2.) Is this approach with a single model recommended from the performance point of view ?
3.) Should I keep the context in the model as simple as possible and therefore provide two models, one for each controller?
Any suggestions? Is anyone else facing the same issues or using the same approach?
Regards, Mathias
I'm convinced, better using assistance class than contest mapping between several WD components.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Koen
I don't think that my approach violates any MVC rules. Instead official SAP Press books do exist introducing this approach as well (ISBN 3-89842-690-4: Praxisbuch WD for ABAP). Keyword: multi-component applications
All I'm doing is roll out the model and therefore the access to the business logic into a separate WD component.
Regards, Mathias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm afraid you've put the MVC model in place, violating the MVC rules.
- you use a webdynpro component as model, sharing the data via the context, this means you create the model using the controller of that component
- Model: this is not available up to now in WDA, but that place is taken by the assistance class: [documentation|http://help.sap.com/saphelp_nw2004s/helpdata/en/43/1f6442a3d9e72ce10000000a1550b0/frameset.htm]
- View: this in fact is only the layout tab in the views
- Controller: all the rest: methods, attributes, context, events, actions,..
an overview can be found in [documentation|http://help.sap.com/saphelp_nw2004s/helpdata/en/a5/1a1e3e7181b60ae10000000a114084/frameset.htm]
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
As far as from my understanding this MVC archetecture needs to be followed for a a component. Thats is not to be shared between three components. like model logic in one component, View in another componet ...
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.