on 07-24-2006 4:39 AM
Hi Friends,
I visited some examples in webdynpro application examples provided by SDN.
in one example for context programming(number 18), the Java code to access the data is in Controller context , but in another example (number 11) its in context of a view.
I understand that if the data need not to be on controller level, it can be placed on View context level.
Is there any other reason also to put Java code/implementation on view context level, instead of Controller context level?
Hi Naveen,
There are various points where you have to decide where to put which code. If your code is only the interaction between the screens (ie: the action based on some selection of dropdown, some action of inputing the value in InputFeild and press enter, like that..), then tehe code must be written in the view context.
The code which need to be accessed by different modules of the appication then that code must be written in the controller context. For eg: (Creation of the connection with the backend, Getting some initial data from Backend) its always better to keep the view code for the UI based purposes, otherwise it will effect the rendering time of the screen. More the code in the view context more will be the rendering time. So this can lead to a bad impact for end user actually using the screens.
I hope this helps you!! If any further information required then kindly revert back.
Regards
Pravesh
PS: Please consider rewarding points if helpful and solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
You can place java code in Controller, View or in a Helper Class to access Data.
If your Data accessing code is there in more than two views, keep that code in controller and access it from there.As WebDynpro is on MVC architecture, it is a good practice to keep data accessing code in Controller.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.