PCF and Dynamic UI
What is a PCF? - ANS-A container made up of widgets
What are dynamic widgets? - ANS-Widgets that have properties that change according to what
the user is doing. These can be very expensive on systems. For example, using the multi-step
dot paths. (See slide 6 for more details)
Why not run an array expansion/collections request like first(), firstWhere(), or last()? -
ANS-Because array expansion/collection requests are expensive and get us more information
then we typically need, resulting in an unnecessarily slow method.
What should we do when several widgets on the same page use the same method? - ANS-We
should create a page-level PCF variable and initialize it to call the expensive method. Setting
this variable lets the expensive method be called just once.
Provide 3 examples of expensive expressions. - ANS--Anything that uses dot.pathing
-Array collection methods
-Array expansion methods
What should be done to replace an expensive expression that is called multiple times within the
same PCF? - ANS-Create a local PCF variable and initialize it using the expensive expression.
That allows the expression to be called just once.
What approach should be used to test for visibility or editability of a widget? - ANS-Test an
Applicaiton Permission Key (perm.<entity>) or System Permission Key (perm.System).
What are ListViews? - ANS-These are lists that iterate over a data set, dynamically creating a
new row in the list for each record in the data set.
What are the three different types of list view? - ANS-Array-backed, query-backed, and
view-entity-backed (?).
What are array-backed ListViews best for? - ANS-These are best for short lists because the full
set of data is loaded when the ListView is initially rendered. When you edit/modify data, the
modified data may move to another page, so use only on short lists.
What are Query-backed ListViews best for? - ANS-These are best for long lists because only
the first page of data is fetched and loaded. As we naigate between pages, the query is rerun
and the viewable data is loaded. Only columns that physically exist in the database can be used
for filtering or sorting.
What is a PCF? - ANS-A container made up of widgets
What are dynamic widgets? - ANS-Widgets that have properties that change according to what
the user is doing. These can be very expensive on systems. For example, using the multi-step
dot paths. (See slide 6 for more details)
Why not run an array expansion/collections request like first(), firstWhere(), or last()? -
ANS-Because array expansion/collection requests are expensive and get us more information
then we typically need, resulting in an unnecessarily slow method.
What should we do when several widgets on the same page use the same method? - ANS-We
should create a page-level PCF variable and initialize it to call the expensive method. Setting
this variable lets the expensive method be called just once.
Provide 3 examples of expensive expressions. - ANS--Anything that uses dot.pathing
-Array collection methods
-Array expansion methods
What should be done to replace an expensive expression that is called multiple times within the
same PCF? - ANS-Create a local PCF variable and initialize it using the expensive expression.
That allows the expression to be called just once.
What approach should be used to test for visibility or editability of a widget? - ANS-Test an
Applicaiton Permission Key (perm.<entity>) or System Permission Key (perm.System).
What are ListViews? - ANS-These are lists that iterate over a data set, dynamically creating a
new row in the list for each record in the data set.
What are the three different types of list view? - ANS-Array-backed, query-backed, and
view-entity-backed (?).
What are array-backed ListViews best for? - ANS-These are best for short lists because the full
set of data is loaded when the ListView is initially rendered. When you edit/modify data, the
modified data may move to another page, so use only on short lists.
What are Query-backed ListViews best for? - ANS-These are best for long lists because only
the first page of data is fetched and loaded. As we naigate between pages, the query is rerun
and the viewable data is loaded. Only columns that physically exist in the database can be used
for filtering or sorting.