2012 Nov 29 7:58 AM
What do you think about the integration of ABAP objects in the development process?
Why do I ask this question?
In lots of object based programming languages and frameworks the class / objects play a central part in the development process.
So, if you want to use your classes / objects for:
1) Data Presentation in Dialogs
2) Provide Functionality for external usage (Webservices, RestFul Services, RMI)
3) Storing Data (Persistence)
it is vey easy to handle.
Examples:
Lets assume that we have a class "Partner" with the attribute "name"
1) You want to show / manipulate the "Partner-name" via a dialog input-field.
For example in Java Server Faces you can directly use the class for the presentation of data via the Expression language
<h:inputText value="#{Partner.name}"></h:inputText>
In WebDynPro for ABAP, you have to make a data binding between the dialog input field and a context elements for storing the data.
But it is not possible to directly use the class partner in the data context. In consequence you have to write a mechanism to synchonize the data between your class partner and the the data representation (ABAP Structure for example) in the data-context.
=> In my opinion the integration of ABAP objects for using it in WebDynPro Views could be better, if there would be a possibility to use objects in data contexts.
2)
Lets assume you have a class "Math" with several (static) methods "add", "sub", "multiply", "divide" ....
Now you want to "generate" a Service, so that external partners can use the funktions "add", "sub",....
In java EE6 for example you just have to add annotions @WebService, @GET@Path in front of your class.
What do you have to do in ABAP objects?
I coud not find a direct way for providing the methods as a service. Is there a way?
I did write a wrapping "Remote Function" for each method 😞
But:
What happens to possible class based exceptions? (For example Division To Zero)
If I wrap such a method, do I have to migrate the possible class based exceptions back to functional exceptions?
=> In my opinion there is a poor support for reaching ABAP object functionality behind WebServices / Restful Services.
(There also is no support for Remote Method Invocation in ABAP. The solution is also to use a RFC-Wrapper !)
3)
Have you ever tried to use the persistent object service (object-relational-mapping) in ABAP?
What do you think about it? Is it easy to use?
Regards
Steffen
2012 Dec 19 9:05 AM
Hi Steffen,
Would like to comment on your points :
1) You want to show / manipulate the "Partner-name" via a dialog input-field.
I do agree that coding the same in webdynpro for abap takes more effort thn doing it in JSF .
As the coding in Webdynpro is more towards server side where each action on client triggers the server ( this is damn slow ) But To put it in Model View controller architecture it serves the purpose.
Well Context attributes are it self abap object internally and webdynpro framework handles it.so ur comments does make sense here.
2)
Fully agree with you without the help of RFC wrapper or Webservices you cant use ABAP objects directly as services.
3)
Usage of persistence object is good only when you have lots of updates or create operatines needs to be done.else Be happy with DB tables + normal classes.
Nice discussion would req. more experts to comments on this.
Thanks
~Raj
2012 Dec 19 10:07 AM
Hallo Ray,
thank you for telling me your opinion to my discussion:-)
I am really a little bit disappointed, that there is no more reaction on my discussion because I believe, that there is a lot of potential to make ABAP a much better developer platform.
It is not only the discussion about the integration of ABAP Objects in the development process that could by better. There are also themes like "Isn't it possibile to write a new renderer for WebDynPro ABAP with the aim to generate surfaces for Mobile Clients?". Or the themes "refactoring in ABAP", "code-completion", "ABAP code parsing", ....
But there is obviously few interest by the SAP and there experts to encourage this discussion;-)
Regards
Steffen