cancel
Showing results for 
Search instead for 
Did you mean: 

WebDynpro best practices for use of controllers and context

Former Member
0 Kudos

Hi all,

I'm currently building a webdynpro application and have two questions regarding best practice and I was wondering if you could provide me with some feedback.

1. The application is supposed to access a number of backend RFC's, is it best practice to have separate custom controllers for each RFC or use one custom controller for all backend connections?

2. When posting data to the backend via an RFC connection - where the user enters the data in input fields - is it better to create a method on the controller that receives the values from the view as parameters (via the method call), create the node model on the contoller side and then set the fields based on the parameters as opposed to creating the node on the context of the view before calling the controller to execute the call to the backend (assuming there is a context mapping between the view and the controller)?

Any feedback is greatly appreciated.

Thanks.

Kind regards,

Dion

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

for your first question you can go through this thread which discusses the same.

Regards,

Gopi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

1. If you are using many Adaptive RFC models in your application,if each RFC deals with different areas...I mean one RFC returns Customer details and another RFC may deal with SalesOrder details. In that case i prefer to create two customcontrollers for Customer and SalesOrder.

2. Question is not very clear to me.Could you please explain onc again.

Regards,Anilkumar

Former Member
0 Kudos

Thanks for your feedback everyone. I've made some changes beased on your recommendations. I'm sorry if the second questions was a bit unclear, but I think I have it covered now anyway.

regards,

Dion

Former Member
0 Kudos

Hi Dionsios,

1. In my opinion custom controllers are not linked to Rfcs but to functionnal area of an application. I think it is better to have one controller by main process. This leads to have several controllers, each one handling several Rfcs.

I think it is clearer and easier to maintain.

2. Not sure I understand very well your purpose but I think créating a method on the controller is better. It is lighter (less data on the view) and avoid too much node replication.

I hope it was usefull for you

Best regards,

Sylvain