on 10-25-2010 7:07 AM
Hi to all,
hwo many model objects we can able to create in single component controller?is there any limit?
Hwo many custom ctrollers we can create in one component?is there any limit?
if we map model and view controller directly is there any problem compared to normal connection like connect model and view controller through component controller?
Regards,
surya.
Hello Nari,
You can map model to view directly and this is okay.
Usually the best practice is to take advantage of MVC architecture WebDynpro is built on. It will be fine to map view controller with model directly as long as the view only displays data with out manipulation.
You want to format data before display, you can do it both in your component controller and view controller, and application runs fine, but say you need to display formatted data in more than one view, you will have to implement the same in other views to. This is not re-usable any more. It is only practice to keep such kind of logic or code in component controller or custom controller at your convenience so that it becomes re-usable saving you from reimplementing the same again and again.
About your other questions about number of models and custom controllers, there is no limit if I am not wrong. But it is not a good practice to overload your component. There is concept called componentization in Webdynpro, which can be used to architect huge development. Link below can help you in understanding componentization.
[Componentization|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f727d100-0801-0010-4cbd-b0ad5c161945]
Best regards,
Chinnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you simply want to display the data residing in a model in a view, then you can map model controller to view controller directly. But, if there is some kind of data processing required for the data in the model, then it'll create problem while directly mapping the two controllers.
Thanks
RV
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 such limit defined for custom controller also, rest is true as per above comments.
Thanks & Regards
Ravindra Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
These are the answers to your questions:
how many model objects we can able to create in single component controller?is there any limit?
-
There is no such limit defined for the number of models which can be created in a WD project
How many custom controllers we can create in one component?is there any limit?
-
By Default the component controller is created when u create a WD component, Apart from that you can create 1 custom controller and 1 Interface controller for a WD Component
if we map model and view controller directly is there any problem compared to normal connection like connect model and view controller through component controller?
-
Though this possible, it is not recommended by the framework to follow, as a View is responsible for only handling the Interaction with the outside world and not anything else.
Hope I have answered your questions.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is not that it creates a problem at run-time if u connect the model and view directly, but it is prescribed by the framework to separate both these entities for better management of the source.
One more reason is that if the same model needs to be used in another view, then the concept of re-usability is violated here.
Hope this is helpful.
Regards,
Poojith MV
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.