My company is starting to use SUP. Since the beggining we
have been ask to ourselves if it will be a good idea try to
reuse MBOs among aplications or not. We have read the
document about best practice and we understand that use a
MBO that brings just the informations that will be used in
the screen is the best option. But, for example, in a
situation that I already have a MBO that brings me 3 fields
(int type) of a table and I just need two. Why shouldn't we
reuse that ? Why should we create a new one ?
In a scenario like that, probably the server will have to
worry about keep boths MBOs updated besides to use more disk
space of the database.
I mean. I understood that is a best practice to create a MBO
as close as possible to the screen, but in some situations
it will be better loose a litle of performance in order to
save resources and speed up my development.
How you guys have been working ? Are you reusing MBOs among applications ?
Thanks in advance
thank you for your reply.
I think I didn't explain so well my problem.
1) Imagine if the MBO with the 3 fields is being used to the application A.
2) Now a new application B need just 2 of this 3 fields.
I couldn't delete an attribute so that the application A will be impacted.
The question is: What is the best to do.
first option: Use the MBO and just use 2 of the fields. In this case there will be a impact in performance, even very small.
second option: Create a new MBO with just 2 fields. In this case the Unwired Server will need to keep both MBOs sinchronized. The resources of the server will be consumed more and more.
in a situation that I already have a MBO that brings me 3 fields (int type) of a table and I just need two. Why shouldn't we reuse that ? Why should we create a new one ?
That's the typical "it depends" scenario. Of course you can reuse your MBOs. After all, its basically a DB on the server and client side. You can mobilize a BAPI and define that every mobile project that uses that BAPI has to use the corresponding MBO.
The problem is that you may end up having a lot of unnecessary information (generic) on your mobile device / app. You'll also have to check if the generic MBO contains sensitive data that is needed for project A, but not for project B.