While I am going through concept of Data Access Pattern in PDN, I understood that SoR is useful when we want to retrieve the data from external systems, and the property refers the new data page everytime.
Coming to the refresh strategy for SoR, I read "With the SoR pattern, the data reloads according to the refresh strategy specified on the data page. The property always points to the current version of the data page.
Whenever a data page parameter is updated, a new data page is created. The property then points to the new page." And for the refresh strategy of Snapshot I read "The data page is not accessed again unless it has a parameter that changes. When the parameter changes, a new data page is created. The impacted data is copied to the property and overwrites the existing data."
I do not understand the perfect difference between these two. Both are using data pages, both the data pages reloads when the param changes. And in SoR scenario if we need the real time data(current data) every time, we can load the data page whenever that perticuler property is referred right?, why do we need to wait for some param change if we expect the real time data?
SOR means your page references a Data Page meaning the data of the Data Page stays in the Data Page and is not part of the case.
In fact, if you access MyPage.MyProperty you are accessing D_MyDataPage.MyProperty the page is just a pointer to the data page.
Snapshot means the your page copy the data of the Data Page inside your case. MyPage.MyProperty has avalue and will be persisted as part of the case.
In fact, if you access MyPage.MyProperty you are accessing the value directly, not the Data Page anymore. Unless the parameter changes and then you copy again the data into your case.
Thank you for the reply. My question is in both the techniques, the data page reloads when the param referred for the data page changes, but in SoR scenario we do expect the current data every time right? So why do we need to reload the data page only if the Param changes to get the latest data (current). In this case we are having the old data unless the param change right?