cancel
Showing results for 
Search instead for 
Did you mean: 

Where MVC patten is used in WEBDYNPRO

Former Member
0 Kudos

Hi All,

I worked on BSP and webdynpro.

I am having the following doubt.

In Webdynpro, how exactly the MVC architecture is followed.

In BSP : we are creating the global class ( Model ). when creating the controller , in DO_Request we are calling that model.

Then passing the output to page.

But In webdynpro: How the model ? where we are calling that model.

as per my knowledge: in View methods like WDDOINIT, WDDOMODIFY....

we are creating ref to some standard classes . Not user created ( Z class).

Then my final question is where and how MVC architecture is used in ABAP WEBDYNPRO...

pls explain with small example.

Regards,

Kishan

Accepted Solutions (0)

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

Similar to WD JAVA, there is no model.

But, There is an Assistance class which substitues for model.

So you have the View and Controller. In place of model, make use of the Assistance class.

Regards,

Sharath

Former Member
0 Kudos

Hi nSharath,

thanks for your reply.

evry where, people will say that WEBDYNPRO for abap works with MVC pattern right?

then why there is no Model?

even, controller is not available right? only component controller to define nodes and attribures....

Can we use a global Z class in Webdynpro , like we use in bsp?

just confused with MVC with webdynpro...

Regards,

Kishan

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I wouldn't say that there is no model. It is that there is no framework enforced construct called a model. In fact any ABAP class or function module can be the model. This allows a greater level of reuse of existing logic by not forcing the model to have a certain interface or of a certain subclass type.

There is certainly a controller. Each component has at least one controller (the Component Controller), plus each view and window has a controller. The controller is the methods, attributes, context and plugs of an object.

Sharathmg
Active Contributor
0 Kudos

Agreed with Thomas on explanation.

However, to developers who are hardwired by Web DYnpro Java, graphic layout of MVC design pattern it may appear otherwise. Other than the appearance aspect, there is not much change in the MVC implementation.

As always, its upto the developer to maintain the MVC development pattern with or without wizard.

Regards,

Sharath

Former Member
0 Kudos

Hello,

never use business logic in WD4A component. Selects are no go in WD4A development by all means.

The business logic can be a reference type of component controller. The compoentent controller accesses the busines logic over this attribute,

All the best,

Guido

Former Member
0 Kudos

Done!!!!

Former Member
0 Kudos

I have a question for Thomas on the same topic.

Can a database table also be considered as Model ?

Regards,

Arpan

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I personally wouldn't consider a database table a model. Just from a best practice, your database access should be abstracted by whatever you are using as a model. Otherwise I think you controller becomes the model.

Edited by: Thomas Jung on Sep 1, 2011 10:42 AM

Former Member
0 Kudos

Thanks Thomas .