on 11-06-2009 5:16 AM
Hello guys,
The scenario is - I want to call a function that returns a FileInputStream object so I can process it on my WD view. I can think of two approaches - one is to simply write a simple Java DC that does so and just use it as a used DC so I can call the functionality from there. Or create another WD DC that exposes the value (as binary) via component interface.
I'm leaning on the simple Java DC approach - its easier to create. But I'm just curious on what would be the Pro-side (if there's any) if I use the WD Component interface approach? Is there a plus for the efficiency? (Though I doubt) Or is it just a 'best/recommended practice' approach?
Thanks!
Regards,
Jan
Hi Jan
>one is to simply write a simple Java DC that does so and just use it as a used DC so I can call the functionality from there
Implemented Java API for the purpose mentioned in your question is the right way, I think. The Java API can be even located in the same WebDynpro DC as your WebDynpro components. There is not strongly necessity to put it into separate Java DC.
>Or create another WD DC that exposes the value (as binary) via component interface
You should not do this because in general WD components' purpose is UI, not API. Implementing WD component without any UI, but with some component interface has very-very restricted use cases. Such WD component shall only be a choice in the cases when the API is WebDynpro based and if you have to strongly use WebDynpro Runtime API in order to implement your own API.
If your API does not require WebDynpro Runtime API invocations or anything else related to WebDynpro then your choice is simple Java API.
>But I'm just curious on what would be the Pro-side (if there's any) if I use the WD Component interface approach? Is there a plus for the efficiency?
No. Performance will be better in simple Java API then in WebDynpro component interface. The reason is the API will not pass thought heavy WebDynpro engine.
BR, Siarhei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Follow the approach of faceless component used for model only and UI component which deals with only UI.
Suppose you have some models , Create one component and write all model invocking logic here with method and its required parameter.(method for all functions),put these mehtod in Interface so that you can call it in any other components if required you can put the context node alos.
Now at UI component define the uses relationship and start using those method ,
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.