on 04-17-2011 11:41 AM
can i write the code of select, update etc statements in BUTTON Ui element in a View.
is it mandatory to write the code using Classbuilder(SE24)(OO ABAP) in WD4A.
just a simple question, i am new to WDABAP.
clarify me.
thanks n reagrds
rk
Hi,
I would agree with Shaira, Technically , you can write your SQL statement in wda methods but It is better practice to have your Business logic ,data extraction abstracted from Presentation layer .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramakrishna,
WD is based on MVC architecture... It tells seperation of Presentation and Bussiness Logic. If you follow this you need to seperate business logic.
That depends on project, and Client, You can write Select statements in methods also, but Recomendable is Follow MVC.
Check this about MVC..
http://wiki.sdn.sap.com/wiki/display/WDABAP/ArchitectureofWebdynproforABAP
Cheers,
Kris.
Edited by: kissnas on Apr 19, 2011 6:52 AM
Hi Ram ,
As per Web Dynpro architecture, We should not do any DB related things(Select,Insert,Update and Delete...etc...) within Web Dynpro Compoent and Views. We should use Function modules or Class methods for accessing DB.
Thanks and Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is no problem in writing the select / update statement in the click event for BUTTON Ui element in a View.
We are going for OOPs concept to make code reusable and more structured .
Regards
Shaira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shaira,
i agree with you there will not be any change even if we write select statements in view methods anyways it is not suggested by architecture, however one of my collegue told me that performance will be degraded if we write database specific statemnts in view methods:
every controller or for that matter view controller will have separate memory to hold temporay objects at runtime, so if we write selects in the view methods this temporary data will occupy most of the memory of this controller, so it degrades rendering of view etc., i am not sure of this...
may be correct or may be not!!!
@all
but some persons asked me, without having the knowledge on OOPs how u develop the components in WDA. those componnets are of MVC architecture. For a stable WDA component u should write the Business logic in Classes and methods..
they told me like that...
but i know only through view button actions..
finally i concluded that, we can follow both the ways based on the req..
to follow MVC we should write the Business logic in Classes...
thanks for ur answers...
regards
rk
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
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.