cancel
Showing results for 
Search instead for 
Did you mean: 

Application Design Component or MVC ?

Former Member
0 Kudos

Hello Friends,

I am having my experience with Web Dynpro 4 java, and now I am having my first project with WD4A. I am a bit confused with this component approach. So I thought to take few tips/suggestion from experts out there

Actually I have to create, chagne and display a "Notification IW21". So I created BAPIs to create, change and display notification, so far okay. Now I need to design the application....so its component oriented or MVC or both ? e.g I can create a component which only create the notification, ( so couple of views lets say 6 or 7 views, its own component controller from where I call the BAPI ). Then another component which only shows/displays the notification ( again a simple input mask ( view ), component controller which then calls the display BAPI) and similarly a component to change the notification ( again few views, and component controller to call the change BAPI ). And then maybe a 4th component which contains all other three components....

Or alternatively, should I make design like this:

Only VIEW components which only contains the view for CREATE, CHANGE and DISPLAY notification and then CONTROLLER component which take the values from view and pass on to the Model Components which has a component controller and thus calls the BAPI......

I dont know which one is better one or correct approach.... looking farward for your suggestions

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI shah,

I wud like to tell u there are std. WD4A components for IW21 create notification screens,better have a look into it and proceed furthur..so that repetitive work and be avoided..

And regarding WD4A , it can be considered both component approach mixed with MVC, here we dont import models seperately as u do in WD4J..here they both are coupled to each other..since here we dont use stuffs like EJBs which r to be brought into ur component..Here in WD4A we use all std.SAP components like SAP tables and BAPI for those approaches..

Thanks

Arjun.G

Former Member
0 Kudos

hello Arjun,

Thanks for your post, can you please guide me to those stds ? where I can find/download them ?

Regards,

Shah

Former Member
0 Kudos

Hello,

My question is still there,

Component-Oriented apporach :

if I create threee individule components like CREATE COMPONET, CHANGE COMPONENT and DISPLAY COMPONENT.... and one main component which controll all other threee compoents...

And ofcourse e.g if I have CREATE-COMPONENT, then I will have MVC approach in this component, like view to offer CREATE-Notification MASK, then component controller which in return call the Create Notification BAPI and likewise for change and display.....

OR..

MVC Approach:

One componet which contains all views for create, change and display notification, one component which is controller component and then model component which calls the bapi ?

What is the standard and correct approach ?

Regards,

Sm1tje
Active Contributor
0 Kudos

It's not the one or the other, but it's both. Determine all the components you need and find out which of these components can be reused. So for example when you create the Display notifications, these would be a component on it's own which ultimately could be reused in all sorts of other WD components. So all the separate components you want to design should be aimed at reusable components.

The MVC design should be part of the components. So, again, when you want to display the notifications, make sure that the data is not retrieved in the components of the view (methods of the view), but in the component controller of the WD component or in custom controllers (but definitely not in the view controller for example).

Former Member
0 Kudos

There are 2 possibilites,

1- Create one component and only one view, change the look and feel of your view dynamically. In the case of display your UI elements will be display only, and if required you can change the text on buttons too. So in this case only one view can solve the problem and the mantainance would be alot easy coz all the things are centeral.

2- Create one comp and three different views for create/edit/display, and call the bapi accordingly based on user action.

Hope it helps.