Performance Idea: Implement field lists in Business Entity
 
Forums / SmartComponent Library - Developer Forum / Performance Idea: Implement field lists in Business Entity

Performance Idea: Implement field lists in Business Entity

2 posts, 0 answered
  1. Carl Verbiest
    Carl Verbiest avatar
    67 posts
    Registered:
    12 Oct 2018
    21 Oct 2019
    Link to this post
    In our BE's we have description and calculated field tables. The Tables property of a request is used to communicate to the backend whether descriptions of related tables should be fetched and whether the values of calculated fields should be calculated or not.

    The reason for this mechanism is performance. Fetching all related tables and determining value for calculated fields can be costly in terms of performance.
    By specifying tables on a request the client can indicate is these are needed or not.

    A drawback of this mechanism is that the Business entity design has to be changed to allow this.
    Fields that logically belong to an entity temp-table have to be moved to a separate temp-table.

    For queries OpenEdge ABL provides field-lists for improving performance. The client can indicate to the server which fields he requires.

    I think it could be a good idea to implement a field-list mechanism on business entities.
    This would allow us to keep description and calculated fields in the same table and still allow the client to indicate which data he requires.
    The backend logic could use the fields list to determine whether costly operations should be performed or not.

    There probably are a number of implications I'm not thinking about right now, this is my main reason for posting this to the forum.

    All feedback welcome
  2. Mike Fechner
    Mike Fechner avatar
    342 posts
    Registered:
    14 Sep 2016
    21 Oct 2019 in reply to Carl Verbiest
    Link to this post
    We have implemented field lists - or general turning on or off of calc-fields - using the custom context options of the FetchDataRequest. 

    You'll still have to code to that within the Business Entity. 
2 posts, 0 answered