on 10-08-2008 1:16 PM
Hi everybody,
I am facing the following issue:
when should we map data to context and when should we keep data in instance variables?
Reasons for using context which come to mind:
- UI binding
- sharing data between controllers
backend call execution is not listed as you can execute the call just calling modelClass.execute(), so strictly speaking you can do without context mapping.
Using instance variables can speed development up since you needn't access context and nodes before actual data manipulation.
I would like to hear feedback from fellows developers, thanks
Vincenzo
Hi
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rlz=1T4SUNA_enIN288IN294&q=ContextmappingvsInstancevariables+inwebdynprojava
please go through this link
You will find lot of doc on context mapping and instance variable
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please respond.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for replying.
As far as backend access is concerned, generally speaking, I can see no reason for binding other than than UI data display and data sharing among components and few other cases you mention.
Consider this scenario: you are manipulating some data without displaying it, for instance:
your interface method
Employee[] getEligibleEmployeesForBonus()
gets an employee list from RFC and returns those who are suitable for special year-end bonus.
In this case there's no need for context binding as you can execute the RFC from
MyModel model_class_instance = new MyModel();
model_class_instance.setParameter(myvariable);
model_class_instance.execute();
Feel free to correct me if I'm leaving something out.
Thanks, Vincenzo
hi!
context mapping is necessary when you want to share data across components , also we have some properties like singleton , calculated etc which are very usefull.and also suppose you have n number of components and in one component you have to show some particular data then you only bind that element and design your layout accordingly .it is also very easy to bind data coming from backend.
thanks
vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.